blob: f3e0d702e24f51fcfdca4fd5d718f801f84379a7 [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
687BUILDEXEEXT
688EGREP
689GREP
690CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200691NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200692ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000693MAINCC
694CXX
695OBJEXT
696EXEEXT
697ac_ct_CC
698CPPFLAGS
699LDFLAGS
700CFLAGS
701CC
702EXPORT_MACOSX_DEPLOYMENT_TARGET
703CONFIGURE_MACOSX_DEPLOYMENT_TARGET
704SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200705_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000706MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000707FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000708FRAMEWORKUNIXTOOLSPREFIX
709FRAMEWORKALTINSTALLLAST
710FRAMEWORKALTINSTALLFIRST
711FRAMEWORKINSTALLLAST
712FRAMEWORKINSTALLFIRST
713PYTHONFRAMEWORKINSTALLDIR
714PYTHONFRAMEWORKPREFIX
715PYTHONFRAMEWORKDIR
716PYTHONFRAMEWORKIDENTIFIER
717PYTHONFRAMEWORK
718LIPO_32BIT_FLAGS
719ARCH_RUN_32BIT
720UNIVERSALSDK
721CONFIG_ARGS
722SOVERSION
723VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200724PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100725host_os
726host_vendor
727host_cpu
728host
729build_os
730build_vendor
731build_cpu
732build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500733HAS_HG
734HGBRANCH
735HGTAG
736HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400737BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000738target_alias
739host_alias
740build_alias
741LIBS
742ECHO_T
743ECHO_N
744ECHO_C
745DEFS
746mandir
747localedir
748libdir
749psdir
750pdfdir
751dvidir
752htmldir
753infodir
754docdir
755oldincludedir
756includedir
757localstatedir
758sharedstatedir
759sysconfdir
760datadir
761datarootdir
762libexecdir
763sbindir
764bindir
765program_transform_name
766prefix
767exec_prefix
768PACKAGE_URL
769PACKAGE_BUGREPORT
770PACKAGE_STRING
771PACKAGE_VERSION
772PACKAGE_TARNAME
773PACKAGE_NAME
774PATH_SEPARATOR
775SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000776ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000777ac_user_opts='
778enable_option_checking
779enable_universalsdk
780with_universal_archs
781with_framework_name
782enable_framework
783with_gcc
784with_cxx_main
785with_suffix
786enable_shared
787enable_profiling
788with_pydebug
789with_libs
790with_system_expat
791with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100792with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000793enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000794with_dbmliborder
795with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000796with_threads
797with_thread
798enable_ipv6
799with_doc_strings
800with_tsc
801with_pymalloc
802with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000803with_fpectl
804with_libm
805with_libc
806enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_computed_gotos
808'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809 ac_precious_vars='build_alias
810host_alias
811target_alias
812CC
813CFLAGS
814LDFLAGS
815LIBS
816CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200817CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000818
Guido van Rossum627b2d71993-12-24 10:39:16 +0000819
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000821ac_init_help=
822ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000823ac_unrecognized_opts=
824ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825# The variables have the same names as the options, with
826# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000827cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830no_recursion=
831prefix=NONE
832program_prefix=NONE
833program_suffix=NONE
834program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839x_includes=NONE
840x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000841
842# Installation directory options.
843# These are left unexpanded so users can "make install exec_prefix=/foo"
844# and all the variables that are supposed to be based on exec_prefix
845# by default will actually change.
846# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848bindir='${exec_prefix}/bin'
849sbindir='${exec_prefix}/sbin'
850libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851datarootdir='${prefix}/share'
852datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000853sysconfdir='${prefix}/etc'
854sharedstatedir='${prefix}/com'
855localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000856includedir='${prefix}/include'
857oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
859infodir='${datarootdir}/info'
860htmldir='${docdir}'
861dvidir='${docdir}'
862pdfdir='${docdir}'
863psdir='${docdir}'
864libdir='${exec_prefix}/lib'
865localedir='${datarootdir}/locale'
866mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872 # If the previous option needs an argument, assign it.
873 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 ac_prev=
876 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000877 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200880 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
881 *=) ac_optarg= ;;
882 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Accept the important Cygnus configure options, so we can diagnose typos.
886
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887 case $ac_dashdash$ac_option in
888 --)
889 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891 -bindir | --bindir | --bindi | --bind | --bin | --bi)
892 ac_prev=bindir ;;
893 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000894 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895
896 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901 -cache-file | --cache-file | --cache-fil | --cache-fi \
902 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
903 ac_prev=cache_file ;;
904 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
905 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 cache_file=$ac_optarg ;;
907
908 --config-cache | -C)
909 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
917 | --dataroo | --dataro | --datar)
918 ac_prev=datarootdir ;;
919 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
920 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
921 datarootdir=$ac_optarg ;;
922
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000924 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000926 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200927 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000928 ac_useropt_orig=$ac_useropt
929 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
930 case $ac_user_opts in
931 *"
932"enable_$ac_useropt"
933"*) ;;
934 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
935 ac_unrecognized_sep=', ';;
936 esac
937 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938
939 -docdir | --docdir | --docdi | --doc | --do)
940 ac_prev=docdir ;;
941 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
942 docdir=$ac_optarg ;;
943
944 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
945 ac_prev=dvidir ;;
946 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
947 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000950 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000952 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200953 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000954 ac_useropt_orig=$ac_useropt
955 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
956 case $ac_user_opts in
957 *"
958"enable_$ac_useropt"
959"*) ;;
960 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
961 ac_unrecognized_sep=', ';;
962 esac
963 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
966 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
967 | --exec | --exe | --ex)
968 ac_prev=exec_prefix ;;
969 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
970 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
971 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
974 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975 # Obsolete; use --with-gas.
976 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 -help | --help | --hel | --he | -h)
979 ac_init_help=long ;;
980 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
981 ac_init_help=recursive ;;
982 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
983 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
991 ac_prev=htmldir ;;
992 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
993 | --ht=*)
994 htmldir=$ac_optarg ;;
995
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996 -includedir | --includedir | --includedi | --included | --include \
997 | --includ | --inclu | --incl | --inc)
998 ac_prev=includedir ;;
999 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1000 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002
1003 -infodir | --infodir | --infodi | --infod | --info | --inf)
1004 ac_prev=infodir ;;
1005 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
1008 -libdir | --libdir | --libdi | --libd)
1009 ac_prev=libdir ;;
1010 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
1013 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1014 | --libexe | --libex | --libe)
1015 ac_prev=libexecdir ;;
1016 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1017 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001020 -localedir | --localedir | --localedi | --localed | --locale)
1021 ac_prev=localedir ;;
1022 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1023 localedir=$ac_optarg ;;
1024
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001026 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 ac_prev=localstatedir ;;
1028 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031
1032 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1033 ac_prev=mandir ;;
1034 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 # Obsolete; use --without-fp.
1039 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 no_create=yes ;;
1044
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1046 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1047 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1050 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1051 | --oldin | --oldi | --old | --ol | --o)
1052 ac_prev=oldincludedir ;;
1053 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1054 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1055 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1059 ac_prev=prefix ;;
1060 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1064 | --program-pre | --program-pr | --program-p)
1065 ac_prev=program_prefix ;;
1066 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1067 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
1070 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1071 | --program-suf | --program-su | --program-s)
1072 ac_prev=program_suffix ;;
1073 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1074 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -program-transform-name | --program-transform-name \
1078 | --program-transform-nam | --program-transform-na \
1079 | --program-transform-n | --program-transform- \
1080 | --program-transform | --program-transfor \
1081 | --program-transfo | --program-transf \
1082 | --program-trans | --program-tran \
1083 | --progr-tra | --program-tr | --program-t)
1084 ac_prev=program_transform_name ;;
1085 -program-transform-name=* | --program-transform-name=* \
1086 | --program-transform-nam=* | --program-transform-na=* \
1087 | --program-transform-n=* | --program-transform-=* \
1088 | --program-transform=* | --program-transfor=* \
1089 | --program-transfo=* | --program-transf=* \
1090 | --program-trans=* | --program-tran=* \
1091 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001094 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1095 ac_prev=pdfdir ;;
1096 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1097 pdfdir=$ac_optarg ;;
1098
1099 -psdir | --psdir | --psdi | --psd | --ps)
1100 ac_prev=psdir ;;
1101 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1102 psdir=$ac_optarg ;;
1103
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1105 | -silent | --silent | --silen | --sile | --sil)
1106 silent=yes ;;
1107
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1109 ac_prev=sbindir ;;
1110 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1111 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113
1114 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1115 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1116 | --sharedst | --shareds | --shared | --share | --shar \
1117 | --sha | --sh)
1118 ac_prev=sharedstatedir ;;
1119 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1120 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1121 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1122 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001124
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125 -site | --site | --sit)
1126 ac_prev=site ;;
1127 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001129
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1131 ac_prev=srcdir ;;
1132 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001135 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1136 | --syscon | --sysco | --sysc | --sys | --sy)
1137 ac_prev=sysconfdir ;;
1138 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1139 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001141
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146
1147 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1148 verbose=yes ;;
1149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 -version | --version | --versio | --versi | --vers | -V)
1151 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001154 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001156 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001157 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001158 ac_useropt_orig=$ac_useropt
1159 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1160 case $ac_user_opts in
1161 *"
1162"with_$ac_useropt"
1163"*) ;;
1164 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1165 ac_unrecognized_sep=', ';;
1166 esac
1167 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
1169 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001173 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 ac_useropt_orig=$ac_useropt
1175 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1176 case $ac_user_opts in
1177 *"
1178"with_$ac_useropt"
1179"*) ;;
1180 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1181 ac_unrecognized_sep=', ';;
1182 esac
1183 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185 --x)
1186 # Obsolete; use --with-x.
1187 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1190 | --x-incl | --x-inc | --x-in | --x-i)
1191 ac_prev=x_includes ;;
1192 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1193 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1197 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1198 ac_prev=x_libraries ;;
1199 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1200 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001203 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1204Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205 ;;
1206
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 *=*)
1208 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1209 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 case $ac_envvar in #(
1211 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001212 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001214 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 export $ac_envvar ;;
1216
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001217 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001222 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223 ;;
1224
1225 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001226done
1227
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001230 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231fi
1232
Matthias Kloseb9621712010-04-24 17:59:49 +00001233if test -n "$ac_unrecognized_opts"; then
1234 case $enable_option_checking in
1235 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001236 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1238 esac
1239fi
1240
1241# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1243 datadir sysconfdir sharedstatedir localstatedir includedir \
1244 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1245 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001246do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 # Remove trailing slashes.
1249 case $ac_val in
1250 */ )
1251 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1252 eval $ac_var=\$ac_val;;
1253 esac
1254 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 [\\/$]* | ?:[\\/]* ) continue;;
1257 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001260done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261
Martin v. Löwis11437992002-04-12 09:54:03 +00001262# There might be people who depend on the old broken behavior: `$host'
1263# used to hold the argument of --host etc.
1264# FIXME: To remove some day.
1265build=$build_alias
1266host=$host_alias
1267target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269# FIXME: To remove some day.
1270if test "x$host_alias" != x; then
1271 if test "x$build_alias" = x; then
1272 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 elif test "x$build_alias" != "x$host_alias"; then
1274 cross_compiling=yes
1275 fi
1276fi
1277
1278ac_tool_prefix=
1279test -n "$host_alias" && ac_tool_prefix=$host_alias-
1280
1281test "$silent" = yes && exec 6>/dev/null
1282
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284ac_pwd=`pwd` && test -n "$ac_pwd" &&
1285ac_ls_di=`ls -di .` &&
1286ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290
1291
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292# Find the source files, if location was not specified.
1293if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001294 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001296 ac_confdir=`$as_dirname -- "$as_myself" ||
1297$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1298 X"$as_myself" : 'X\(//\)[^/]' \| \
1299 X"$as_myself" : 'X\(//\)$' \| \
1300 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1301$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1303 s//\1/
1304 q
1305 }
1306 /^X\(\/\/\)[^/].*/{
1307 s//\1/
1308 q
1309 }
1310 /^X\(\/\/\)$/{
1311 s//\1/
1312 q
1313 }
1314 /^X\(\/\).*/{
1315 s//\1/
1316 q
1317 }
1318 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001319 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001320 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321 srcdir=..
1322 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001323else
1324 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326if test ! -r "$srcdir/$ac_unique_file"; then
1327 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1331ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333 pwd)`
1334# When building in place, set srcdir=.
1335if test "$ac_abs_confdir" = "$ac_pwd"; then
1336 srcdir=.
1337fi
1338# Remove unnecessary trailing slashes from srcdir.
1339# Double slashes in file names in object file debugging info
1340# mess up M-x gdb in Emacs.
1341case $srcdir in
1342*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1343esac
1344for ac_var in $ac_precious_vars; do
1345 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1346 eval ac_env_${ac_var}_value=\$${ac_var}
1347 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1348 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1349done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001350
Martin v. Löwis11437992002-04-12 09:54:03 +00001351#
1352# Report the --help message.
1353#
1354if test "$ac_init_help" = "long"; then
1355 # Omit some internal or obsolete options to make the list less imposing.
1356 # This message is too long to be a string in the A/UX 3.1 sh.
1357 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001358\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001359
1360Usage: $0 [OPTION]... [VAR=VALUE]...
1361
1362To assign environment variables (e.g., CC, CFLAGS...), specify them as
1363VAR=VALUE. See below for descriptions of some of the useful variables.
1364
1365Defaults for the options are specified in brackets.
1366
1367Configuration:
1368 -h, --help display this help and exit
1369 --help=short display options specific to this package
1370 --help=recursive display the short help of all the included packages
1371 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001372 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 --cache-file=FILE cache test results in FILE [disabled]
1374 -C, --config-cache alias for \`--cache-file=config.cache'
1375 -n, --no-create do not create output files
1376 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1377
Martin v. Löwis11437992002-04-12 09:54:03 +00001378Installation directories:
1379 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001380 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001381 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001382 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001383
1384By default, \`make install' will install all the files in
1385\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1386an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1387for instance \`--prefix=\$HOME'.
1388
1389For better control, use the options below.
1390
1391Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001392 --bindir=DIR user executables [EPREFIX/bin]
1393 --sbindir=DIR system admin executables [EPREFIX/sbin]
1394 --libexecdir=DIR program executables [EPREFIX/libexec]
1395 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1396 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1397 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1398 --libdir=DIR object code libraries [EPREFIX/lib]
1399 --includedir=DIR C header files [PREFIX/include]
1400 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1401 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1402 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1403 --infodir=DIR info documentation [DATAROOTDIR/info]
1404 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1405 --mandir=DIR man documentation [DATAROOTDIR/man]
1406 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1407 --htmldir=DIR html documentation [DOCDIR]
1408 --dvidir=DIR dvi documentation [DOCDIR]
1409 --pdfdir=DIR pdf documentation [DOCDIR]
1410 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001411_ACEOF
1412
1413 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001414
1415System types:
1416 --build=BUILD configure for building on BUILD [guessed]
1417 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001418_ACEOF
1419fi
1420
1421if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001422 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001423 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001424 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 cat <<\_ACEOF
1426
1427Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1430 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001431 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001432 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001433 --enable-framework[=INSTALLDIR]
1434 Build (MacOSX|Darwin) framework
1435 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001436 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001437 --enable-loadable-sqlite-extensions
1438 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --enable-ipv6 Enable ipv6 (with ipv4) support
1440 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001441 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444Optional Packages:
1445 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1446 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001447 --with-universal-archs=ARCH
1448 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001449 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001450 --with-framework-name=FRAMEWORK
1451 specify an alternate name of the framework built
1452 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001454 --with-cxx-main=<compiler>
1455 compile main() and link python executable with C++
1456 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001457 --with-suffix=.exe set executable suffix
1458 --with-pydebug build with Py_DEBUG defined
1459 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001460 --with-system-expat build pyexpat module using an installed expat
1461 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001462 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001463 --with-system-libmpdec build _decimal module using an installed libmpdec
1464 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001465 --with-dbmliborder=db1:db2:...
1466 order to check db backends for dbm. Valid value is a
1467 colon separated string with the backend names
1468 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001469 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001470 --with(out)-threads[=DIRECTORY]
1471 disable/enable thread support
1472 --with(out)-thread[=DIRECTORY]
1473 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001475 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001477 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-fpectl enable SIGFPE catching
1479 --with-libm=STRING math library
1480 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001481 --with(out)-computed-gotos
1482 Use computed gotos in evaluation loop (enabled by
1483 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001484
1485Some influential environment variables:
1486 CC C compiler command
1487 CFLAGS C compiler flags
1488 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1489 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 CPP C preprocessor
1494
1495Use these variables to override the choices made by `configure' or to help
1496it to find libraries and programs with nonstandard names/locations.
1497
Georg Brandle2e15612009-05-20 18:25:10 +00001498Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001499_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001501fi
1502
1503if test "$ac_init_help" = "recursive"; then
1504 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001505 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001506 test -d "$ac_dir" ||
1507 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1508 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 ac_builddir=.
1510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511case "$ac_dir" in
1512.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1513*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001514 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001516 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 case $ac_top_builddir_sub in
1518 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1519 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1520 esac ;;
1521esac
1522ac_abs_top_builddir=$ac_pwd
1523ac_abs_builddir=$ac_pwd$ac_dir_suffix
1524# for backward compatibility:
1525ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001526
1527case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001529 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 ac_top_srcdir=$ac_top_builddir_sub
1531 ac_abs_top_srcdir=$ac_pwd ;;
1532 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534 ac_top_srcdir=$srcdir
1535 ac_abs_top_srcdir=$srcdir ;;
1536 *) # Relative name.
1537 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1538 ac_top_srcdir=$ac_top_build_prefix$srcdir
1539 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001540esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001541ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001543 cd "$ac_dir" || { ac_status=$?; continue; }
1544 # Check for guested configure.
1545 if test -f "$ac_srcdir/configure.gnu"; then
1546 echo &&
1547 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1548 elif test -f "$ac_srcdir/configure"; then
1549 echo &&
1550 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001552 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 fi || ac_status=$?
1554 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 done
1556fi
1557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001559if $ac_init_version; then
1560 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001561python configure 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001562generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001564Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001565This configure script is free software; the Free Software Foundation
1566gives unlimited permission to copy, distribute and modify it.
1567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001570
1571## ------------------------ ##
1572## Autoconf initialization. ##
1573## ------------------------ ##
1574
1575# ac_fn_c_try_compile LINENO
1576# --------------------------
1577# Try to compile conftest.$ac_ext, and return whether this succeeded.
1578ac_fn_c_try_compile ()
1579{
1580 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1581 rm -f conftest.$ac_objext
1582 if { { ac_try="$ac_compile"
1583case "(($ac_try" in
1584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1585 *) ac_try_echo=$ac_try;;
1586esac
1587eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1588$as_echo "$ac_try_echo"; } >&5
1589 (eval "$ac_compile") 2>conftest.err
1590 ac_status=$?
1591 if test -s conftest.err; then
1592 grep -v '^ *+' conftest.err >conftest.er1
1593 cat conftest.er1 >&5
1594 mv -f conftest.er1 conftest.err
1595 fi
1596 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1597 test $ac_status = 0; } && {
1598 test -z "$ac_c_werror_flag" ||
1599 test ! -s conftest.err
1600 } && test -s conftest.$ac_objext; then :
1601 ac_retval=0
1602else
1603 $as_echo "$as_me: failed program was:" >&5
1604sed 's/^/| /' conftest.$ac_ext >&5
1605
1606 ac_retval=1
1607fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001608 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001609 as_fn_set_status $ac_retval
1610
1611} # ac_fn_c_try_compile
1612
Matthias Kloseb9621712010-04-24 17:59:49 +00001613# ac_fn_c_try_link LINENO
1614# -----------------------
1615# Try to link conftest.$ac_ext, and return whether this succeeded.
1616ac_fn_c_try_link ()
1617{
1618 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1619 rm -f conftest.$ac_objext conftest$ac_exeext
1620 if { { ac_try="$ac_link"
1621case "(($ac_try" in
1622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1623 *) ac_try_echo=$ac_try;;
1624esac
1625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1626$as_echo "$ac_try_echo"; } >&5
1627 (eval "$ac_link") 2>conftest.err
1628 ac_status=$?
1629 if test -s conftest.err; then
1630 grep -v '^ *+' conftest.err >conftest.er1
1631 cat conftest.er1 >&5
1632 mv -f conftest.er1 conftest.err
1633 fi
1634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1635 test $ac_status = 0; } && {
1636 test -z "$ac_c_werror_flag" ||
1637 test ! -s conftest.err
1638 } && test -s conftest$ac_exeext && {
1639 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001640 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001641 }; then :
1642 ac_retval=0
1643else
1644 $as_echo "$as_me: failed program was:" >&5
1645sed 's/^/| /' conftest.$ac_ext >&5
1646
1647 ac_retval=1
1648fi
1649 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1650 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1651 # interfere with the next link command; also delete a directory that is
1652 # left behind by Apple's compiler. We do this before executing the actions.
1653 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001654 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001655 as_fn_set_status $ac_retval
1656
1657} # ac_fn_c_try_link
1658
Matthias Kloseb9621712010-04-24 17:59:49 +00001659# ac_fn_c_try_cpp LINENO
1660# ----------------------
1661# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1662ac_fn_c_try_cpp ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1665 if { { ac_try="$ac_cpp conftest.$ac_ext"
1666case "(($ac_try" in
1667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1668 *) ac_try_echo=$ac_try;;
1669esac
1670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1671$as_echo "$ac_try_echo"; } >&5
1672 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1673 ac_status=$?
1674 if test -s conftest.err; then
1675 grep -v '^ *+' conftest.err >conftest.er1
1676 cat conftest.er1 >&5
1677 mv -f conftest.er1 conftest.err
1678 fi
1679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001680 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1682 test ! -s conftest.err
1683 }; then :
1684 ac_retval=0
1685else
1686 $as_echo "$as_me: failed program was:" >&5
1687sed 's/^/| /' conftest.$ac_ext >&5
1688
1689 ac_retval=1
1690fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001691 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001692 as_fn_set_status $ac_retval
1693
1694} # ac_fn_c_try_cpp
1695
1696# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1697# -------------------------------------------------------
1698# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1699# the include files in INCLUDES and setting the cache variable VAR
1700# accordingly.
1701ac_fn_c_check_header_mongrel ()
1702{
1703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001704 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1706$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001707if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001708 $as_echo_n "(cached) " >&6
1709fi
1710eval ac_res=\$$3
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1712$as_echo "$ac_res" >&6; }
1713else
1714 # Is the header compilable?
1715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1716$as_echo_n "checking $2 usability... " >&6; }
1717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1718/* end confdefs.h. */
1719$4
1720#include <$2>
1721_ACEOF
1722if ac_fn_c_try_compile "$LINENO"; then :
1723 ac_header_compiler=yes
1724else
1725 ac_header_compiler=no
1726fi
1727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1729$as_echo "$ac_header_compiler" >&6; }
1730
1731# Is the header present?
1732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1733$as_echo_n "checking $2 presence... " >&6; }
1734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1735/* end confdefs.h. */
1736#include <$2>
1737_ACEOF
1738if ac_fn_c_try_cpp "$LINENO"; then :
1739 ac_header_preproc=yes
1740else
1741 ac_header_preproc=no
1742fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001743rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1745$as_echo "$ac_header_preproc" >&6; }
1746
1747# So? What about this header?
1748case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1749 yes:no: )
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1751$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1753$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1754 ;;
1755 no:yes:* )
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1757$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1759$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1761$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1763$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1765$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001766( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001767## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001768## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001769 ) | sed "s/^/$as_me: WARNING: /" >&2
1770 ;;
1771esac
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1773$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001774if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 $as_echo_n "(cached) " >&6
1776else
1777 eval "$3=\$ac_header_compiler"
1778fi
1779eval ac_res=\$$3
1780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1781$as_echo "$ac_res" >&6; }
1782fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001784
1785} # ac_fn_c_check_header_mongrel
1786
1787# ac_fn_c_try_run LINENO
1788# ----------------------
1789# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1790# that executables *can* be run.
1791ac_fn_c_try_run ()
1792{
1793 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1794 if { { ac_try="$ac_link"
1795case "(($ac_try" in
1796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1797 *) ac_try_echo=$ac_try;;
1798esac
1799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1800$as_echo "$ac_try_echo"; } >&5
1801 (eval "$ac_link") 2>&5
1802 ac_status=$?
1803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1805 { { case "(($ac_try" in
1806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1807 *) ac_try_echo=$ac_try;;
1808esac
1809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1810$as_echo "$ac_try_echo"; } >&5
1811 (eval "$ac_try") 2>&5
1812 ac_status=$?
1813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1814 test $ac_status = 0; }; }; then :
1815 ac_retval=0
1816else
1817 $as_echo "$as_me: program exited with status $ac_status" >&5
1818 $as_echo "$as_me: failed program was:" >&5
1819sed 's/^/| /' conftest.$ac_ext >&5
1820
1821 ac_retval=$ac_status
1822fi
1823 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001824 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001825 as_fn_set_status $ac_retval
1826
1827} # ac_fn_c_try_run
1828
1829# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1830# -------------------------------------------------------
1831# Tests whether HEADER exists and can be compiled using the include files in
1832# INCLUDES, setting the cache variable VAR accordingly.
1833ac_fn_c_check_header_compile ()
1834{
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1837$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001838if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 $as_echo_n "(cached) " >&6
1840else
1841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1842/* end confdefs.h. */
1843$4
1844#include <$2>
1845_ACEOF
1846if ac_fn_c_try_compile "$LINENO"; then :
1847 eval "$3=yes"
1848else
1849 eval "$3=no"
1850fi
1851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_compile
1859
Matthias Kloseb9621712010-04-24 17:59:49 +00001860# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1861# -------------------------------------------
1862# Tests whether TYPE exists after having included INCLUDES, setting cache
1863# variable VAR accordingly.
1864ac_fn_c_check_type ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1868$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001869if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001870 $as_echo_n "(cached) " >&6
1871else
1872 eval "$3=no"
1873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1874/* end confdefs.h. */
1875$4
1876int
1877main ()
1878{
1879if (sizeof ($2))
1880 return 0;
1881 ;
1882 return 0;
1883}
1884_ACEOF
1885if ac_fn_c_try_compile "$LINENO"; then :
1886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887/* end confdefs.h. */
1888$4
1889int
1890main ()
1891{
1892if (sizeof (($2)))
1893 return 0;
1894 ;
1895 return 0;
1896}
1897_ACEOF
1898if ac_fn_c_try_compile "$LINENO"; then :
1899
1900else
1901 eval "$3=yes"
1902fi
1903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1904fi
1905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1906fi
1907eval ac_res=\$$3
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1909$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001910 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001911
1912} # ac_fn_c_check_type
1913
1914# ac_fn_c_find_uintX_t LINENO BITS VAR
1915# ------------------------------------
1916# Finds an unsigned integer type with width BITS, setting cache variable VAR
1917# accordingly.
1918ac_fn_c_find_uintX_t ()
1919{
1920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1922$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001923if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001924 $as_echo_n "(cached) " >&6
1925else
1926 eval "$3=no"
1927 # Order is important - never check a type that is potentially smaller
1928 # than half of the expected target width.
1929 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1930 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1932/* end confdefs.h. */
1933$ac_includes_default
1934int
1935main ()
1936{
1937static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001938test_array [0] = 0;
1939return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001940
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_compile "$LINENO"; then :
1946 case $ac_type in #(
1947 uint$2_t) :
1948 eval "$3=yes" ;; #(
1949 *) :
1950 eval "$3=\$ac_type" ;;
1951esac
1952fi
1953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001954 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001955
1956else
1957 break
1958fi
1959 done
1960fi
1961eval ac_res=\$$3
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1963$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001964 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001965
1966} # ac_fn_c_find_uintX_t
1967
1968# ac_fn_c_find_intX_t LINENO BITS VAR
1969# -----------------------------------
1970# Finds a signed integer type with width BITS, setting cache variable VAR
1971# accordingly.
1972ac_fn_c_find_intX_t ()
1973{
1974 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1976$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001977if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001978 $as_echo_n "(cached) " >&6
1979else
1980 eval "$3=no"
1981 # Order is important - never check a type that is potentially smaller
1982 # than half of the expected target width.
1983 for ac_type in int$2_t 'int' 'long int' \
1984 'long long int' 'short int' 'signed char'; do
1985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986/* end confdefs.h. */
1987$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001988 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001989int
1990main ()
1991{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001992static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001993test_array [0] = 0;
1994return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002004 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002005int
2006main ()
2007{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002008static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002009 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002010test_array [0] = 0;
2011return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018
2019else
2020 case $ac_type in #(
2021 int$2_t) :
2022 eval "$3=yes" ;; #(
2023 *) :
2024 eval "$3=\$ac_type" ;;
2025esac
2026fi
2027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2028fi
2029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002030 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002031
2032else
2033 break
2034fi
2035 done
2036fi
2037eval ac_res=\$$3
2038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2039$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002040 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002041
2042} # ac_fn_c_find_intX_t
2043
2044# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2045# --------------------------------------------
2046# Tries to find the compile-time value of EXPR in a program that includes
2047# INCLUDES, setting VAR accordingly. Returns whether the value could be
2048# computed
2049ac_fn_c_compute_int ()
2050{
2051 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2052 if test "$cross_compiling" = yes; then
2053 # Depending upon the size, compute the lo and hi bounds.
2054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002061test_array [0] = 0;
2062return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=0 ac_mid=0
2070 while :; do
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002078test_array [0] = 0;
2079return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002080
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_hi=$ac_mid; break
2087else
2088 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2089 if test $ac_lo -le $ac_mid; then
2090 ac_lo= ac_hi=
2091 break
2092 fi
2093 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096 done
2097else
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h. */
2100$4
2101int
2102main ()
2103{
2104static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002105test_array [0] = 0;
2106return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112if ac_fn_c_try_compile "$LINENO"; then :
2113 ac_hi=-1 ac_mid=-1
2114 while :; do
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118int
2119main ()
2120{
2121static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002122test_array [0] = 0;
2123return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002124
2125 ;
2126 return 0;
2127}
2128_ACEOF
2129if ac_fn_c_try_compile "$LINENO"; then :
2130 ac_lo=$ac_mid; break
2131else
2132 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2133 if test $ac_mid -le $ac_hi; then
2134 ac_lo= ac_hi=
2135 break
2136 fi
2137 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2138fi
2139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2140 done
2141else
2142 ac_lo= ac_hi=
2143fi
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145fi
2146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147# Binary search between lo and hi bounds.
2148while test "x$ac_lo" != "x$ac_hi"; do
2149 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151/* end confdefs.h. */
2152$4
2153int
2154main ()
2155{
2156static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002157test_array [0] = 0;
2158return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_compile "$LINENO"; then :
2165 ac_hi=$ac_mid
2166else
2167 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2168fi
2169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170done
2171case $ac_lo in #((
2172?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2173'') ac_retval=1 ;;
2174esac
2175 else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178$4
2179static long int longval () { return $2; }
2180static unsigned long int ulongval () { return $2; }
2181#include <stdio.h>
2182#include <stdlib.h>
2183int
2184main ()
2185{
2186
2187 FILE *f = fopen ("conftest.val", "w");
2188 if (! f)
2189 return 1;
2190 if (($2) < 0)
2191 {
2192 long int i = longval ();
2193 if (i != ($2))
2194 return 1;
2195 fprintf (f, "%ld", i);
2196 }
2197 else
2198 {
2199 unsigned long int i = ulongval ();
2200 if (i != ($2))
2201 return 1;
2202 fprintf (f, "%lu", i);
2203 }
2204 /* Do not output a trailing newline, as this causes \r\n confusion
2205 on some platforms. */
2206 return ferror (f) || fclose (f) != 0;
2207
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_run "$LINENO"; then :
2213 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2214else
2215 ac_retval=1
2216fi
2217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2218 conftest.$ac_objext conftest.beam conftest.$ac_ext
2219rm -f conftest.val
2220
2221 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002222 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002223 as_fn_set_status $ac_retval
2224
2225} # ac_fn_c_compute_int
2226
2227# ac_fn_c_check_func LINENO FUNC VAR
2228# ----------------------------------
2229# Tests whether FUNC exists, setting the cache variable VAR accordingly
2230ac_fn_c_check_func ()
2231{
2232 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2234$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002235if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002236 $as_echo_n "(cached) " >&6
2237else
2238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239/* end confdefs.h. */
2240/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2241 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2242#define $2 innocuous_$2
2243
2244/* System header to define __stub macros and hopefully few prototypes,
2245 which can conflict with char $2 (); below.
2246 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2247 <limits.h> exists even on freestanding compilers. */
2248
2249#ifdef __STDC__
2250# include <limits.h>
2251#else
2252# include <assert.h>
2253#endif
2254
2255#undef $2
2256
2257/* Override any GCC internal prototype to avoid an error.
2258 Use char because int might match the return type of a GCC
2259 builtin and then its argument prototype would still apply. */
2260#ifdef __cplusplus
2261extern "C"
2262#endif
2263char $2 ();
2264/* The GNU C library defines this for functions which it implements
2265 to always fail with ENOSYS. Some functions are actually named
2266 something starting with __ and the normal name is an alias. */
2267#if defined __stub_$2 || defined __stub___$2
2268choke me
2269#endif
2270
2271int
2272main ()
2273{
2274return $2 ();
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_link "$LINENO"; then :
2280 eval "$3=yes"
2281else
2282 eval "$3=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext \
2285 conftest$ac_exeext conftest.$ac_ext
2286fi
2287eval ac_res=\$$3
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2289$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002290 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002291
2292} # ac_fn_c_check_func
2293
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002294# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2295# ---------------------------------------------
2296# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2297# accordingly.
2298ac_fn_c_check_decl ()
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301 as_decl_name=`echo $2|sed 's/ *(.*//'`
2302 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2304$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2305if eval \${$3+:} false; then :
2306 $as_echo_n "(cached) " >&6
2307else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$4
2311int
2312main ()
2313{
2314#ifndef $as_decl_name
2315#ifdef __cplusplus
2316 (void) $as_decl_use;
2317#else
2318 (void) $as_decl_name;
2319#endif
2320#endif
2321
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326if ac_fn_c_try_compile "$LINENO"; then :
2327 eval "$3=yes"
2328else
2329 eval "$3=no"
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$3
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
2336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2337
2338} # ac_fn_c_check_decl
2339
Matthias Kloseb9621712010-04-24 17:59:49 +00002340# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2341# ----------------------------------------------------
2342# Tries to find if the field MEMBER exists in type AGGR, after including
2343# INCLUDES, setting cache variable VAR accordingly.
2344ac_fn_c_check_member ()
2345{
2346 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2348$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002349if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002350 $as_echo_n "(cached) " >&6
2351else
2352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353/* end confdefs.h. */
2354$5
2355int
2356main ()
2357{
2358static $2 ac_aggr;
2359if (ac_aggr.$3)
2360return 0;
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365if ac_fn_c_try_compile "$LINENO"; then :
2366 eval "$4=yes"
2367else
2368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2369/* end confdefs.h. */
2370$5
2371int
2372main ()
2373{
2374static $2 ac_aggr;
2375if (sizeof ac_aggr.$3)
2376return 0;
2377 ;
2378 return 0;
2379}
2380_ACEOF
2381if ac_fn_c_try_compile "$LINENO"; then :
2382 eval "$4=yes"
2383else
2384 eval "$4=no"
2385fi
2386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2387fi
2388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2389fi
2390eval ac_res=\$$4
2391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2392$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002393 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002394
2395} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002397This file contains any messages produced by compilers while
2398running configure, to aid debugging if configure makes a mistake.
2399
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002400It was created by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002401generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
2403 $ $0 $@
2404
2405_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002406exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002407{
2408cat <<_ASUNAME
2409## --------- ##
2410## Platform. ##
2411## --------- ##
2412
2413hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2414uname -m = `(uname -m) 2>/dev/null || echo unknown`
2415uname -r = `(uname -r) 2>/dev/null || echo unknown`
2416uname -s = `(uname -s) 2>/dev/null || echo unknown`
2417uname -v = `(uname -v) 2>/dev/null || echo unknown`
2418
2419/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2420/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2421
2422/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2423/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2424/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002426/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2427/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2428/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2429
2430_ASUNAME
2431
2432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2433for as_dir in $PATH
2434do
2435 IFS=$as_save_IFS
2436 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 $as_echo "PATH: $as_dir"
2438 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441} >&5
2442
2443cat >&5 <<_ACEOF
2444
2445
2446## ----------- ##
2447## Core tests. ##
2448## ----------- ##
2449
2450_ACEOF
2451
2452
2453# Keep a trace of the command line.
2454# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002455# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002456# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002457# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002458ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002459ac_configure_args0=
2460ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002461ac_must_keep_next=false
2462for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002463do
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 for ac_arg
2465 do
2466 case $ac_arg in
2467 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2468 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2469 | -silent | --silent | --silen | --sile | --sil)
2470 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002473 esac
2474 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002479 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002481 case $ac_arg in
2482 *=* | --config-cache | -C | -disable-* | --disable-* \
2483 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2484 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2485 | -with-* | --with-* | -without-* | --without-* | --x)
2486 case "$ac_configure_args0 " in
2487 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2488 esac
2489 ;;
2490 -* ) ac_must_keep_next=true ;;
2491 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 ;;
2495 esac
2496 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002497done
Matthias Kloseb9621712010-04-24 17:59:49 +00002498{ ac_configure_args0=; unset ac_configure_args0;}
2499{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002500
2501# When interrupted or exit'd, cleanup temporary files, and complete
2502# config.log. We remove comments because anyway the quotes in there
2503# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504# WARNING: Use '\'' to represent an apostrophe within the trap.
2505# 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 +00002506trap 'exit_status=$?
2507 # Save into config.log some information that might help in debugging.
2508 {
2509 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002510
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002512## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
2515 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516(
2517 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2518 eval ac_val=\$$ac_var
2519 case $ac_val in #(
2520 *${as_nl}*)
2521 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2523$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac
2525 case $ac_var in #(
2526 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2528 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 esac ;;
2530 esac
2531 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2534 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 "s/'\''/'\''\\\\'\'''\''/g;
2537 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2538 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002539 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002541 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 esac |
2543 sort
2544)
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002546
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002547 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002548## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002549## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002550 echo
2551 for ac_var in $ac_subst_vars
2552 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 eval ac_val=\$$ac_var
2554 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002555 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002557 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002558 done | sort
2559 echo
2560
2561 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002562 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002564## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002565 echo
2566 for ac_var in $ac_subst_files
2567 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 eval ac_val=\$$ac_var
2569 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002570 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002572 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002573 done | sort
2574 echo
2575 fi
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002579## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002581 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 echo
2584 fi
2585 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 $as_echo "$as_me: caught signal $ac_signal"
2587 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 rm -f core *.core core.conftest.* &&
2590 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002593for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002595done
2596ac_signal=0
2597
2598# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002600
Matthias Kloseb9621712010-04-24 17:59:49 +00002601$as_echo "/* confdefs.h */" > confdefs.h
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603# Predefined preprocessor variables.
2604
2605cat >>confdefs.h <<_ACEOF
2606#define PACKAGE_NAME "$PACKAGE_NAME"
2607_ACEOF
2608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609cat >>confdefs.h <<_ACEOF
2610#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2611_ACEOF
2612
Martin v. Löwis11437992002-04-12 09:54:03 +00002613cat >>confdefs.h <<_ACEOF
2614#define PACKAGE_VERSION "$PACKAGE_VERSION"
2615_ACEOF
2616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617cat >>confdefs.h <<_ACEOF
2618#define PACKAGE_STRING "$PACKAGE_STRING"
2619_ACEOF
2620
Martin v. Löwis11437992002-04-12 09:54:03 +00002621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2623_ACEOF
2624
Matthias Kloseb9621712010-04-24 17:59:49 +00002625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_URL "$PACKAGE_URL"
2627_ACEOF
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629
2630# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002631# Prefer an explicitly selected file to automatically selected ones.
2632ac_site_file1=NONE
2633ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002635 # We do not want a PATH search for config.site.
2636 case $CONFIG_SITE in #((
2637 -*) ac_site_file1=./$CONFIG_SITE;;
2638 */*) ac_site_file1=$CONFIG_SITE;;
2639 *) ac_site_file1=./$CONFIG_SITE;;
2640 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 ac_site_file1=$prefix/share/config.site
2643 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644else
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 ac_site_file1=$ac_default_prefix/share/config.site
2646 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002648for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002649do
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 test "x$ac_site_file" = xNONE && continue
2651 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2653$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002655 . "$ac_site_file" \
2656 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2658as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002659See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002660 fi
2661done
2662
2663if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 # Some versions of bash will fail to source /dev/null (special files
2665 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2666 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2668$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2671 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 esac
2673 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674else
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2676$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 >$cache_file
2678fi
2679
2680# Check that the precious variables saved in the cache have kept the same
2681# value.
2682ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2685 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2687 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 case $ac_old_set,$ac_new_set in
2689 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2691$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 +00002692 ac_cache_corrupted=: ;;
2693 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002694 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2695$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 ac_cache_corrupted=: ;;
2697 ,);;
2698 *)
2699 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002700 # differences in whitespace do not lead to failure.
2701 ac_old_val_w=`echo x $ac_old_val`
2702 ac_new_val_w=`echo x $ac_new_val`
2703 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2705$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2706 ac_cache_corrupted=:
2707 else
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2709$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2710 eval $ac_var=\$ac_old_val
2711 fi
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2713$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2715$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 fi;;
2717 esac
2718 # Pass precious variables to config.status.
2719 if test "$ac_new_set" = set; then
2720 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002721 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 *) ac_arg=$ac_var=$ac_new_val ;;
2723 esac
2724 case " $ac_configure_args " in
2725 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 esac
2728 fi
2729done
2730if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002731 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2734$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002735 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002737## -------------------- ##
2738## Main body of script. ##
2739## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002740
Guido van Rossum7f43da71994-08-01 12:15:30 +00002741ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002742ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002743ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2744ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2745ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002746
Guido van Rossum627b2d71993-12-24 10:39:16 +00002747
Michael W. Hudson54241132001-12-07 15:38:26 +00002748
Trent Nelson4d4ec652012-10-16 08:51:24 -04002749
Trent Nelson5595ab52012-10-17 04:47:31 -04002750if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002751 # If we're building out-of-tree, we need to make sure the following
2752 # resources get picked up before their $srcdir counterparts.
2753 # Objects/ -> typeslots.inc
2754 # Include/ -> Python-ast.h, graminit.h
2755 # Python/ -> importlib.h
2756 # (A side effect of this is that these resources will automatically be
2757 # regenerated when building out-of-tree, regardless of whether or not
2758 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2759 # off.)
2760 BASECPPFLAGS="-IObjects -IInclude -IPython"
2761else
2762 BASECPPFLAGS=""
2763fi
2764
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765
2766
2767
2768
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002769if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770then
2771# Extract the first word of "hg", so it can be a program name with args.
2772set dummy hg; ac_word=$2
2773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2774$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002775if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002776 $as_echo_n "(cached) " >&6
2777else
2778 if test -n "$HAS_HG"; then
2779 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2780else
2781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782for as_dir in $PATH
2783do
2784 IFS=$as_save_IFS
2785 test -z "$as_dir" && as_dir=.
2786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002788 ac_cv_prog_HAS_HG="found"
2789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2790 break 2
2791 fi
2792done
2793 done
2794IFS=$as_save_IFS
2795
2796 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2797fi
2798fi
2799HAS_HG=$ac_cv_prog_HAS_HG
2800if test -n "$HAS_HG"; then
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2802$as_echo "$HAS_HG" >&6; }
2803else
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2805$as_echo "no" >&6; }
2806fi
2807
2808
2809else
2810HAS_HG=no-repository
2811fi
2812if test $HAS_HG = found
2813then
2814 HGVERSION="hg id -i \$(srcdir)"
2815 HGTAG="hg id -t \$(srcdir)"
2816 HGBRANCH="hg id -b \$(srcdir)"
2817else
2818 HGVERSION=""
2819 HGTAG=""
2820 HGBRANCH=""
2821fi
2822
2823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002824ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002825
2826
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002827ac_aux_dir=
2828for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2829 if test -f "$ac_dir/install-sh"; then
2830 ac_aux_dir=$ac_dir
2831 ac_install_sh="$ac_aux_dir/install-sh -c"
2832 break
2833 elif test -f "$ac_dir/install.sh"; then
2834 ac_aux_dir=$ac_dir
2835 ac_install_sh="$ac_aux_dir/install.sh -c"
2836 break
2837 elif test -f "$ac_dir/shtool"; then
2838 ac_aux_dir=$ac_dir
2839 ac_install_sh="$ac_aux_dir/shtool install -c"
2840 break
2841 fi
2842done
2843if test -z "$ac_aux_dir"; then
2844 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2845fi
2846
2847# These three variables are undocumented and unsupported,
2848# and are intended to be withdrawn in a future Autoconf release.
2849# They can cause serious problems if a builder's source tree is in a directory
2850# whose full name contains unusual characters.
2851ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2852ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2853ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2854
2855
2856# Make sure we can run config.sub.
2857$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2858 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2859
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2861$as_echo_n "checking build system type... " >&6; }
2862if ${ac_cv_build+:} false; then :
2863 $as_echo_n "(cached) " >&6
2864else
2865 ac_build_alias=$build_alias
2866test "x$ac_build_alias" = x &&
2867 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2868test "x$ac_build_alias" = x &&
2869 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2870ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2871 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2872
2873fi
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2875$as_echo "$ac_cv_build" >&6; }
2876case $ac_cv_build in
2877*-*-*) ;;
2878*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2879esac
2880build=$ac_cv_build
2881ac_save_IFS=$IFS; IFS='-'
2882set x $ac_cv_build
2883shift
2884build_cpu=$1
2885build_vendor=$2
2886shift; shift
2887# Remember, the first character of IFS is used to create $*,
2888# except with old shells:
2889build_os=$*
2890IFS=$ac_save_IFS
2891case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2892
2893
2894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2895$as_echo_n "checking host system type... " >&6; }
2896if ${ac_cv_host+:} false; then :
2897 $as_echo_n "(cached) " >&6
2898else
2899 if test "x$host_alias" = x; then
2900 ac_cv_host=$ac_cv_build
2901else
2902 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2903 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2904fi
2905
2906fi
2907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2908$as_echo "$ac_cv_host" >&6; }
2909case $ac_cv_host in
2910*-*-*) ;;
2911*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2912esac
2913host=$ac_cv_host
2914ac_save_IFS=$IFS; IFS='-'
2915set x $ac_cv_host
2916shift
2917host_cpu=$1
2918host_vendor=$2
2919shift; shift
2920# Remember, the first character of IFS is used to create $*,
2921# except with old shells:
2922host_os=$*
2923IFS=$ac_save_IFS
2924case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2925
2926
2927
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002928if test "$cross_compiling" = yes; then
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2930$as_echo_n "checking for python interpreter for cross build... " >&6; }
2931 if test -z "$PYTHON_FOR_BUILD"; then
2932 for interp in python$PACKAGE_VERSION python3 python; do
2933 which $interp >/dev/null 2>&1 || continue
2934 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2935 break
2936 fi
2937 interp=
2938 done
2939 if test x$interp = x; then
2940 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2941 fi
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2943$as_echo "$interp" >&6; }
doko@ubuntu.com7e6c2e22012-06-30 22:35:00 +02002944 PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002945 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002946elif test "$cross_compiling" = maybe; then
2947 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002948else
2949 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2950fi
2951
2952
Martin v. Löwis11437992002-04-12 09:54:03 +00002953
Benjamin Petersond23f8222009-04-05 19:13:16 +00002954if test "$prefix" != "/"; then
2955 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2956fi
2957
2958
Martin v. Löwis11437992002-04-12 09:54:03 +00002959
2960
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002961# We don't use PACKAGE_ variables, and they cause conflicts
2962# with other autoconf-based packages that include Python.h
2963grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2964rm confdefs.h
2965mv confdefs.h.new confdefs.h
2966
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002967
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002968VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002969
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002970# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002971
2972SOVERSION=1.0
2973
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002974# The later defininition of _XOPEN_SOURCE disables certain features
2975# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2976
Matthias Kloseb9621712010-04-24 17:59:49 +00002977$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002978
2979
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2981# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2982# them.
2983
Matthias Kloseb9621712010-04-24 17:59:49 +00002984$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002985
2986
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002987# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2988# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2989# them.
2990
Matthias Kloseb9621712010-04-24 17:59:49 +00002991$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002992
2993
Martin v. Löwisd6320502004-08-12 13:45:08 +00002994# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2995# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002998
2999
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003000# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3001# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3002# them.
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003005
3006
3007
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003008define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003009
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003010# Arguments passed to configure.
3011
3012CONFIG_ARGS="$ac_configure_args"
3013
Matthias Kloseb9621712010-04-24 17:59:49 +00003014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3015$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003017if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003018 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019 case $enableval in
3020 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003021 # Locate the best usable SDK, see Mac/README.txt for more
3022 # information
3023 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3024 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003025 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003026 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3027 if test ! -d "${enableval}"
3028 then
3029 enableval=/
3030 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003032 ;;
3033 esac
3034 case $enableval in
3035 no)
3036 UNIVERSALSDK=
3037 enable_universalsdk=
3038 ;;
3039 *)
3040 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 if test ! -d "${UNIVERSALSDK}"
3042 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003043 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045 ;;
3046 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003047
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049else
3050
3051 UNIVERSALSDK=
3052 enable_universalsdk=
3053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056if test -n "${UNIVERSALSDK}"
3057then
Matthias Kloseb9621712010-04-24 17:59:49 +00003058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3059$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060else
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3062$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003065
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003066
3067
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068# For backward compatibility reasons we prefer to select '32-bit' if available,
3069# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003070UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003071if test "`uname -s`" = "Darwin"
3072then
3073 if test -n "${UNIVERSALSDK}"
3074 then
3075 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3076 then
3077 UNIVERSAL_ARCHS="intel"
3078 fi
3079 fi
3080fi
3081
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3084$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003085
3086# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003087if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3090$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091 UNIVERSAL_ARCHS="$withval"
3092
3093else
3094
Ned Deilycbfb9a52012-06-23 16:02:19 -07003095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3096$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003097
3098fi
3099
3100
3101
3102
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003103
3104# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003105if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106 withval=$with_framework_name;
3107 PYTHONFRAMEWORK=${withval}
3108 PYTHONFRAMEWORKDIR=${withval}.framework
3109 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3110
3111else
3112
3113 PYTHONFRAMEWORK=Python
3114 PYTHONFRAMEWORKDIR=Python.framework
3115 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3116
3117fi
3118
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003120if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003121 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003122 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003123 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003124 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003125 esac
3126 case $enableval in
3127 no)
3128 PYTHONFRAMEWORK=
3129 PYTHONFRAMEWORKDIR=no-framework
3130 PYTHONFRAMEWORKPREFIX=
3131 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132 FRAMEWORKINSTALLFIRST=
3133 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 FRAMEWORKALTINSTALLFIRST=
3135 FRAMEWORKALTINSTALLLAST=
3136 if test "x${prefix}" = "xNONE"; then
3137 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3138 else
3139 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3140 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003141 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003142 ;;
3143 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003145 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003146 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003147 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003148 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3149 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003150 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003151
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003152 if test "x${prefix}" = "xNONE" ; then
3153 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003154
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003155 else
3156 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3157 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003158
3159 case "${enableval}" in
3160 /System*)
3161 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3162 if test "${prefix}" = "NONE" ; then
3163 # See below
3164 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3165 fi
3166 ;;
3167
3168 /Library*)
3169 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3170 ;;
3171
3172 */Library/Frameworks)
3173 MDIR="`dirname "${enableval}"`"
3174 MDIR="`dirname "${MDIR}"`"
3175 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3176
3177 if test "${prefix}" = "NONE"; then
3178 # User hasn't specified the
3179 # --prefix option, but wants to install
3180 # the framework in a non-default location,
3181 # ensure that the compatibility links get
3182 # installed relative to that prefix as well
3183 # instead of in /usr/local.
3184 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3185 fi
3186 ;;
3187
3188 *)
3189 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3190 ;;
3191 esac
3192
Jack Jansen127e56e2001-09-11 14:41:54 +00003193 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003195 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003199 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003201 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3202
3203 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3204
Jack Jansene578a632001-08-15 01:27:14 +00003205 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003206
Guido van Rossum563e7081996-09-10 18:20:48 +00003207else
Martin v. Löwis11437992002-04-12 09:54:03 +00003208
Jack Jansene578a632001-08-15 01:27:14 +00003209 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003210 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003211 PYTHONFRAMEWORKPREFIX=
3212 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003213 FRAMEWORKINSTALLFIRST=
3214 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003215 FRAMEWORKALTINSTALLFIRST=
3216 FRAMEWORKALTINSTALLLAST=
3217 if test "x${prefix}" = "xNONE" ; then
3218 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3219 else
3220 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3221 fi
Jack Jansene578a632001-08-15 01:27:14 +00003222 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003223
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225fi
3226
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
3228
Michael W. Hudson54241132001-12-07 15:38:26 +00003229
3230
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003234
3235
3236
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003237
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003238
Jack Jansene578a632001-08-15 01:27:14 +00003239##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003240## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003241## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003242##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243# Set name for machine-dependent library files
3244
Matthias Kloseb9621712010-04-24 17:59:49 +00003245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3246$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003247if test -z "$MACHDEP"
3248then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 # avoid using uname for cross builds
3250 if test "$cross_compiling" = yes; then
3251 # ac_sys_system and ac_sys_release are only used for setting
3252 # `define_xopen_source' in the case statement below. For the
3253 # current supported cross builds, this macro is not adjusted.
3254 case "$host" in
3255 *-*-linux*)
3256 ac_sys_system=Linux
3257 ;;
3258 *-*-cygwin*)
3259 ac_sys_system=Cygwin
3260 ;;
3261 *)
3262 # for now, limit cross builds to known configurations
3263 MACHDEP="unknown"
3264 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3265 esac
3266 ac_sys_release=
3267 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003268 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003269 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003270 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003273 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003274 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003275 fi
3276 ac_md_system=`echo $ac_sys_system |
3277 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3278 ac_md_release=`echo $ac_sys_release |
3279 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3280 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003281
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003283 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003284 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003285 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003286 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003287 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003288 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289fi
Guido van Rossum91922671997-10-09 20:24:13 +00003290
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003291
3292if test "$cross_compiling" = yes; then
3293 case "$host" in
3294 *-*-linux*)
3295 case "$host_cpu" in
3296 arm*)
3297 _host_cpu=arm
3298 ;;
3299 *)
3300 _host_cpu=$host_cpu
3301 esac
3302 ;;
3303 *-*-cygwin*)
3304 _host_cpu=
3305 ;;
3306 *)
3307 # for now, limit cross builds to known configurations
3308 MACHDEP="unknown"
3309 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3310 esac
3311 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3312fi
3313
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003314# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3315# disable features if it is defined, without any means to access these
3316# features as extensions. For these systems, we skip the definition of
3317# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3318# some feature, make sure there is no alternative way to access this
3319# feature. Also, when using wildcards, make sure you have verified the
3320# need for not defining _XOPEN_SOURCE on all systems matching the
3321# wildcard, and that the wildcard does not include future systems
3322# (which may remove their limitations).
3323case $ac_sys_system/$ac_sys_release in
3324 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3325 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003326 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003327 # In addition, Stefan Krah confirms that issue #1244610 exists through
3328 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003329 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003330 define_xopen_source=no
3331 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3332 # also defined. This can be overridden by defining _BSD_SOURCE
3333 # As this has a different meaning on Linux, only define it on OpenBSD
3334
Matthias Kloseb9621712010-04-24 17:59:49 +00003335$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003336
3337 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003338 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003339 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3340 # also defined. This can be overridden by defining _BSD_SOURCE
3341 # As this has a different meaning on Linux, only define it on OpenBSD
3342
Matthias Kloseb9621712010-04-24 17:59:49 +00003343$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003344
3345 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003346 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3347 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3348 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003349 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 +00003350 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003351 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3352 # request to enable features supported by the standard as a request
3353 # to disable features not supported by the standard. The best way
3354 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3355 # entirely and define __EXTENSIONS__ instead.
3356 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003357 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003358 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3359 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003360 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003361 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003362 define_xopen_source=no;;
3363 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003365 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003366 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003367 # On FreeBSD 4, the math functions C89 does not cover are never defined
3368 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3369 FreeBSD/4.*)
3370 define_xopen_source=no;;
3371 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3372 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3373 # identifies itself as Darwin/7.*
3374 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # disables platform specific features beyond repair.
3376 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3377 # has no effect, don't bother defining them
3378 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003379 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003380 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003381 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003382 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3383 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3384 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003385 AIX/4)
3386 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003387 AIX/5)
3388 if test `uname -r` -eq 1; then
3389 define_xopen_source=no
3390 fi
3391 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003392 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3393 # defining NI_NUMERICHOST.
3394 QNX/6.3.2)
3395 define_xopen_source=no
3396 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003397
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003398esac
3399
3400if test $define_xopen_source = yes
3401then
Victor Stinner14d098d2011-09-07 22:29:43 +02003402 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003403
Victor Stinner14d098d2011-09-07 22:29:43 +02003404$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003405
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003406
3407 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3408 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3409 # several APIs are not declared. Since this is also needed in some
3410 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
Matthias Kloseb9621712010-04-24 17:59:49 +00003412$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
3414
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003415
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003416$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003417
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003418fi
3419
Guido van Rossum91922671997-10-09 20:24:13 +00003420#
3421# SGI compilers allow the specification of the both the ABI and the
3422# ISA on the command line. Depending on the values of these switches,
3423# different and often incompatable code will be generated.
3424#
3425# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3426# thus supply support for various ABI/ISA combinations. The MACHDEP
3427# variable is also adjusted.
3428#
3429
3430if test ! -z "$SGI_ABI"
3431then
3432 CC="cc $SGI_ABI"
3433 LDFLAGS="$SGI_ABI $LDFLAGS"
3434 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3437$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003438
Jack Jansen6b08a402004-06-03 12:41:45 +00003439# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3440# it may influence the way we can build extensions, so distutils
3441# needs to check it
3442
Thomas Wouters477c8d52006-05-27 19:21:47 +00003443
Jack Jansen6b08a402004-06-03 12:41:45 +00003444CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003445EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003446
Guido van Rossum627b2d71993-12-24 10:39:16 +00003447# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003448
3449# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3450# for debug/optimization stuff. BASECFLAGS is for flags that are required
3451# just to get things to compile and link. Users are free to override OPT
3452# when running configure or make. The build should not break if they do.
3453# BASECFLAGS should generally not be messed with, however.
3454
3455# XXX shouldn't some/most/all of this code be merged with the stuff later
3456# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3458$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003461if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003462 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003463 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003464 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003465 without_gcc=yes;;
3466 yes) CC=gcc
3467 without_gcc=no;;
3468 *) CC=$withval
3469 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003470 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003471else
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003473 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003474 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003475 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003476 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003477 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478fi
3479
Matthias Kloseb9621712010-04-24 17:59:49 +00003480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3481$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003482
Guido van Rossum8b131c51995-03-09 14:10:13 +00003483# If the user switches compilers, we can't believe the cache
3484if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3485then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003486 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003487(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003488fi
3489
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003490# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3491# when the compiler supports them, but we don't always want -O2, and
3492# we set -g later.
3493if test -z "$CFLAGS"; then
3494 CFLAGS=
3495fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003496
3497if test "$ac_sys_system" = "Darwin"
3498then
3499 # Compiler selection on MacOSX is more complicated than
3500 # AC_PROG_CC can handle, see Mac/README.txt for more
3501 # information
3502 if test -z "${CC}"
3503 then
3504 found_gcc=
3505 found_clang=
3506 as_save_IFS=$IFS; IFS=:
3507 for as_dir in $PATH
3508 do
3509 IFS=$as_save_IFS
3510 if test -x $as_dir/gcc; then
3511 if test -z "${found_gcc}"; then
3512 found_gcc=$as_dir/gcc
3513 fi
3514 fi
3515 if test -x $as_dir/clang; then
3516 if test -z "${found_clang}"; then
3517 found_clang=$as_dir/clang
3518 fi
3519 fi
3520 done
3521 IFS=$as_save_IFS
3522
3523 if test -n "$found_gcc" -a -n "$found_clang"
3524 then
3525 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3526 then
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3528$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3529 CC="$found_clang"
3530 CXX="$found_clang++"
3531 fi
3532
3533
3534 elif test -z "$found_gcc" -a -n "$found_clang"
3535 then
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3537$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3538 CC="$found_clang"
3539 CXX="$found_clang++"
3540
3541 elif test -z "$found_gcc" -a -z "$found_clang"
3542 then
3543 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3544 if test -n "${found_clang}"
3545 then
3546 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3547$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3548 CC="${found_clang}"
3549 CXX="`/usr/bin/xcrun -find clang++`"
3550
3551 # else: use default behaviour
3552 fi
3553 fi
3554 fi
3555fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003556ac_ext=c
3557ac_cpp='$CPP $CPPFLAGS'
3558ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3559ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3560ac_compiler_gnu=$ac_cv_c_compiler_gnu
3561if test -n "$ac_tool_prefix"; then
3562 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3563set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3565$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003566if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003568else
3569 if test -n "$CC"; then
3570 ac_cv_prog_CC="$CC" # Let the user override the test.
3571else
Martin v. Löwis11437992002-04-12 09:54:03 +00003572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3573for as_dir in $PATH
3574do
3575 IFS=$as_save_IFS
3576 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003577 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 $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 +00003581 break 2
3582 fi
3583done
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003585IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003586
Jack Jansendd19cf82001-12-06 22:36:17 +00003587fi
3588fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003589CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003590if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3592$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003593else
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3595$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003596fi
3597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598
Martin v. Löwis11437992002-04-12 09:54:03 +00003599fi
3600if test -z "$ac_cv_prog_CC"; then
3601 ac_ct_CC=$CC
3602 # Extract the first word of "gcc", so it can be a program name with args.
3603set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3605$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003606if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003608else
3609 if test -n "$ac_ct_CC"; then
3610 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3611else
3612as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3613for as_dir in $PATH
3614do
3615 IFS=$as_save_IFS
3616 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003617 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003618 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 $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 +00003621 break 2
3622 fi
3623done
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003626
3627fi
3628fi
3629ac_ct_CC=$ac_cv_prog_ac_ct_CC
3630if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3632$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003633else
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3635$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003636fi
3637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638 if test "x$ac_ct_CC" = x; then
3639 CC=""
3640 else
3641 case $cross_compiling:$ac_tool_warned in
3642yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003643{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3644$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645ac_tool_warned=yes ;;
3646esac
3647 CC=$ac_ct_CC
3648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003649else
3650 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003651fi
3652
Jack Jansendd19cf82001-12-06 22:36:17 +00003653if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654 if test -n "$ac_tool_prefix"; then
3655 # 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 +00003656set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3658$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003659if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003661else
3662 if test -n "$CC"; then
3663 ac_cv_prog_CC="$CC" # Let the user override the test.
3664else
Martin v. Löwis11437992002-04-12 09:54:03 +00003665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3666for as_dir in $PATH
3667do
3668 IFS=$as_save_IFS
3669 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003671 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 $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 +00003674 break 2
3675 fi
3676done
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003678IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003679
3680fi
3681fi
3682CC=$ac_cv_prog_CC
3683if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3685$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003686else
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3688$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003689fi
3690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003691
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003693fi
3694if test -z "$CC"; then
3695 # Extract the first word of "cc", so it can be a program name with args.
3696set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3698$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003699if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003701else
3702 if test -n "$CC"; then
3703 ac_cv_prog_CC="$CC" # Let the user override the test.
3704else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003705 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3707for as_dir in $PATH
3708do
3709 IFS=$as_save_IFS
3710 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3714 ac_prog_rejected=yes
3715 continue
3716 fi
3717 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $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 +00003719 break 2
3720 fi
3721done
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003724
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003725if test $ac_prog_rejected = yes; then
3726 # We found a bogon in the path, so make sure we never use it.
3727 set dummy $ac_cv_prog_CC
3728 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730 # We chose a different compiler from the bogus one.
3731 # However, it has the same basename, so the bogon will be chosen
3732 # first if we set CC to just the basename; use the full file name.
3733 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003734 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735 fi
3736fi
3737fi
3738fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003739CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003740if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3742$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743else
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746fi
3747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
3750if test -z "$CC"; then
3751 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 do
3754 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3755set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3757$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003758if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003760else
3761 if test -n "$CC"; then
3762 ac_cv_prog_CC="$CC" # Let the user override the test.
3763else
Martin v. Löwis11437992002-04-12 09:54:03 +00003764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3765for as_dir in $PATH
3766do
3767 IFS=$as_save_IFS
3768 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $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 +00003773 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003774 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003775done
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
3779fi
3780fi
3781CC=$ac_cv_prog_CC
3782if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3784$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003785else
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3787$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003788fi
3789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 test -n "$CC" && break
3792 done
3793fi
3794if test -z "$CC"; then
3795 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003797do
3798 # Extract the first word of "$ac_prog", so it can be a program name with args.
3799set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3801$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003802if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003804else
3805 if test -n "$ac_ct_CC"; then
3806 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3807else
3808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809for as_dir in $PATH
3810do
3811 IFS=$as_save_IFS
3812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003815 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003817 break 2
3818 fi
3819done
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003822
Martin v. Löwis11437992002-04-12 09:54:03 +00003823fi
3824fi
3825ac_ct_CC=$ac_cv_prog_ac_ct_CC
3826if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3828$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829else
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3831$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 test -n "$ac_ct_CC" && break
3836done
Michael W. Hudson54241132001-12-07 15:38:26 +00003837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838 if test "x$ac_ct_CC" = x; then
3839 CC=""
3840 else
3841 case $cross_compiling:$ac_tool_warned in
3842yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003843{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3844$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845ac_tool_warned=yes ;;
3846esac
3847 CC=$ac_ct_CC
3848 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
3850
3851fi
3852
3853
Matthias Kloseb9621712010-04-24 17:59:49 +00003854test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003856as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003857See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003858
3859# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3861set X $ac_compile
3862ac_compiler=$2
3863for ac_option in --version -v -V -qversion; do
3864 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865case "(($ac_try" in
3866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3867 *) ac_try_echo=$ac_try;;
3868esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003869eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3870$as_echo "$ac_try_echo"; } >&5
3871 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003872 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 if test -s conftest.err; then
3874 sed '10a\
3875... rest of stderr output deleted ...
3876 10q' conftest.err >conftest.er1
3877 cat conftest.er1 >&5
3878 fi
3879 rm -f conftest.er1 conftest.err
3880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3881 test $ac_status = 0; }
3882done
Martin v. Löwis11437992002-04-12 09:54:03 +00003883
Matthias Kloseb9621712010-04-24 17:59:49 +00003884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003885/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003886
Martin v. Löwis11437992002-04-12 09:54:03 +00003887int
3888main ()
3889{
3890
3891 ;
3892 return 0;
3893}
3894_ACEOF
3895ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003896ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003897# Try to create an executable without -o first, disregard a.out.
3898# It will help us diagnose broken compilers, and finding out an intuition
3899# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3901$as_echo_n "checking whether the C compiler works... " >&6; }
3902ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3903
3904# The possible output files:
3905ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3906
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003907ac_rmfiles=
3908for ac_file in $ac_files
3909do
3910 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003911 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3913 esac
3914done
3915rm -f $ac_rmfiles
3916
Matthias Kloseb9621712010-04-24 17:59:49 +00003917if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918case "(($ac_try" in
3919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3920 *) ac_try_echo=$ac_try;;
3921esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3923$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003925 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003926 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3927 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3929# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3930# in a Makefile. We should not override ac_cv_exeext if it was cached,
3931# so that the user can short-circuit this test for compilers unknown to
3932# Autoconf.
3933for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003934do
3935 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003936 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003937 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003938 ;;
3939 [ab].out )
3940 # We found the default executable, but exeext='' is most
3941 # certainly right.
3942 break;;
3943 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003944 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 then :; else
3946 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3947 fi
3948 # We set ac_cv_exeext here because the later test for it is not
3949 # safe: cross compilers may not add the suffix if given an `-o'
3950 # argument, so we may need to know it at that point already.
3951 # Even if this section looks crufty: it has the advantage of
3952 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953 break;;
3954 * )
3955 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003956 esac
3957done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003958test "$ac_cv_exeext" = no && ac_cv_exeext=
3959
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003960else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 ac_file=''
3962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003963if test -z "$ac_file"; then :
3964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3965$as_echo "no" >&6; }
3966$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003967sed 's/^/| /' conftest.$ac_ext >&5
3968
Matthias Kloseb9621712010-04-24 17:59:49 +00003969{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003971as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003972See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003973else
3974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3975$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3978$as_echo_n "checking for C compiler default output file name... " >&6; }
3979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3980$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003981ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982
Matthias Kloseb9621712010-04-24 17:59:49 +00003983rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003984ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3986$as_echo_n "checking for suffix of executables... " >&6; }
3987if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988case "(($ac_try" in
3989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3990 *) ac_try_echo=$ac_try;;
3991esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003992eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3993$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003996 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3997 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3999# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4000# work properly (i.e., refer to `conftest.exe'), while it won't with
4001# `rm'.
4002for ac_file in conftest.exe conftest conftest.*; do
4003 test -f "$ac_file" || continue
4004 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004005 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004006 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4007 break;;
4008 * ) break;;
4009 esac
4010done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004011else
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4013$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004014as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004015See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004017rm -f conftest conftest$ac_cv_exeext
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4019$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020
4021rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004022EXEEXT=$ac_cv_exeext
4023ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4025/* end confdefs.h. */
4026#include <stdio.h>
4027int
4028main ()
4029{
4030FILE *f = fopen ("conftest.out", "w");
4031 return ferror (f) || fclose (f) != 0;
4032
4033 ;
4034 return 0;
4035}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004037ac_clean_files="$ac_clean_files conftest.out"
4038# Check that the compiler produces executables we can run. If not, either
4039# the compiler is broken, or we cross compile.
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4041$as_echo_n "checking whether we are cross compiling... " >&6; }
4042if test "$cross_compiling" != yes; then
4043 { { ac_try="$ac_link"
4044case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
4048eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4049$as_echo "$ac_try_echo"; } >&5
4050 (eval "$ac_link") 2>&5
4051 ac_status=$?
4052 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4053 test $ac_status = 0; }
4054 if { ac_try='./conftest$ac_cv_exeext'
4055 { { case "(($ac_try" in
4056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4057 *) ac_try_echo=$ac_try;;
4058esac
4059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4060$as_echo "$ac_try_echo"; } >&5
4061 (eval "$ac_try") 2>&5
4062 ac_status=$?
4063 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4064 test $ac_status = 0; }; }; then
4065 cross_compiling=no
4066 else
4067 if test "$cross_compiling" = maybe; then
4068 cross_compiling=yes
4069 else
4070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004072as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004073If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004074See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 fi
4076 fi
4077fi
4078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4079$as_echo "$cross_compiling" >&6; }
4080
4081rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4082ac_clean_files=$ac_clean_files_save
4083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4084$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004085if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 $as_echo_n "(cached) " >&6
4087else
4088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004089/* end confdefs.h. */
4090
4091int
4092main ()
4093{
4094
4095 ;
4096 return 0;
4097}
4098_ACEOF
4099rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004100if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101case "(($ac_try" in
4102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4103 *) ac_try_echo=$ac_try;;
4104esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4106$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004107 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4110 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111 for ac_file in conftest.o conftest.obj conftest.*; do
4112 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004115 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4116 break;;
4117 esac
4118done
4119else
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004121sed 's/^/| /' conftest.$ac_ext >&5
4122
Matthias Kloseb9621712010-04-24 17:59:49 +00004123{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4124$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004125as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004126See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004127fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004128rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4131$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004132OBJEXT=$ac_cv_objext
4133ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4135$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004136if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004138else
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004141
Martin v. Löwis11437992002-04-12 09:54:03 +00004142int
4143main ()
4144{
4145#ifndef __GNUC__
4146 choke me
4147#endif
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004154 ac_compiler_gnu=yes
4155else
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004159ac_cv_c_compiler_gnu=$ac_compiler_gnu
4160
4161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4163$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4164if test $ac_compiler_gnu = yes; then
4165 GCC=yes
4166else
4167 GCC=
4168fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004169ac_test_CFLAGS=${CFLAGS+set}
4170ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4172$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004173if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004175else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 ac_save_c_werror_flag=$ac_c_werror_flag
4177 ac_c_werror_flag=yes
4178 ac_cv_prog_cc_g=no
4179 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004182
Martin v. Löwis11437992002-04-12 09:54:03 +00004183int
4184main ()
4185{
4186
4187 ;
4188 return 0;
4189}
4190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004191if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004192 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193else
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 CFLAGS=""
4195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196/* end confdefs.h. */
4197
4198int
4199main ()
4200{
4201
4202 ;
4203 return 0;
4204}
4205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004206if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207
Matthias Kloseb9621712010-04-24 17:59:49 +00004208else
4209 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212/* end confdefs.h. */
4213
4214int
4215main ()
4216{
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004222if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4230 ac_c_werror_flag=$ac_save_c_werror_flag
4231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4233$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004234if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004236elif test $ac_cv_prog_cc_g = yes; then
4237 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004238 CFLAGS="-g -O2"
4239 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004240 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241 fi
4242else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004243 if test "$GCC" = yes; then
4244 CFLAGS="-O2"
4245 else
4246 CFLAGS=
4247 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4250$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004251if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004252 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004253else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004255ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* end confdefs.h. */
4258#include <stdarg.h>
4259#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004260struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004261/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4262struct buf { int x; };
4263FILE * (*rcsopen) (struct buf *, struct stat *, int);
4264static char *e (p, i)
4265 char **p;
4266 int i;
4267{
4268 return p[i];
4269}
4270static char *f (char * (*g) (char **, int), char **p, ...)
4271{
4272 char *s;
4273 va_list v;
4274 va_start (v,p);
4275 s = g (p, va_arg (v,int));
4276 va_end (v);
4277 return s;
4278}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004279
4280/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4281 function prototypes and stuff, but not '\xHH' hex character constants.
4282 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004283 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004284 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4285 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004287int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4288
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4290 inside strings and character constants. */
4291#define FOO(x) 'x'
4292int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4293
Skip Montanaro6dead952003-09-25 14:50:04 +00004294int test (int i, double x);
4295struct s1 {int (*f) (int a);};
4296struct s2 {int (*f) (double a);};
4297int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4298int argc;
4299char **argv;
4300int
4301main ()
4302{
4303return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4304 ;
4305 return 0;
4306}
4307_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4309 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004310do
4311 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315rm -f core conftest.err conftest.$ac_objext
4316 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004317done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004319CC=$ac_save_CC
4320
4321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322# AC_CACHE_VAL
4323case "x$ac_cv_prog_cc_c89" in
4324 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4326$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4329$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004330 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4333$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004334esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004335if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004336
Matthias Kloseb9621712010-04-24 17:59:49 +00004337fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004338
Martin v. Löwis11437992002-04-12 09:54:03 +00004339ac_ext=c
4340ac_cpp='$CPP $CPPFLAGS'
4341ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4342ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4343ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004344
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004345
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004346
4347
Matthias Kloseb9621712010-04-24 17:59:49 +00004348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4349$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004352if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004353 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004354
4355 case $withval in
4356 no) with_cxx_main=no
4357 MAINCC='$(CC)';;
4358 yes) with_cxx_main=yes
4359 MAINCC='$(CXX)';;
4360 *) with_cxx_main=yes
4361 MAINCC=$withval
4362 if test -z "$CXX"
4363 then
4364 CXX=$withval
4365 fi;;
4366 esac
4367else
4368
4369 with_cxx_main=no
4370 MAINCC='$(CC)'
4371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004372fi
4373
Matthias Kloseb9621712010-04-24 17:59:49 +00004374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4375$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004376
4377preset_cxx="$CXX"
4378if test -z "$CXX"
4379then
4380 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004381 gcc) if test -n "$ac_tool_prefix"; then
4382 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4383set dummy ${ac_tool_prefix}g++; ac_word=$2
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4385$as_echo_n "checking for $ac_word... " >&6; }
4386if ${ac_cv_path_CXX+:} false; then :
4387 $as_echo_n "(cached) " >&6
4388else
4389 case $CXX in
4390 [\\/]* | ?:[\\/]*)
4391 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4392 ;;
4393 *)
4394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4395for as_dir in notfound
4396do
4397 IFS=$as_save_IFS
4398 test -z "$as_dir" && as_dir=.
4399 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004401 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4403 break 2
4404 fi
4405done
4406 done
4407IFS=$as_save_IFS
4408
4409 ;;
4410esac
4411fi
4412CXX=$ac_cv_path_CXX
4413if test -n "$CXX"; then
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4415$as_echo "$CXX" >&6; }
4416else
4417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4418$as_echo "no" >&6; }
4419fi
4420
4421
4422fi
4423if test -z "$ac_cv_path_CXX"; then
4424 ac_pt_CXX=$CXX
4425 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004426set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4428$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004429if ${ac_cv_path_ac_pt_CXX+:} false; then :
4430 $as_echo_n "(cached) " >&6
4431else
4432 case $ac_pt_CXX in
4433 [\\/]* | ?:[\\/]*)
4434 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4435 ;;
4436 *)
4437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4438for as_dir in notfound
4439do
4440 IFS=$as_save_IFS
4441 test -z "$as_dir" && as_dir=.
4442 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004444 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4446 break 2
4447 fi
4448done
4449 done
4450IFS=$as_save_IFS
4451
4452 ;;
4453esac
4454fi
4455ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4456if test -n "$ac_pt_CXX"; then
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4458$as_echo "$ac_pt_CXX" >&6; }
4459else
4460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4461$as_echo "no" >&6; }
4462fi
4463
4464 if test "x$ac_pt_CXX" = x; then
4465 CXX="g++"
4466 else
4467 case $cross_compiling:$ac_tool_warned in
4468yes:)
4469{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4470$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4471ac_tool_warned=yes ;;
4472esac
4473 CXX=$ac_pt_CXX
4474 fi
4475else
4476 CXX="$ac_cv_path_CXX"
4477fi
4478 ;;
4479 cc) if test -n "$ac_tool_prefix"; then
4480 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4481set dummy ${ac_tool_prefix}c++; ac_word=$2
4482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4483$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004484if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004485 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004486else
4487 case $CXX in
4488 [\\/]* | ?:[\\/]*)
4489 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4490 ;;
4491 *)
4492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4493for as_dir in notfound
4494do
4495 IFS=$as_save_IFS
4496 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004497 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004498 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004499 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004501 break 2
4502 fi
4503done
Matthias Kloseb9621712010-04-24 17:59:49 +00004504 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004505IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004506
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004507 ;;
4508esac
4509fi
4510CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004511if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4513$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004514else
Matthias Kloseb9621712010-04-24 17:59:49 +00004515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4516$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004518
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004519
4520fi
4521if test -z "$ac_cv_path_CXX"; then
4522 ac_pt_CXX=$CXX
4523 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004524set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4526$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004527if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004528 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004529else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004530 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004531 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004532 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 +00004533 ;;
4534 *)
4535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4536for as_dir in notfound
4537do
4538 IFS=$as_save_IFS
4539 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004540 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004541 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004542 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004543 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004544 break 2
4545 fi
4546done
Matthias Kloseb9621712010-04-24 17:59:49 +00004547 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004548IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004549
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550 ;;
4551esac
4552fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004553ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4554if test -n "$ac_pt_CXX"; then
4555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4556$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004557else
Matthias Kloseb9621712010-04-24 17:59:49 +00004558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4559$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004561
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004562 if test "x$ac_pt_CXX" = x; then
4563 CXX="c++"
4564 else
4565 case $cross_compiling:$ac_tool_warned in
4566yes:)
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4568$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4569ac_tool_warned=yes ;;
4570esac
4571 CXX=$ac_pt_CXX
4572 fi
4573else
4574 CXX="$ac_cv_path_CXX"
4575fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004576 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004577 clang|*/clang) if test -n "$ac_tool_prefix"; then
4578 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4579set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4581$as_echo_n "checking for $ac_word... " >&6; }
4582if ${ac_cv_path_CXX+:} false; then :
4583 $as_echo_n "(cached) " >&6
4584else
4585 case $CXX in
4586 [\\/]* | ?:[\\/]*)
4587 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4588 ;;
4589 *)
4590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4591for as_dir in notfound
4592do
4593 IFS=$as_save_IFS
4594 test -z "$as_dir" && as_dir=.
4595 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004597 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4599 break 2
4600 fi
4601done
4602 done
4603IFS=$as_save_IFS
4604
Ned Deilycbfb9a52012-06-23 16:02:19 -07004605 ;;
4606esac
4607fi
4608CXX=$ac_cv_path_CXX
4609if test -n "$CXX"; then
4610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4611$as_echo "$CXX" >&6; }
4612else
4613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4614$as_echo "no" >&6; }
4615fi
4616
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004617
4618fi
4619if test -z "$ac_cv_path_CXX"; then
4620 ac_pt_CXX=$CXX
4621 # Extract the first word of "clang++", so it can be a program name with args.
4622set dummy clang++; ac_word=$2
4623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4624$as_echo_n "checking for $ac_word... " >&6; }
4625if ${ac_cv_path_ac_pt_CXX+:} false; then :
4626 $as_echo_n "(cached) " >&6
4627else
4628 case $ac_pt_CXX in
4629 [\\/]* | ?:[\\/]*)
4630 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4631 ;;
4632 *)
4633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4634for as_dir in notfound
4635do
4636 IFS=$as_save_IFS
4637 test -z "$as_dir" && as_dir=.
4638 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004640 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4642 break 2
4643 fi
4644done
4645 done
4646IFS=$as_save_IFS
4647
4648 ;;
4649esac
4650fi
4651ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4652if test -n "$ac_pt_CXX"; then
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4654$as_echo "$ac_pt_CXX" >&6; }
4655else
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
4658fi
4659
4660 if test "x$ac_pt_CXX" = x; then
4661 CXX="clang++"
4662 else
4663 case $cross_compiling:$ac_tool_warned in
4664yes:)
4665{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4666$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4667ac_tool_warned=yes ;;
4668esac
4669 CXX=$ac_pt_CXX
4670 fi
4671else
4672 CXX="$ac_cv_path_CXX"
4673fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004674 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004675 esac
4676 if test "$CXX" = "notfound"
4677 then
4678 CXX=""
4679 fi
4680fi
4681if test -z "$CXX"
4682then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004683 if test -n "$ac_tool_prefix"; then
4684 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4685 do
4686 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4687set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4689$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004690if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004691 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004692else
4693 if test -n "$CXX"; then
4694 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4695else
4696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in $PATH
4698do
4699 IFS=$as_save_IFS
4700 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004703 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004705 break 2
4706 fi
4707done
Matthias Kloseb9621712010-04-24 17:59:49 +00004708 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004709IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004710
4711fi
4712fi
4713CXX=$ac_cv_prog_CXX
4714if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4716$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004717else
Matthias Kloseb9621712010-04-24 17:59:49 +00004718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4719$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004720fi
4721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004722
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004723 test -n "$CXX" && break
4724 done
4725fi
4726if test -z "$CXX"; then
4727 ac_ct_CXX=$CXX
4728 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4729do
4730 # Extract the first word of "$ac_prog", so it can be a program name with args.
4731set dummy $ac_prog; ac_word=$2
4732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733$as_echo_n "checking for $ac_word... " >&6; }
4734if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4735 $as_echo_n "(cached) " >&6
4736else
4737 if test -n "$ac_ct_CXX"; then
4738 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4739else
4740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in $PATH
4742do
4743 IFS=$as_save_IFS
4744 test -z "$as_dir" && as_dir=.
4745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004747 ac_cv_prog_ac_ct_CXX="$ac_prog"
4748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4749 break 2
4750 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004751done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004752 done
4753IFS=$as_save_IFS
4754
4755fi
4756fi
4757ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4758if test -n "$ac_ct_CXX"; then
4759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4760$as_echo "$ac_ct_CXX" >&6; }
4761else
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4763$as_echo "no" >&6; }
4764fi
4765
4766
4767 test -n "$ac_ct_CXX" && break
4768done
4769
4770 if test "x$ac_ct_CXX" = x; then
4771 CXX="notfound"
4772 else
4773 case $cross_compiling:$ac_tool_warned in
4774yes:)
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4776$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4777ac_tool_warned=yes ;;
4778esac
4779 CXX=$ac_ct_CXX
4780 fi
4781fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782
4783 if test "$CXX" = "notfound"
4784 then
4785 CXX=""
4786 fi
4787fi
4788if test "$preset_cxx" != "$CXX"
4789then
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791
4792 By default, distutils will build C++ extension modules with \"$CXX\".
4793 If this is not intended, then set CXX on the configure command line.
4794 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004795$as_echo "$as_me: 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 " >&2;}
4800fi
4801
4802
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4804$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4805save_LDFLAGS="$LDFLAGS"
4806LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004807
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4809/* end confdefs.h. */
4810
4811int
4812main ()
4813{
4814
4815 ;
4816 return 0;
4817}
4818_ACEOF
4819if ac_fn_c_try_link "$LINENO"; then :
4820 NO_AS_NEEDED="-Wl,--no-as-needed"
4821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4822$as_echo "yes" >&6; }
4823else
4824 NO_AS_NEEDED=""
4825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4826$as_echo "no" >&6; }
4827fi
4828rm -f core conftest.err conftest.$ac_objext \
4829 conftest$ac_exeext conftest.$ac_ext
4830LDFLAGS="$save_LDFLAGS"
4831
4832
4833
4834# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004835ac_ext=c
4836ac_cpp='$CPP $CPPFLAGS'
4837ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4838ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4839ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4841$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004842# On Suns, sometimes $CPP names a directory.
4843if test -n "$CPP" && test -d "$CPP"; then
4844 CPP=
4845fi
4846if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004847 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004848 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004849else
Martin v. Löwis11437992002-04-12 09:54:03 +00004850 # Double quotes because CPP needs to be expanded
4851 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4852 do
4853 ac_preproc_ok=false
4854for ac_c_preproc_warn_flag in '' yes
4855do
4856 # Use a header file that comes with gcc, so configuring glibc
4857 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004858 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4859 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004860 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004861 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004863/* end confdefs.h. */
4864#ifdef __STDC__
4865# include <limits.h>
4866#else
4867# include <assert.h>
4868#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004869 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004871if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004872
Matthias Kloseb9621712010-04-24 17:59:49 +00004873else
Martin v. Löwis11437992002-04-12 09:54:03 +00004874 # Broken: fails on valid input.
4875continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004876fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004877rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004879 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004880 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004883#include <ac_nonexistent.h>
4884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004885if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004886 # Broken: success on invalid input.
4887continue
4888else
Martin v. Löwis11437992002-04-12 09:54:03 +00004889 # Passes both tests.
4890ac_preproc_ok=:
4891break
4892fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004893rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004894
4895done
4896# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004897rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004898if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004899 break
4900fi
4901
4902 done
4903 ac_cv_prog_CPP=$CPP
4904
4905fi
4906 CPP=$ac_cv_prog_CPP
4907else
4908 ac_cv_prog_CPP=$CPP
4909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4911$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004912ac_preproc_ok=false
4913for ac_c_preproc_warn_flag in '' yes
4914do
4915 # Use a header file that comes with gcc, so configuring glibc
4916 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004917 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4918 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004919 # On the NeXT, cc -E runs the code through the compiler's parser,
4920 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004922/* end confdefs.h. */
4923#ifdef __STDC__
4924# include <limits.h>
4925#else
4926# include <assert.h>
4927#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004928 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004930if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004931
Matthias Kloseb9621712010-04-24 17:59:49 +00004932else
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 # Broken: fails on valid input.
4934continue
4935fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004936rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004938 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004939 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004942#include <ac_nonexistent.h>
4943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004944if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004945 # Broken: success on invalid input.
4946continue
4947else
Martin v. Löwis11437992002-04-12 09:54:03 +00004948 # Passes both tests.
4949ac_preproc_ok=:
4950break
4951fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004952rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004953
4954done
4955# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004956rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004957if $ac_preproc_ok; then :
4958
Martin v. Löwis11437992002-04-12 09:54:03 +00004959else
Matthias Kloseb9621712010-04-24 17:59:49 +00004960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004962as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004963See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004964fi
4965
4966ac_ext=c
4967ac_cpp='$CPP $CPPFLAGS'
4968ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4969ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4970ac_compiler_gnu=$ac_cv_c_compiler_gnu
4971
4972
Matthias Kloseb9621712010-04-24 17:59:49 +00004973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4974$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004975if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004977else
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004979 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004980 # Loop through the user's path and test for each of PROGNAME-LIST
4981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004982for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4983do
4984 IFS=$as_save_IFS
4985 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004986 for ac_prog in grep ggrep; do
4987 for ac_exec_ext in '' $ac_executable_extensions; do
4988 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004989 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004990# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004991 # Check for GNU $ac_path_GREP
4992case `"$ac_path_GREP" --version 2>&1` in
4993*GNU*)
4994 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4995*)
4996 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004997 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004998 while :
4999 do
5000 cat "conftest.in" "conftest.in" >"conftest.tmp"
5001 mv "conftest.tmp" "conftest.in"
5002 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005003 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005004 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5005 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005006 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005007 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5008 # Best one so far, save it but keep looking for a better one
5009 ac_cv_path_GREP="$ac_path_GREP"
5010 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005011 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005012 # 10*(2^10) chars as input seems more than enough
5013 test $ac_count -gt 10 && break
5014 done
5015 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5016esac
5017
Matthias Kloseb9621712010-04-24 17:59:49 +00005018 $ac_path_GREP_found && break 3
5019 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005020 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005022IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005024 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 +00005025 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026else
5027 ac_cv_path_GREP=$GREP
5028fi
5029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5032$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005033 GREP="$ac_cv_path_GREP"
5034
5035
Matthias Kloseb9621712010-04-24 17:59:49 +00005036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5037$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005038if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005040else
5041 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5042 then ac_cv_path_EGREP="$GREP -E"
5043 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005045 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 # Loop through the user's path and test for each of PROGNAME-LIST
5047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5049do
5050 IFS=$as_save_IFS
5051 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 for ac_prog in egrep; do
5053 for ac_exec_ext in '' $ac_executable_extensions; do
5054 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005055 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005056# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005057 # Check for GNU $ac_path_EGREP
5058case `"$ac_path_EGREP" --version 2>&1` in
5059*GNU*)
5060 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5061*)
5062 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005063 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064 while :
5065 do
5066 cat "conftest.in" "conftest.in" >"conftest.tmp"
5067 mv "conftest.tmp" "conftest.in"
5068 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005069 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005070 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5071 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5074 # Best one so far, save it but keep looking for a better one
5075 ac_cv_path_EGREP="$ac_path_EGREP"
5076 ac_path_EGREP_max=$ac_count
5077 fi
5078 # 10*(2^10) chars as input seems more than enough
5079 test $ac_count -gt 10 && break
5080 done
5081 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5082esac
5083
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 $ac_path_EGREP_found && break 3
5085 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005086 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005088IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005090 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 +00005091 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005092else
5093 ac_cv_path_EGREP=$EGREP
5094fi
5095
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005096 fi
5097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5099$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005100 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005101
5102
Matthias Kloseb9621712010-04-24 17:59:49 +00005103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5104$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005105if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 $as_echo_n "(cached) " >&6
5107else
5108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005109/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005110#include <stdlib.h>
5111#include <stdarg.h>
5112#include <string.h>
5113#include <float.h>
5114
5115int
5116main ()
5117{
5118
5119 ;
5120 return 0;
5121}
5122_ACEOF
5123if ac_fn_c_try_compile "$LINENO"; then :
5124 ac_cv_header_stdc=yes
5125else
5126 ac_cv_header_stdc=no
5127fi
5128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5129
5130if test $ac_cv_header_stdc = yes; then
5131 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5133/* end confdefs.h. */
5134#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005135
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005136_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005138 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005139
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005140else
Matthias Kloseb9621712010-04-24 17:59:49 +00005141 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005142fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005143rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005144
Matthias Kloseb9621712010-04-24 17:59:49 +00005145fi
5146
5147if test $ac_cv_header_stdc = yes; then
5148 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5150/* end confdefs.h. */
5151#include <stdlib.h>
5152
5153_ACEOF
5154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5155 $EGREP "free" >/dev/null 2>&1; then :
5156
5157else
5158 ac_cv_header_stdc=no
5159fi
5160rm -f conftest*
5161
5162fi
5163
5164if test $ac_cv_header_stdc = yes; then
5165 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5166 if test "$cross_compiling" = yes; then :
5167 :
5168else
5169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5170/* end confdefs.h. */
5171#include <ctype.h>
5172#include <stdlib.h>
5173#if ((' ' & 0x0FF) == 0x020)
5174# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5175# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5176#else
5177# define ISLOWER(c) \
5178 (('a' <= (c) && (c) <= 'i') \
5179 || ('j' <= (c) && (c) <= 'r') \
5180 || ('s' <= (c) && (c) <= 'z'))
5181# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5182#endif
5183
5184#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5185int
5186main ()
5187{
5188 int i;
5189 for (i = 0; i < 256; i++)
5190 if (XOR (islower (i), ISLOWER (i))
5191 || toupper (i) != TOUPPER (i))
5192 return 2;
5193 return 0;
5194}
5195_ACEOF
5196if ac_fn_c_try_run "$LINENO"; then :
5197
5198else
5199 ac_cv_header_stdc=no
5200fi
5201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5202 conftest.$ac_objext conftest.beam conftest.$ac_ext
5203fi
5204
5205fi
5206fi
5207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5208$as_echo "$ac_cv_header_stdc" >&6; }
5209if test $ac_cv_header_stdc = yes; then
5210
5211$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5212
5213fi
5214
5215# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5216for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5217 inttypes.h stdint.h unistd.h
5218do :
5219 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5220ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5221"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005222if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005223 cat >>confdefs.h <<_ACEOF
5224#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5225_ACEOF
5226
5227fi
5228
5229done
5230
5231
5232
5233 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 +02005234if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005235 MINIX=yes
5236else
5237 MINIX=
5238fi
5239
5240
5241 if test "$MINIX" = yes; then
5242
5243$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5244
5245
5246$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5247
5248
5249$as_echo "#define _MINIX 1" >>confdefs.h
5250
5251 fi
5252
5253
5254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5255$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005256if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005257 $as_echo_n "(cached) " >&6
5258else
5259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5260/* end confdefs.h. */
5261
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005262# define __EXTENSIONS__ 1
5263 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005264int
5265main ()
5266{
5267
5268 ;
5269 return 0;
5270}
5271_ACEOF
5272if ac_fn_c_try_compile "$LINENO"; then :
5273 ac_cv_safe_to_define___extensions__=yes
5274else
5275 ac_cv_safe_to_define___extensions__=no
5276fi
5277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5278fi
5279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5280$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5281 test $ac_cv_safe_to_define___extensions__ = yes &&
5282 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5283
5284 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5285
5286 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5287
5288 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5289
5290 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5291
5292
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005294# Check for unsupported systems
5295case $ac_sys_system/$ac_sys_release in
5296atheos*|Linux*/1*)
5297 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5298 echo See README for details.
5299 exit 1;;
5300esac
5301
5302
Matthias Kloseb9621712010-04-24 17:59:49 +00005303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5304$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305
5306# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005307if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308 withval=$with_suffix;
5309 case $withval in
5310 no) EXEEXT=;;
5311 yes) EXEEXT=.exe;;
5312 *) EXEEXT=$withval;;
5313 esac
5314fi
5315
Matthias Kloseb9621712010-04-24 17:59:49 +00005316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5317$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318
5319# Test whether we're running on a non-case-sensitive system, in which
5320# case we give a warning if no ext is given
5321
Matthias Kloseb9621712010-04-24 17:59:49 +00005322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5323$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324if test ! -d CaseSensitiveTestDir; then
5325mkdir CaseSensitiveTestDir
5326fi
5327
5328if test -d casesensitivetestdir
5329then
Matthias Kloseb9621712010-04-24 17:59:49 +00005330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5331$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332 BUILDEXEEXT=.exe
5333else
Matthias Kloseb9621712010-04-24 17:59:49 +00005334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005336 BUILDEXEEXT=$EXEEXT
5337fi
5338rmdir CaseSensitiveTestDir
5339
5340case $MACHDEP in
5341bsdos*)
5342 case $CC in
5343 gcc) CC="$CC -D_HAVE_BSDI";;
5344 esac;;
5345esac
5346
5347case $ac_sys_system in
5348hp*|HP*)
5349 case $CC in
5350 cc|*/cc) CC="$CC -Ae";;
5351 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352esac
5353
5354
5355
Matthias Kloseb9621712010-04-24 17:59:49 +00005356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5357$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358if test -z "$LIBRARY"
5359then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005360 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5363$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364
5365# LDLIBRARY is the name of the library to link against (as opposed to the
5366# name of the library into which to insert object files). BLDLIBRARY is also
5367# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5368# is blank as the main program is not linked directly against LDLIBRARY.
5369# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5370# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5371# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5372# DLLLIBRARY is the shared (i.e., DLL) library.
5373#
5374# RUNSHARED is used to run shared python without installed libraries
5375#
5376# INSTSONAME is the name of the shared library that will be use to install
5377# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005378#
5379# LDVERSION is the shared library version number, normally the Python version
5380# with the ABI build flags appended.
5381
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005382
5383
5384
5385
5386
5387
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005388
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389LDLIBRARY="$LIBRARY"
5390BLDLIBRARY='$(LDLIBRARY)'
5391INSTSONAME='$(LDLIBRARY)'
5392DLLLIBRARY=''
5393LDLIBRARYDIR=''
5394RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005395LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396
5397# LINKCC is the command that links the python executable -- default is $(CC).
5398# If CXX is set, and if it is needed to link a main function that was
5399# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5400# python might then depend on the C++ runtime
5401# This is altered for AIX in order to build the export list before
5402# linking.
5403
Matthias Kloseb9621712010-04-24 17:59:49 +00005404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5405$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406if test -z "$LINKCC"
5407then
5408 LINKCC='$(PURIFY) $(MAINCC)'
5409 case $ac_sys_system in
5410 AIX*)
5411 exp_extra="\"\""
5412 if test $ac_sys_release -ge 5 -o \
5413 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5414 exp_extra="."
5415 fi
5416 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417 QNX*)
5418 # qcc must be used because the other compilers do not
5419 # support -N.
5420 LINKCC=qcc;;
5421 esac
5422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5424$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425
5426# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5427# make sure we default having it set to "no": this is used by
5428# distutils.unixccompiler to know if it should add --enable-new-dtags
5429# to linker command lines, and failing to detect GNU ld simply results
5430# in the same bahaviour as before.
5431
Matthias Kloseb9621712010-04-24 17:59:49 +00005432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5433$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434ac_prog=ld
5435if test "$GCC" = yes; then
5436 ac_prog=`$CC -print-prog-name=ld`
5437fi
5438case `"$ac_prog" -V 2>&1 < /dev/null` in
5439 *GNU*)
5440 GNULD=yes;;
5441 *)
5442 GNULD=no;;
5443esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5445$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5448$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005449if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005450 $as_echo_n "(cached) " >&6
5451else
5452 ac_cv_c_inline=no
5453for ac_kw in inline __inline__ __inline; do
5454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5455/* end confdefs.h. */
5456#ifndef __cplusplus
5457typedef int foo_t;
5458static $ac_kw foo_t static_foo () {return 0; }
5459$ac_kw foo_t foo () {return 0; }
5460#endif
5461
5462_ACEOF
5463if ac_fn_c_try_compile "$LINENO"; then :
5464 ac_cv_c_inline=$ac_kw
5465fi
5466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5467 test "$ac_cv_c_inline" != no && break
5468done
5469
5470fi
5471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5472$as_echo "$ac_cv_c_inline" >&6; }
5473
5474case $ac_cv_c_inline in
5475 inline | yes) ;;
5476 *)
5477 case $ac_cv_c_inline in
5478 no) ac_val=;;
5479 *) ac_val=$ac_cv_c_inline;;
5480 esac
5481 cat >>confdefs.h <<_ACEOF
5482#ifndef __cplusplus
5483#define inline $ac_val
5484#endif
5485_ACEOF
5486 ;;
5487esac
5488
5489if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005490
5491$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005492
5493
5494fi
5495
5496
Matthias Kloseb9621712010-04-24 17:59:49 +00005497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5498$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005500if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005501 enableval=$enable_shared;
5502fi
5503
5504
5505if test -z "$enable_shared"
5506then
5507 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005508 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509 enable_shared="yes";;
5510 *)
5511 enable_shared="no";;
5512 esac
5513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5515$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516
Matthias Kloseb9621712010-04-24 17:59:49 +00005517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5518$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005519# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005520if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005521 enableval=$enable_profiling;
5522fi
5523
5524if test "x$enable_profiling" = xyes; then
5525 ac_save_cc="$CC"
5526 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528/* end confdefs.h. */
5529int main() { return 0; }
5530_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005531if ac_fn_c_try_link "$LINENO"; then :
5532
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005534 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005535fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005536rm -f core conftest.err conftest.$ac_objext \
5537 conftest$ac_exeext conftest.$ac_ext
5538 CC="$ac_save_cc"
5539else
5540 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5543$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544
doko@ubuntu.comba015832012-06-30 16:52:05 +02005545if test "x$enable_profiling" = xyes; then
5546 BASECFLAGS="-pg $BASECFLAGS"
5547 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548fi
5549
Matthias Kloseb9621712010-04-24 17:59:49 +00005550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5551$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552
5553# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5554# library that we build, but we do not want to link against it (we
5555# will find it with a -framework option). For this reason there is an
5556# extra variable BLDLIBRARY against which Python and the extension
5557# modules are linked, BLDLIBRARY. This is normally the same as
5558# LDLIBRARY, but empty for MacOSX framework builds.
5559if test "$enable_framework"
5560then
5561 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5562 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5563 BLDLIBRARY=''
5564else
5565 BLDLIBRARY='$(LDLIBRARY)'
5566fi
5567
5568# Other platforms follow
5569if test $enable_shared = "yes"; then
5570
Matthias Kloseb9621712010-04-24 17:59:49 +00005571$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005572
5573 case $ac_sys_system in
5574 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005575 LDLIBRARY='libpython$(LDVERSION).dll.a'
5576 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005577 ;;
5578 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005579 LDLIBRARY='libpython$(LDVERSION).so'
5580 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5582 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005583 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005584 then
5585 PY3LIBRARY=libpython3.so
5586 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005588 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005589 LDLIBRARY='libpython$(LDVERSION).so'
5590 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5592 case $ac_sys_system in
5593 FreeBSD*)
5594 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5595 ;;
5596 esac
5597 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005598 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005599 then
5600 PY3LIBRARY=libpython3.so
5601 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602 ;;
5603 hp*|HP*)
5604 case `uname -m` in
5605 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005606 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 ;;
5608 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005609 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610 ;;
5611 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005612 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5614 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005615 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005616 LDLIBRARY='libpython$(LDVERSION).dylib'
5617 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5619 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005620 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005621 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005622 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5623 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624
5625 esac
5626else # shared is disabled
5627 case $ac_sys_system in
5628 CYGWIN*)
5629 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631 ;;
5632 esac
5633fi
5634
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005635if test "$cross_compiling" = yes; then
5636 RUNSHARED=
5637fi
5638
Matthias Kloseb9621712010-04-24 17:59:49 +00005639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5640$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641
5642if test -n "$ac_tool_prefix"; then
5643 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5644set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5646$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005647if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005648 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649else
5650 if test -n "$RANLIB"; then
5651 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5652else
5653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5654for as_dir in $PATH
5655do
5656 IFS=$as_save_IFS
5657 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005658 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 break 2
5663 fi
5664done
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666IFS=$as_save_IFS
5667
5668fi
5669fi
5670RANLIB=$ac_cv_prog_RANLIB
5671if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5673$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674else
Matthias Kloseb9621712010-04-24 17:59:49 +00005675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677fi
5678
5679
5680fi
5681if test -z "$ac_cv_prog_RANLIB"; then
5682 ac_ct_RANLIB=$RANLIB
5683 # Extract the first word of "ranlib", so it can be a program name with args.
5684set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5686$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005687if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689else
5690 if test -n "$ac_ct_RANLIB"; then
5691 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5692else
5693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5694for as_dir in $PATH
5695do
5696 IFS=$as_save_IFS
5697 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005698 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702 break 2
5703 fi
5704done
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706IFS=$as_save_IFS
5707
5708fi
5709fi
5710ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5711if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5713$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714else
Matthias Kloseb9621712010-04-24 17:59:49 +00005715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5716$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717fi
5718
5719 if test "x$ac_ct_RANLIB" = x; then
5720 RANLIB=":"
5721 else
5722 case $cross_compiling:$ac_tool_warned in
5723yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005724{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5725$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726ac_tool_warned=yes ;;
5727esac
5728 RANLIB=$ac_ct_RANLIB
5729 fi
5730else
5731 RANLIB="$ac_cv_prog_RANLIB"
5732fi
5733
5734
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005735if test -n "$ac_tool_prefix"; then
5736 for ac_prog in ar aal
5737 do
5738 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5739set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5741$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005742if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005743 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744else
5745 if test -n "$AR"; then
5746 ac_cv_prog_AR="$AR" # Let the user override the test.
5747else
5748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5749for as_dir in $PATH
5750do
5751 IFS=$as_save_IFS
5752 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005755 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005756 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757 break 2
5758 fi
5759done
Matthias Kloseb9621712010-04-24 17:59:49 +00005760 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761IFS=$as_save_IFS
5762
5763fi
5764fi
5765AR=$ac_cv_prog_AR
5766if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5768$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769else
Matthias Kloseb9621712010-04-24 17:59:49 +00005770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5771$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772fi
5773
5774
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005775 test -n "$AR" && break
5776 done
5777fi
5778if test -z "$AR"; then
5779 ac_ct_AR=$AR
5780 for ac_prog in ar aal
5781do
5782 # Extract the first word of "$ac_prog", so it can be a program name with args.
5783set dummy $ac_prog; ac_word=$2
5784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5785$as_echo_n "checking for $ac_word... " >&6; }
5786if ${ac_cv_prog_ac_ct_AR+:} false; then :
5787 $as_echo_n "(cached) " >&6
5788else
5789 if test -n "$ac_ct_AR"; then
5790 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5791else
5792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5793for as_dir in $PATH
5794do
5795 IFS=$as_save_IFS
5796 test -z "$as_dir" && as_dir=.
5797 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005799 ac_cv_prog_ac_ct_AR="$ac_prog"
5800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5801 break 2
5802 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005804 done
5805IFS=$as_save_IFS
5806
5807fi
5808fi
5809ac_ct_AR=$ac_cv_prog_ac_ct_AR
5810if test -n "$ac_ct_AR"; then
5811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5812$as_echo "$ac_ct_AR" >&6; }
5813else
5814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5815$as_echo "no" >&6; }
5816fi
5817
5818
5819 test -n "$ac_ct_AR" && break
5820done
5821
5822 if test "x$ac_ct_AR" = x; then
5823 AR="ar"
5824 else
5825 case $cross_compiling:$ac_tool_warned in
5826yes:)
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5828$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5829ac_tool_warned=yes ;;
5830esac
5831 AR=$ac_ct_AR
5832 fi
5833fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834
5835
5836# tweak ARFLAGS only if the user didn't set it on the command line
5837
5838if test -z "$ARFLAGS"
5839then
5840 ARFLAGS="rc"
5841fi
5842
doko@ubuntu.com58844492012-06-30 18:25:32 +02005843if test -n "$ac_tool_prefix"; then
5844 for ac_prog in readelf
5845 do
5846 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5847set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5849$as_echo_n "checking for $ac_word... " >&6; }
5850if ${ac_cv_prog_READELF+:} false; then :
5851 $as_echo_n "(cached) " >&6
5852else
5853 if test -n "$READELF"; then
5854 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5855else
5856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857for as_dir in $PATH
5858do
5859 IFS=$as_save_IFS
5860 test -z "$as_dir" && as_dir=.
5861 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005862 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005863 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5865 break 2
5866 fi
5867done
5868 done
5869IFS=$as_save_IFS
5870
5871fi
5872fi
5873READELF=$ac_cv_prog_READELF
5874if test -n "$READELF"; then
5875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5876$as_echo "$READELF" >&6; }
5877else
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5879$as_echo "no" >&6; }
5880fi
5881
5882
5883 test -n "$READELF" && break
5884 done
5885fi
5886if test -z "$READELF"; then
5887 ac_ct_READELF=$READELF
5888 for ac_prog in readelf
5889do
5890 # Extract the first word of "$ac_prog", so it can be a program name with args.
5891set dummy $ac_prog; ac_word=$2
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5893$as_echo_n "checking for $ac_word... " >&6; }
5894if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5895 $as_echo_n "(cached) " >&6
5896else
5897 if test -n "$ac_ct_READELF"; then
5898 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5899else
5900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5901for as_dir in $PATH
5902do
5903 IFS=$as_save_IFS
5904 test -z "$as_dir" && as_dir=.
5905 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005906 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005907 ac_cv_prog_ac_ct_READELF="$ac_prog"
5908 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5909 break 2
5910 fi
5911done
5912 done
5913IFS=$as_save_IFS
5914
5915fi
5916fi
5917ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5918if test -n "$ac_ct_READELF"; then
5919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5920$as_echo "$ac_ct_READELF" >&6; }
5921else
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5923$as_echo "no" >&6; }
5924fi
5925
5926
5927 test -n "$ac_ct_READELF" && break
5928done
5929
5930 if test "x$ac_ct_READELF" = x; then
5931 READELF=":"
5932 else
5933 case $cross_compiling:$ac_tool_warned in
5934yes:)
5935{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5936$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5937ac_tool_warned=yes ;;
5938esac
5939 READELF=$ac_ct_READELF
5940 fi
5941fi
5942
5943if test "$cross_compiling" = yes; then
5944 case "$READELF" in
5945 readelf|:)
5946 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5947 ;;
5948 esac
5949fi
5950
5951
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952
Matthias Klosec4c48422012-10-21 23:05:35 +02005953for ac_prog in python$PACKAGE_VERSION python3 python
5954do
5955 # Extract the first word of "$ac_prog", so it can be a program name with args.
5956set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5958$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005959if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005960 $as_echo_n "(cached) " >&6
5961else
Matthias Klosec4c48422012-10-21 23:05:35 +02005962 if test -n "$PYTHON"; then
5963 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005964else
5965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966for as_dir in $PATH
5967do
5968 IFS=$as_save_IFS
5969 test -z "$as_dir" && as_dir=.
5970 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005972 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5974 break 2
5975 fi
5976done
5977 done
5978IFS=$as_save_IFS
5979
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005980fi
5981fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005982PYTHON=$ac_cv_prog_PYTHON
5983if test -n "$PYTHON"; then
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5985$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005986else
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988$as_echo "no" >&6; }
5989fi
5990
5991
Matthias Klosec4c48422012-10-21 23:05:35 +02005992 test -n "$PYTHON" && break
5993done
5994test -n "$PYTHON" || PYTHON="not-found"
5995
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005996if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005997 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5998else
5999 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006000fi
6001
6002
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003case $MACHDEP in
6004bsdos*|hp*|HP*)
6005 # install -d does not work on BSDI or HP-UX
6006 if test -z "$INSTALL"
6007 then
6008 INSTALL="${srcdir}/install-sh -c"
6009 fi
6010esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011# Find a good install program. We prefer a C program (faster),
6012# so one script is as good as another. But avoid the broken or
6013# incompatible versions:
6014# SysV /etc/install, /usr/sbin/install
6015# SunOS /usr/etc/install
6016# IRIX /sbin/install
6017# AIX /bin/install
6018# AmigaOS /C/install, which installs bootblocks on floppy discs
6019# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6020# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6021# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6022# OS/2's system install, which has a completely different semantic
6023# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006024# Reject install programs that cannot install multiple files.
6025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6026$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006028if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030else
6031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6032for as_dir in $PATH
6033do
6034 IFS=$as_save_IFS
6035 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 # Account for people who put trailing slashes in PATH elements.
6037case $as_dir/ in #((
6038 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041 /usr/ucb/* ) ;;
6042 *)
6043 # OSF1 and SCO ODT 3.0 have their own names for install.
6044 # Don't use installbsd from OSF since it installs stuff as root
6045 # by default.
6046 for ac_prog in ginstall scoinst install; do
6047 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006048 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049 if test $ac_prog = install &&
6050 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6051 # AIX install. It has an incompatible calling convention.
6052 :
6053 elif test $ac_prog = install &&
6054 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6055 # program-specific install script used by HP pwplus--don't use.
6056 :
6057 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006058 rm -rf conftest.one conftest.two conftest.dir
6059 echo one > conftest.one
6060 echo two > conftest.two
6061 mkdir conftest.dir
6062 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6063 test -s conftest.one && test -s conftest.two &&
6064 test -s conftest.dir/conftest.one &&
6065 test -s conftest.dir/conftest.two
6066 then
6067 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6068 break 3
6069 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070 fi
6071 fi
6072 done
6073 done
6074 ;;
6075esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006076
6077 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078IFS=$as_save_IFS
6079
Matthias Kloseb9621712010-04-24 17:59:49 +00006080rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081
6082fi
6083 if test "${ac_cv_path_install+set}" = set; then
6084 INSTALL=$ac_cv_path_install
6085 else
6086 # As a last resort, use the slow shell script. Don't cache a
6087 # value for INSTALL within a source directory, because that will
6088 # break other packages using the cache if that directory is
6089 # removed, or if the value is a relative name.
6090 INSTALL=$ac_install_sh
6091 fi
6092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6094$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095
6096# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6097# It thinks the first close brace ends the variable substitution.
6098test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6099
6100test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6101
6102test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6103
Matthias Klose93a0ef12012-03-15 18:08:34 +01006104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6105$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6106if test -z "$MKDIR_P"; then
6107 if ${ac_cv_path_mkdir+:} false; then :
6108 $as_echo_n "(cached) " >&6
6109else
6110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6111for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6112do
6113 IFS=$as_save_IFS
6114 test -z "$as_dir" && as_dir=.
6115 for ac_prog in mkdir gmkdir; do
6116 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006117 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006118 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6119 'mkdir (GNU coreutils) '* | \
6120 'mkdir (coreutils) '* | \
6121 'mkdir (fileutils) '4.1*)
6122 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6123 break 3;;
6124 esac
6125 done
6126 done
6127 done
6128IFS=$as_save_IFS
6129
6130fi
6131
6132 test -d ./--version && rmdir ./--version
6133 if test "${ac_cv_path_mkdir+set}" = set; then
6134 MKDIR_P="$ac_cv_path_mkdir -p"
6135 else
6136 # As a last resort, use the slow shell script. Don't cache a
6137 # value for MKDIR_P within a source directory, because that will
6138 # break other packages using the cache if that directory is
6139 # removed, or if the value is a relative name.
6140 MKDIR_P="$ac_install_sh -d"
6141 fi
6142fi
6143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6144$as_echo "$MKDIR_P" >&6; }
6145
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146
6147# Not every filesystem supports hard links
6148
6149if test -z "$LN" ; then
6150 case $ac_sys_system in
6151 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152 *) LN=ln;;
6153 esac
6154fi
6155
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006156# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006157
6158ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006159
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6162$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163
6164# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006165if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166 withval=$with_pydebug;
6167if test "$withval" != no
6168then
6169
Matthias Kloseb9621712010-04-24 17:59:49 +00006170$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171
Matthias Kloseb9621712010-04-24 17:59:49 +00006172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6173$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006175 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006176else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6177$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006178fi
6179else
Matthias Kloseb9621712010-04-24 17:59:49 +00006180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6181$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182fi
6183
6184
6185# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6186# merged with this chunk of code?
6187
6188# Optimizer/debugger flags
6189# ------------------------
6190# (The following bit of code is complicated enough - please keep things
6191# indented properly. Just pretend you're editing Python code. ;-)
6192
6193# There are two parallel sets of case statements below, one that checks to
6194# see if OPT was set and one that does BASECFLAGS setting based upon
6195# compiler and platform. BASECFLAGS tweaks need to be made even if the
6196# user set OPT.
6197
6198# tweak OPT based on compiler and platform, only if the user didn't set
6199# it on the command line
6200
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006201if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202then
6203 case $GCC in
6204 yes)
6205 if test "$CC" != 'g++' ; then
6206 STRICT_PROTO="-Wstrict-prototypes"
6207 fi
6208 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6209 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6210 WRAP="-fwrapv"
6211 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006212
6213 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006214 case $CC in
6215 *clang*) WRAP="-fwrapv"
6216 ;;
6217 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006218
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219 case $ac_cv_prog_cc_g in
6220 yes)
6221 if test "$Py_DEBUG" = 'true' ; then
6222 # Optimization messes up debuggers, so turn it off for
6223 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006224 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225 else
6226 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6227 fi
6228 ;;
6229 *)
6230 OPT="-O3 -Wall $STRICT_PROTO"
6231 ;;
6232 esac
6233 case $ac_sys_system in
6234 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6235 ;;
6236 esac
6237 ;;
6238
6239 *)
6240 OPT="-O"
6241 ;;
6242 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006243fi
6244
6245
6246
6247# The -arch flags for universal builds on OSX
6248UNIVERSAL_ARCH_FLAGS=
6249
6250
6251# tweak BASECFLAGS based on compiler and platform
6252case $GCC in
6253yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006254 # Python doesn't violate C99 aliasing rules, but older versions of
6255 # GCC produce warnings for legal Python code. Enable
6256 # -fno-strict-aliasing on versions of GCC that support but produce
6257 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6259$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260 ac_save_cc="$CC"
6261 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006262 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006263 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006264 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006265else
Matthias Kloseb9621712010-04-24 17:59:49 +00006266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006268
Matthias Kloseb159a552010-04-25 21:00:44 +00006269
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006270int
6271main ()
6272{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006273
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006274 ;
6275 return 0;
6276}
Matthias Kloseb159a552010-04-25 21:00:44 +00006277
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006279if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006280
6281 CC="$ac_save_cc -fstrict-aliasing"
6282 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006284/* end confdefs.h. */
6285
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006286 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006287int
6288main ()
6289{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006290double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006291 ;
6292 return 0;
6293}
Matthias Kloseb159a552010-04-25 21:00:44 +00006294
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006296if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006297
6298 ac_cv_no_strict_aliasing=no
6299
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300else
Matthias Kloseb159a552010-04-25 21:00:44 +00006301
6302 ac_cv_no_strict_aliasing=yes
6303
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006304fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006306
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006307else
Matthias Kloseb159a552010-04-25 21:00:44 +00006308
6309 ac_cv_no_strict_aliasing=no
6310
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006313fi
6314
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006315 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6318$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006319 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 then
6321 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6322 fi
6323
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6325$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6326 ac_save_cc="$CC"
6327 CC="$CC -Wunused-result -Werror"
6328 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006329 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006330 $as_echo_n "(cached) " >&6
6331else
6332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6333/* end confdefs.h. */
6334
6335
6336int
6337main ()
6338{
6339
6340 ;
6341 return 0;
6342}
6343
6344_ACEOF
6345if ac_fn_c_try_compile "$LINENO"; then :
6346
6347 ac_cv_disable_unused_result_warning=yes
6348
6349else
6350
6351 ac_cv_disable_unused_result_warning=no
6352
6353fi
6354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6355fi
6356
6357 CFLAGS="$save_CFLAGS"
6358 CC="$ac_save_cc"
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6360$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6361
6362 if test $ac_cv_disable_unused_result_warning = yes
6363 then
6364 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6365 fi
6366
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006367 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6368 # support. Without this, treatment of subnormals doesn't follow
6369 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006370 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371 alpha*)
6372 BASECFLAGS="$BASECFLAGS -mieee"
6373 ;;
6374 esac
6375
6376 case $ac_sys_system in
6377 SCO_SV*)
6378 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6379 ;;
6380 # is there any other compiler on Darwin besides gcc?
6381 Darwin*)
6382 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6383 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006384 if test "${CC}" = gcc
6385 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6387$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006388 case "${UNIVERSALSDK}" in
6389 */MacOSX10.4u.sdk)
6390 # Build using 10.4 SDK, force usage of gcc when the
6391 # compiler is gcc, otherwise the user will get very
6392 # confusing error messages when building on OSX 10.6
6393 CC=gcc-4.0
6394 CPP=cpp-4.0
6395 ;;
6396 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6398$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006399 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006400
6401
6402 if test "${enable_universalsdk}"; then
6403 UNIVERSAL_ARCH_FLAGS=""
6404 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6405 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6406 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006407 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6409 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006410 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006411 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412
6413 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6414 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006415 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006416 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006418 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6419 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006420 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006421 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006422
6423 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6424 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006425 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006426 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006427
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006428 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006429 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 +00006430
6431 fi
6432
6433
Ronald Oussoren666028b2010-04-18 19:07:43 +00006434 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6435 if test "${UNIVERSALSDK}" != "/"
6436 then
6437 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6438 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006439 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006440 fi
6441 fi
6442
6443 # Calculate the right deployment target for this build.
6444 #
6445 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006446 if test ${cur_target} '>' 10.2 && \
6447 test ${cur_target} '<' 10.6
6448 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006449 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006450 if test ${enable_universalsdk}; then
6451 if test "${UNIVERSAL_ARCHS}" = "all"; then
6452 # Ensure that the default platform for a
6453 # 4-way universal build is OSX 10.5,
6454 # that's the first OS release where
6455 # 4-way builds make sense.
6456 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006457
6458 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6459 cur_target='10.5'
6460
6461 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6462 cur_target='10.5'
6463
6464 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6465 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006466 fi
6467 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006468 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006469 # On Intel macs default to a deployment
6470 # target of 10.4, that's the first OSX
6471 # release with Intel support.
6472 cur_target="10.4"
6473 fi
6474 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006475 fi
6476 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6477
6478 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6479 # environment with a value that is the same as what we'll use
6480 # in the Makefile to ensure that we'll get the same compiler
6481 # environment during configure and build time.
6482 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6483 export MACOSX_DEPLOYMENT_TARGET
6484 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6485
6486 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006487 esac
6488 ;;
6489
6490*)
6491 case $ac_sys_system in
6492 OpenUNIX*|UnixWare*)
6493 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6494 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006495 SCO_SV*)
6496 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6497 ;;
6498 esac
6499 ;;
6500esac
6501
6502if test "$Py_DEBUG" = 'true'; then
6503 :
6504else
6505 OPT="-DNDEBUG $OPT"
6506fi
6507
6508if test "$ac_arch_flags"
6509then
6510 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6511fi
6512
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513# Check whether GCC supports PyArg_ParseTuple format
6514if test "$GCC" = "yes"
6515then
Matthias Kloseb9621712010-04-24 17:59:49 +00006516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6517$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006518 save_CFLAGS=$CFLAGS
6519 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006521/* end confdefs.h. */
6522
6523 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524int
6525main ()
6526{
6527
6528 ;
6529 return 0;
6530}
Matthias Kloseb159a552010-04-25 21:00:44 +00006531
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006533if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006534
Matthias Kloseb159a552010-04-25 21:00:44 +00006535
Matthias Kloseb9621712010-04-24 17:59:49 +00006536$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006537
Matthias Kloseb159a552010-04-25 21:00:44 +00006538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006539$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006540
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006541else
Matthias Kloseb159a552010-04-25 21:00:44 +00006542
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006544$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545
6546fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6548 CFLAGS=$save_CFLAGS
6549fi
6550
6551# On some compilers, pthreads are available without further options
6552# (e.g. MacOS X). On some of these systems, the compiler will not
6553# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6554# So we have to see first whether pthreads are available without
6555# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6557$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006558if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006559 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006560else
Matthias Kloseb9621712010-04-24 17:59:49 +00006561 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006562 ac_cv_pthread_is_default=no
6563else
Matthias Kloseb9621712010-04-24 17:59:49 +00006564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006565/* end confdefs.h. */
6566
Stefan Krah7dba5942012-11-22 22:49:11 +01006567#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006568#include <pthread.h>
6569
6570void* routine(void* p){return NULL;}
6571
6572int main(){
6573 pthread_t p;
6574 if(pthread_create(&p,NULL,routine,NULL)!=0)
6575 return 1;
6576 (void)pthread_detach(p);
6577 return 0;
6578}
6579
6580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006581if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006582
6583 ac_cv_pthread_is_default=yes
6584 ac_cv_kthread=no
6585 ac_cv_pthread=no
6586
6587else
Matthias Kloseb9621712010-04-24 17:59:49 +00006588 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6591 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006592fi
6593
6594
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006595fi
6596
Matthias Kloseb9621712010-04-24 17:59:49 +00006597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6598$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006599
6600
6601if test $ac_cv_pthread_is_default = yes
6602then
6603 ac_cv_kpthread=no
6604else
6605# -Kpthread, if available, provides the right #defines
6606# and linker options to make pthread_create available
6607# Some compilers won't report that they do not support -Kpthread,
6608# so we need to run a program to see whether it really made the
6609# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6611$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006612if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006613 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006614else
6615 ac_save_cc="$CC"
6616CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006617if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006618 ac_cv_kpthread=no
6619else
Matthias Kloseb9621712010-04-24 17:59:49 +00006620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006621/* end confdefs.h. */
6622
Stefan Krah7dba5942012-11-22 22:49:11 +01006623#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006624#include <pthread.h>
6625
6626void* routine(void* p){return NULL;}
6627
6628int main(){
6629 pthread_t p;
6630 if(pthread_create(&p,NULL,routine,NULL)!=0)
6631 return 1;
6632 (void)pthread_detach(p);
6633 return 0;
6634}
6635
6636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006637if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006638 ac_cv_kpthread=yes
6639else
Matthias Kloseb9621712010-04-24 17:59:49 +00006640 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644fi
6645
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006646CC="$ac_save_cc"
6647fi
6648
Matthias Kloseb9621712010-04-24 17:59:49 +00006649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6650$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006651fi
6652
6653if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6654then
6655# -Kthread, if available, provides the right #defines
6656# and linker options to make pthread_create available
6657# Some compilers won't report that they do not support -Kthread,
6658# so we need to run a program to see whether it really made the
6659# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6661$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006662if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006663 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006664else
6665 ac_save_cc="$CC"
6666CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006667if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006668 ac_cv_kthread=no
6669else
Matthias Kloseb9621712010-04-24 17:59:49 +00006670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006671/* end confdefs.h. */
6672
Stefan Krah7dba5942012-11-22 22:49:11 +01006673#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006674#include <pthread.h>
6675
6676void* routine(void* p){return NULL;}
6677
6678int main(){
6679 pthread_t p;
6680 if(pthread_create(&p,NULL,routine,NULL)!=0)
6681 return 1;
6682 (void)pthread_detach(p);
6683 return 0;
6684}
6685
6686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006687if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688 ac_cv_kthread=yes
6689else
Matthias Kloseb9621712010-04-24 17:59:49 +00006690 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6693 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006694fi
6695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006696CC="$ac_save_cc"
6697fi
6698
Matthias Kloseb9621712010-04-24 17:59:49 +00006699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6700$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006701fi
6702
6703if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6704then
6705# -pthread, if available, provides the right #defines
6706# and linker options to make pthread_create available
6707# Some compilers won't report that they do not support -pthread,
6708# so we need to run a program to see whether it really made the
6709# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6711$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006712if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006713 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714else
6715 ac_save_cc="$CC"
6716CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006717if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006718 ac_cv_pthread=no
6719else
Matthias Kloseb9621712010-04-24 17:59:49 +00006720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006721/* end confdefs.h. */
6722
Stefan Krah7dba5942012-11-22 22:49:11 +01006723#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006724#include <pthread.h>
6725
6726void* routine(void* p){return NULL;}
6727
6728int main(){
6729 pthread_t p;
6730 if(pthread_create(&p,NULL,routine,NULL)!=0)
6731 return 1;
6732 (void)pthread_detach(p);
6733 return 0;
6734}
6735
6736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006737if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738 ac_cv_pthread=yes
6739else
Matthias Kloseb9621712010-04-24 17:59:49 +00006740 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6743 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006744fi
6745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746CC="$ac_save_cc"
6747fi
6748
Matthias Kloseb9621712010-04-24 17:59:49 +00006749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6750$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751fi
6752
6753# If we have set a CC compiler flag for thread support then
6754# check if it works for CXX, too.
6755ac_cv_cxx_thread=no
6756if test ! -z "$CXX"
6757then
Matthias Kloseb9621712010-04-24 17:59:49 +00006758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6759$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760ac_save_cxx="$CXX"
6761
6762if test "$ac_cv_kpthread" = "yes"
6763then
6764 CXX="$CXX -Kpthread"
6765 ac_cv_cxx_thread=yes
6766elif test "$ac_cv_kthread" = "yes"
6767then
6768 CXX="$CXX -Kthread"
6769 ac_cv_cxx_thread=yes
6770elif test "$ac_cv_pthread" = "yes"
6771then
6772 CXX="$CXX -pthread"
6773 ac_cv_cxx_thread=yes
6774fi
6775
6776if test $ac_cv_cxx_thread = yes
6777then
6778 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6779 $CXX -c conftest.$ac_ext 2>&5
6780 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6781 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6782 then
6783 ac_cv_cxx_thread=yes
6784 else
6785 ac_cv_cxx_thread=no
6786 fi
6787 rm -fr conftest*
6788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6790$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006791fi
6792CXX="$ac_save_cxx"
6793
6794
6795# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6797$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006798if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006799 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800else
Matthias Kloseb9621712010-04-24 17:59:49 +00006801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006802/* end confdefs.h. */
6803#include <stdlib.h>
6804#include <stdarg.h>
6805#include <string.h>
6806#include <float.h>
6807
6808int
6809main ()
6810{
6811
6812 ;
6813 return 0;
6814}
6815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006816if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817 ac_cv_header_stdc=yes
6818else
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006820fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6822
6823if test $ac_cv_header_stdc = yes; then
6824 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826/* end confdefs.h. */
6827#include <string.h>
6828
6829_ACEOF
6830if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 $EGREP "memchr" >/dev/null 2>&1; then :
6832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006833else
6834 ac_cv_header_stdc=no
6835fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006836rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837
6838fi
6839
6840if test $ac_cv_header_stdc = yes; then
6841 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843/* end confdefs.h. */
6844#include <stdlib.h>
6845
6846_ACEOF
6847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 $EGREP "free" >/dev/null 2>&1; then :
6849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006850else
6851 ac_cv_header_stdc=no
6852fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006853rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854
6855fi
6856
6857if test $ac_cv_header_stdc = yes; then
6858 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 :
6861else
Matthias Kloseb9621712010-04-24 17:59:49 +00006862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863/* end confdefs.h. */
6864#include <ctype.h>
6865#include <stdlib.h>
6866#if ((' ' & 0x0FF) == 0x020)
6867# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6868# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6869#else
6870# define ISLOWER(c) \
6871 (('a' <= (c) && (c) <= 'i') \
6872 || ('j' <= (c) && (c) <= 'r') \
6873 || ('s' <= (c) && (c) <= 'z'))
6874# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6875#endif
6876
6877#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6878int
6879main ()
6880{
6881 int i;
6882 for (i = 0; i < 256; i++)
6883 if (XOR (islower (i), ISLOWER (i))
6884 || toupper (i) != TOUPPER (i))
6885 return 2;
6886 return 0;
6887}
6888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006889if ac_fn_c_try_run "$LINENO"; then :
6890
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891else
Matthias Kloseb9621712010-04-24 17:59:49 +00006892 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896fi
6897
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006898fi
6899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6901$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902if test $ac_cv_header_stdc = yes; then
6903
Matthias Kloseb9621712010-04-24 17:59:49 +00006904$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905
6906fi
6907
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006908ac_save_cppflags="$CPPFLAGS"
6909CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006910for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006911fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006912ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006913sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006914unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006915poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006916sys/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 +01006917sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006918sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006919sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006920sys/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 -07006921libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006922bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006923do :
6924 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6925ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006926if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006927 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006928#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006929_ACEOF
6930
6931fi
6932
Guido van Rossum627b2d71993-12-24 10:39:16 +00006933done
6934
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006935CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006936ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006937for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6940$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006941if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006942 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006943else
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006945/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006946#include <sys/types.h>
6947#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006948
Martin v. Löwis11437992002-04-12 09:54:03 +00006949int
6950main ()
6951{
6952if ((DIR *) 0)
6953return 0;
6954 ;
6955 return 0;
6956}
6957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006959 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006960else
Matthias Kloseb9621712010-04-24 17:59:49 +00006961 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006965eval ac_res=\$$as_ac_Header
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6967$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006968if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006969 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006970#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006971_ACEOF
6972
6973ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006974fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006975
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006976done
6977# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6978if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6980$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006981if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006982 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006983else
Martin v. Löwis11437992002-04-12 09:54:03 +00006984 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006988/* Override any GCC internal prototype to avoid an error.
6989 Use char because int might match the return type of a GCC
6990 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006991#ifdef __cplusplus
6992extern "C"
6993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006994char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006995int
6996main ()
6997{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006998return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006999 ;
7000 return 0;
7001}
7002_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007003for ac_lib in '' dir; do
7004 if test -z "$ac_lib"; then
7005 ac_res="none required"
7006 else
7007 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007008 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007009 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007010 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007011 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007013rm -f core conftest.err conftest.$ac_objext \
7014 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007015 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007016 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018done
Victor Stinnere0be4232011-10-25 13:06:09 +02007019if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007021else
7022 ac_cv_search_opendir=no
7023fi
7024rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007025LIBS=$ac_func_search_save_LIBS
7026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7028$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007029ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007030if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007031 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007032
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007033fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007034
Michael W. Hudson54241132001-12-07 15:38:26 +00007035else
Matthias Kloseb9621712010-04-24 17:59:49 +00007036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7037$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007038if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007039 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007040else
7041 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007045/* Override any GCC internal prototype to avoid an error.
7046 Use char because int might match the return type of a GCC
7047 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007048#ifdef __cplusplus
7049extern "C"
7050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007051char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007052int
7053main ()
7054{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007055return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007056 ;
7057 return 0;
7058}
7059_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007060for ac_lib in '' x; do
7061 if test -z "$ac_lib"; then
7062 ac_res="none required"
7063 else
7064 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007065 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007067 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007070rm -f core conftest.err conftest.$ac_objext \
7071 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007072 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007073 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007075done
Victor Stinnere0be4232011-10-25 13:06:09 +02007076if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007077
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007078else
7079 ac_cv_search_opendir=no
7080fi
7081rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007082LIBS=$ac_func_search_save_LIBS
7083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7085$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007087if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007088 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007090fi
7091
7092fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007093
Matthias Kloseb9621712010-04-24 17:59:49 +00007094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7095$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007096if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007097 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007098else
Matthias Kloseb9621712010-04-24 17:59:49 +00007099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007100/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007101#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007102int
7103main ()
7104{
7105return makedev(0, 0);
7106 ;
7107 return 0;
7108}
7109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007110if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007111 ac_cv_header_sys_types_h_makedev=yes
7112else
Matthias Kloseb9621712010-04-24 17:59:49 +00007113 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007115rm -f core conftest.err conftest.$ac_objext \
7116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007117
7118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7120$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007121
7122if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007123ac_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 +02007124if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007125
Matthias Kloseb9621712010-04-24 17:59:49 +00007126$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007127
7128fi
7129
7130
7131
7132 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007133 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 +02007134if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007135
Matthias Kloseb9621712010-04-24 17:59:49 +00007136$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007137
7138fi
7139
7140
7141 fi
7142fi
7143
Michael W. Hudson54241132001-12-07 15:38:26 +00007144
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007145# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7146for ac_header in net/if.h
7147do :
7148 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7149#ifdef STDC_HEADERS
7150# include <stdlib.h>
7151# include <stddef.h>
7152#else
7153# ifdef HAVE_STDLIB_H
7154# include <stdlib.h>
7155# endif
7156#endif
7157#ifdef HAVE_SYS_SOCKET_H
7158# include <sys/socket.h>
7159#endif
7160
7161"
Victor Stinnere0be4232011-10-25 13:06:09 +02007162if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007163 cat >>confdefs.h <<_ACEOF
7164#define HAVE_NET_IF_H 1
7165_ACEOF
7166
7167fi
7168
7169done
7170
7171
7172
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007173# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007174for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007175do :
7176 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007177#ifdef HAVE_CURSES_H
7178#include <curses.h>
7179#endif
7180
Matthias Kloseb9621712010-04-24 17:59:49 +00007181"
Victor Stinnere0be4232011-10-25 13:06:09 +02007182if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007183 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007184#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007185_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007186
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007187fi
7188
7189done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007190
7191
Martin v. Löwis11017b12006-01-14 18:12:57 +00007192# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007193for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007194do :
7195 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 +00007196#ifdef HAVE_ASM_TYPES_H
7197#include <asm/types.h>
7198#endif
7199#ifdef HAVE_SYS_SOCKET_H
7200#include <sys/socket.h>
7201#endif
7202
Matthias Kloseb9621712010-04-24 17:59:49 +00007203"
Victor Stinnere0be4232011-10-25 13:06:09 +02007204if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007205 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007206#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007207_ACEOF
7208
7209fi
7210
7211done
7212
7213
Charles-François Natali47413c12011-10-06 19:47:44 +02007214# On Linux, can.h and can/raw.h require sys/socket.h
7215for ac_header in linux/can.h linux/can/raw.h
7216do :
7217 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7218ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7219#ifdef HAVE_SYS_SOCKET_H
7220#include <sys/socket.h>
7221#endif
7222
7223"
7224if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7225 cat >>confdefs.h <<_ACEOF
7226#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7227_ACEOF
7228
7229fi
7230
7231done
7232
7233
Guido van Rossum627b2d71993-12-24 10:39:16 +00007234# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007235was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7237$as_echo_n "checking for clock_t in time.h... " >&6; }
7238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007239/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007240#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007241
7242_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007243if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007244 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007245 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007246else
Martin v. Löwis11437992002-04-12 09:54:03 +00007247
7248
Matthias Kloseb9621712010-04-24 17:59:49 +00007249$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007250
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007251
Guido van Rossum627b2d71993-12-24 10:39:16 +00007252fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007253rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007254
Matthias Kloseb9621712010-04-24 17:59:49 +00007255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7256$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007257
Matthias Kloseb9621712010-04-24 17:59:49 +00007258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7259$as_echo_n "checking for makedev... " >&6; }
7260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007261/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007262
Jesus Cea740f53a2010-04-28 11:35:30 +00007263#if defined(MAJOR_IN_MKDEV)
7264#include <sys/mkdev.h>
7265#elif defined(MAJOR_IN_SYSMACROS)
7266#include <sys/sysmacros.h>
7267#else
7268#include <sys/types.h>
7269#endif
7270
Neal Norwitz11690112002-07-30 01:08:28 +00007271int
7272main ()
7273{
Jesus Cea740f53a2010-04-28 11:35:30 +00007274
7275 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007276 ;
7277 return 0;
7278}
Matthias Kloseb159a552010-04-25 21:00:44 +00007279
Neal Norwitz11690112002-07-30 01:08:28 +00007280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007281if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007282 ac_cv_has_makedev=yes
7283else
Matthias Kloseb9621712010-04-24 17:59:49 +00007284 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007285fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007286rm -f core conftest.err conftest.$ac_objext \
7287 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7289$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007290if test "$ac_cv_has_makedev" = "yes"; then
7291
Matthias Kloseb9621712010-04-24 17:59:49 +00007292$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007293
7294fi
7295
Martin v. Löwis399a6892002-10-04 10:22:02 +00007296# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7297# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7298# defined, but the compiler does not support pragma redefine_extname,
7299# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7300# structures (such as rlimit64) without declaring them. As a
7301# work-around, disable LFS on such configurations
7302
7303use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7305$as_echo_n "checking Solaris LFS bug... " >&6; }
7306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007307/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007308
7309#define _LARGEFILE_SOURCE 1
7310#define _FILE_OFFSET_BITS 64
7311#include <sys/resource.h>
7312
Martin v. Löwis399a6892002-10-04 10:22:02 +00007313int
7314main ()
7315{
7316struct rlimit foo;
7317 ;
7318 return 0;
7319}
7320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007322 sol_lfs_bug=no
7323else
Matthias Kloseb9621712010-04-24 17:59:49 +00007324 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7328$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007329if test "$sol_lfs_bug" = "yes"; then
7330 use_lfs=no
7331fi
7332
7333if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007334# Two defines needed to enable largefile support on various platforms
7335# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007336case $ac_sys_system/$ac_sys_release in
7337AIX*)
7338
7339$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7340
7341 ;;
7342esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007343
Matthias Kloseb9621712010-04-24 17:59:49 +00007344$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007345
7346
Matthias Kloseb9621712010-04-24 17:59:49 +00007347$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007348
Martin v. Löwis399a6892002-10-04 10:22:02 +00007349fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007350
Guido van Rossum84e7b241996-08-19 21:59:00 +00007351# Add some code to confdefs.h so that the test for off_t works on SCO
7352cat >> confdefs.h <<\EOF
7353#if defined(SCO_DS)
7354#undef _OFF_T
7355#endif
7356EOF
7357
Guido van Rossumef2255b2000-03-10 22:30:29 +00007358# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007359ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007360if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007361
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007362else
Martin v. Löwis11437992002-04-12 09:54:03 +00007363
7364cat >>confdefs.h <<_ACEOF
7365#define mode_t int
7366_ACEOF
7367
7368fi
7369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007371if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007372
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007373else
Martin v. Löwis11437992002-04-12 09:54:03 +00007374
7375cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007376#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007377_ACEOF
7378
7379fi
7380
Matthias Kloseb9621712010-04-24 17:59:49 +00007381ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007382if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007383
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007384else
Martin v. Löwis11437992002-04-12 09:54:03 +00007385
7386cat >>confdefs.h <<_ACEOF
7387#define pid_t int
7388_ACEOF
7389
7390fi
7391
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007392
Martin v. Löwis11437992002-04-12 09:54:03 +00007393cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007394#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007395_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007396
Matthias Kloseb9621712010-04-24 17:59:49 +00007397ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007398if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007399
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007400else
Martin v. Löwis11437992002-04-12 09:54:03 +00007401
7402cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007403#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007404_ACEOF
7405
7406fi
7407
Matthias Kloseb9621712010-04-24 17:59:49 +00007408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7409$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007410if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007411 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007412else
Matthias Kloseb9621712010-04-24 17:59:49 +00007413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007414/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007415#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007416
7417_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007419 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007420 ac_cv_type_uid_t=yes
7421else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007422 ac_cv_type_uid_t=no
7423fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007424rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007425
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7428$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007429if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007430
Matthias Kloseb9621712010-04-24 17:59:49 +00007431$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007432
7433
Matthias Kloseb9621712010-04-24 17:59:49 +00007434$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007435
7436fi
7437
Mark Dickinsonce31f662012-12-02 13:20:22 +00007438
7439# There are two separate checks for each of the exact-width integer types we
7440# need. First we check whether the type is available using the usual
7441# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7442# and <stdint.h> where available). We then also use the special type checks of
7443# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7444# directly, #define's uint32_t to be a suitable type.
7445
7446ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7447if test "x$ac_cv_type_uint32_t" = xyes; then :
7448
7449$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7450
7451fi
7452
Matthias Kloseb9621712010-04-24 17:59:49 +00007453ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7454case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007455 no|yes) ;; #(
7456 *)
7457
Matthias Kloseb9621712010-04-24 17:59:49 +00007458$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007459
7460
7461cat >>confdefs.h <<_ACEOF
7462#define uint32_t $ac_cv_c_uint32_t
7463_ACEOF
7464;;
7465 esac
7466
Mark Dickinsonce31f662012-12-02 13:20:22 +00007467
7468ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7469if test "x$ac_cv_type_uint64_t" = xyes; then :
7470
7471$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7472
7473fi
7474
Matthias Kloseb9621712010-04-24 17:59:49 +00007475ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7476case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007477 no|yes) ;; #(
7478 *)
7479
Matthias Kloseb9621712010-04-24 17:59:49 +00007480$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007481
7482
7483cat >>confdefs.h <<_ACEOF
7484#define uint64_t $ac_cv_c_uint64_t
7485_ACEOF
7486;;
7487 esac
7488
Mark Dickinsonce31f662012-12-02 13:20:22 +00007489
7490ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7491if test "x$ac_cv_type_int32_t" = xyes; then :
7492
7493$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7494
7495fi
7496
Matthias Kloseb9621712010-04-24 17:59:49 +00007497ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7498case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007499 no|yes) ;; #(
7500 *)
7501
7502cat >>confdefs.h <<_ACEOF
7503#define int32_t $ac_cv_c_int32_t
7504_ACEOF
7505;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007506esac
7507
Mark Dickinsonce31f662012-12-02 13:20:22 +00007508
7509ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7510if test "x$ac_cv_type_int64_t" = xyes; then :
7511
7512$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7513
7514fi
7515
Matthias Kloseb9621712010-04-24 17:59:49 +00007516ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7517case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007518 no|yes) ;; #(
7519 *)
7520
7521cat >>confdefs.h <<_ACEOF
7522#define int64_t $ac_cv_c_int64_t
7523_ACEOF
7524;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007525esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007526
Mark Dickinsonce31f662012-12-02 13:20:22 +00007527
Matthias Kloseb9621712010-04-24 17:59:49 +00007528ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007529if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007530
Matthias Kloseb9621712010-04-24 17:59:49 +00007531$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007532
7533fi
7534
Stefan Krah1919b7e2012-03-21 18:25:23 +01007535ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7536if test "x$ac_cv_type___uint128_t" = xyes; then :
7537
7538$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7539
7540fi
7541
Jack Jansendd19cf82001-12-06 22:36:17 +00007542
Michael W. Hudson54241132001-12-07 15:38:26 +00007543# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007544# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007545# The cast to long int works around a bug in the HP C Compiler
7546# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7547# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7548# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7550$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007551if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007552 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007553else
Matthias Kloseb9621712010-04-24 17:59:49 +00007554 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 +00007555
Martin v. Löwis11437992002-04-12 09:54:03 +00007556else
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 if test "$ac_cv_type_int" = yes; then
7558 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7559$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007560as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007561See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007562 else
7563 ac_cv_sizeof_int=0
7564 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007566
Martin v. Löwis11437992002-04-12 09:54:03 +00007567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7569$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007570
7571
7572
Martin v. Löwis11437992002-04-12 09:54:03 +00007573cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007574#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007575_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007576
7577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007578# The cast to long int works around a bug in the HP C Compiler
7579# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7580# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7581# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7583$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007584if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007586else
Matthias Kloseb9621712010-04-24 17:59:49 +00007587 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 +00007588
Martin v. Löwis11437992002-04-12 09:54:03 +00007589else
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 if test "$ac_cv_type_long" = yes; then
7591 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007593as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007594See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595 else
7596 ac_cv_sizeof_long=0
7597 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007599
Martin v. Löwis11437992002-04-12 09:54:03 +00007600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7602$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007603
7604
7605
Martin v. Löwis11437992002-04-12 09:54:03 +00007606cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007607#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007608_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007609
7610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611# The cast to long int works around a bug in the HP C Compiler
7612# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7613# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7614# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7616$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007617if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007619else
Matthias Kloseb9621712010-04-24 17:59:49 +00007620 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 +00007621
Martin v. Löwis11437992002-04-12 09:54:03 +00007622else
Matthias Kloseb9621712010-04-24 17:59:49 +00007623 if test "$ac_cv_type_void_p" = yes; then
7624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007626as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007627See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628 else
7629 ac_cv_sizeof_void_p=0
7630 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007632
Martin v. Löwis11437992002-04-12 09:54:03 +00007633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7635$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007636
7637
7638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007640#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007641_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007642
7643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007644# The cast to long int works around a bug in the HP C Compiler
7645# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7646# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7647# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7649$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007650if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007652else
Matthias Kloseb9621712010-04-24 17:59:49 +00007653 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 +00007654
Martin v. Löwis11437992002-04-12 09:54:03 +00007655else
Matthias Kloseb9621712010-04-24 17:59:49 +00007656 if test "$ac_cv_type_short" = yes; then
7657 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007659as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007660See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007661 else
7662 ac_cv_sizeof_short=0
7663 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007665
Martin v. Löwis11437992002-04-12 09:54:03 +00007666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7668$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669
7670
7671
Martin v. Löwis11437992002-04-12 09:54:03 +00007672cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007673#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007674_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007675
7676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007677# The cast to long int works around a bug in the HP C Compiler
7678# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7679# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7680# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7682$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007683if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007685else
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 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 +00007687
Martin v. Löwis11437992002-04-12 09:54:03 +00007688else
Matthias Kloseb9621712010-04-24 17:59:49 +00007689 if test "$ac_cv_type_float" = yes; then
7690 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007692as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007693See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007694 else
7695 ac_cv_sizeof_float=0
7696 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007698
Martin v. Löwis11437992002-04-12 09:54:03 +00007699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7701$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702
7703
7704
Martin v. Löwis11437992002-04-12 09:54:03 +00007705cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007706#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007707_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007708
7709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007710# The cast to long int works around a bug in the HP C Compiler
7711# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7712# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7713# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7715$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007716if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007717 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007718else
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 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 +00007720
Martin v. Löwis11437992002-04-12 09:54:03 +00007721else
Matthias Kloseb9621712010-04-24 17:59:49 +00007722 if test "$ac_cv_type_double" = yes; then
7723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007725as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007726See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007727 else
7728 ac_cv_sizeof_double=0
7729 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007731
Martin v. Löwis11437992002-04-12 09:54:03 +00007732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7734$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735
7736
7737
Martin v. Löwis11437992002-04-12 09:54:03 +00007738cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007739#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007740_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007741
7742
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007743# The cast to long int works around a bug in the HP C Compiler
7744# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7745# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7746# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7748$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007749if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007750 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007751else
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 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 +00007753
Martin v. Löwis11437992002-04-12 09:54:03 +00007754else
Matthias Kloseb9621712010-04-24 17:59:49 +00007755 if test "$ac_cv_type_fpos_t" = yes; then
7756 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7757$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007758as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007759See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760 else
7761 ac_cv_sizeof_fpos_t=0
7762 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007764
Martin v. Löwis11437992002-04-12 09:54:03 +00007765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7767$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768
7769
7770
Martin v. Löwis11437992002-04-12 09:54:03 +00007771cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007772#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007773_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007774
Michael W. Hudson54241132001-12-07 15:38:26 +00007775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776# The cast to long int works around a bug in the HP C Compiler
7777# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7778# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7779# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7781$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007782if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007784else
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 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 +00007786
Martin v. Löwis18e16552006-02-15 17:27:45 +00007787else
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 if test "$ac_cv_type_size_t" = yes; then
7789 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7790$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007791as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007792See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793 else
7794 ac_cv_sizeof_size_t=0
7795 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007797
Martin v. Löwis18e16552006-02-15 17:27:45 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7800$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801
7802
7803
Martin v. Löwis18e16552006-02-15 17:27:45 +00007804cat >>confdefs.h <<_ACEOF
7805#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7806_ACEOF
7807
7808
Christian Heimes400adb02008-02-01 08:12:03 +00007809# The cast to long int works around a bug in the HP C Compiler
7810# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7811# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7812# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7814$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007815if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007816 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007817else
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 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 +00007819
Christian Heimes400adb02008-02-01 08:12:03 +00007820else
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 if test "$ac_cv_type_pid_t" = yes; then
7822 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007824as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007825See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007826 else
7827 ac_cv_sizeof_pid_t=0
7828 fi
7829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007830
Christian Heimes400adb02008-02-01 08:12:03 +00007831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7833$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007834
7835
7836
7837cat >>confdefs.h <<_ACEOF
7838#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7839_ACEOF
7840
7841
Michael W. Hudson54241132001-12-07 15:38:26 +00007842
Matthias Kloseb9621712010-04-24 17:59:49 +00007843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7844$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007845have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007847/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007848
Martin v. Löwis11437992002-04-12 09:54:03 +00007849int
7850main ()
7851{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007852long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007853 ;
7854 return 0;
7855}
7856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007857if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007858
7859
Matthias Kloseb9621712010-04-24 17:59:49 +00007860$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007861
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007862 have_long_long=yes
7863
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7867$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007868if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869# The cast to long int works around a bug in the HP C Compiler
7870# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7871# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7872# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7874$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007875if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007876 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007877else
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 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 +00007879
Martin v. Löwis11437992002-04-12 09:54:03 +00007880else
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 if test "$ac_cv_type_long_long" = yes; then
7882 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007884as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007885See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886 else
7887 ac_cv_sizeof_long_long=0
7888 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007890
Martin v. Löwis11437992002-04-12 09:54:03 +00007891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7893$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894
7895
7896
Martin v. Löwis11437992002-04-12 09:54:03 +00007897cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007898#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007899_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007900
Michael W. Hudson54241132001-12-07 15:38:26 +00007901
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007902fi
7903
Matthias Kloseb9621712010-04-24 17:59:49 +00007904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7905$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007906have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007908/* end confdefs.h. */
7909
7910int
7911main ()
7912{
7913long double x; x = (long double)0;
7914 ;
7915 return 0;
7916}
7917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007918if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007919
7920
Matthias Kloseb9621712010-04-24 17:59:49 +00007921$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007922
7923 have_long_double=yes
7924
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007925fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7928$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007929if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007930# The cast to long int works around a bug in the HP C Compiler
7931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7933# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7935$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007936if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007938else
Matthias Kloseb9621712010-04-24 17:59:49 +00007939 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 +00007940
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007941else
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 if test "$ac_cv_type_long_double" = yes; then
7943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007945as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007946See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007947 else
7948 ac_cv_sizeof_long_double=0
7949 fi
7950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007951
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7954$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007955
7956
7957
7958cat >>confdefs.h <<_ACEOF
7959#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7960_ACEOF
7961
7962
7963fi
7964
7965
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7967$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007968have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007970/* end confdefs.h. */
7971
7972int
7973main ()
7974{
7975_Bool x; x = (_Bool)0;
7976 ;
7977 return 0;
7978}
7979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007980if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007981
7982
Matthias Kloseb9621712010-04-24 17:59:49 +00007983$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007984
7985 have_c99_bool=yes
7986
Thomas Woutersb2137042007-02-01 18:02:27 +00007987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7990$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007991if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992# The cast to long int works around a bug in the HP C Compiler
7993# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7994# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7995# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7997$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007998if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007999 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008000else
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 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 +00008002
Thomas Woutersb2137042007-02-01 18:02:27 +00008003else
Matthias Kloseb9621712010-04-24 17:59:49 +00008004 if test "$ac_cv_type__Bool" = yes; then
8005 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008007as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008008See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009 else
8010 ac_cv_sizeof__Bool=0
8011 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013
Thomas Woutersb2137042007-02-01 18:02:27 +00008014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8016$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017
8018
8019
Thomas Woutersb2137042007-02-01 18:02:27 +00008020cat >>confdefs.h <<_ACEOF
8021#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8022_ACEOF
8023
8024
8025fi
8026
Matthias Kloseb9621712010-04-24 17:59:49 +00008027ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008028 #include <stdint.h>
8029 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008030 #ifdef HAVE_INTTYPES_H
8031 #include <inttypes.h>
8032 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008033"
Victor Stinnere0be4232011-10-25 13:06:09 +02008034if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008035
8036cat >>confdefs.h <<_ACEOF
8037#define HAVE_UINTPTR_T 1
8038_ACEOF
8039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040# The cast to long int works around a bug in the HP C Compiler
8041# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8042# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8043# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8045$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008046if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008048else
Matthias Kloseb9621712010-04-24 17:59:49 +00008049 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 +00008050
Martin v. Löwis11437992002-04-12 09:54:03 +00008051else
Matthias Kloseb9621712010-04-24 17:59:49 +00008052 if test "$ac_cv_type_uintptr_t" = yes; then
8053 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008055as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008056See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057 else
8058 ac_cv_sizeof_uintptr_t=0
8059 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008061
Martin v. Löwis11437992002-04-12 09:54:03 +00008062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8064$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065
8066
8067
Martin v. Löwis11437992002-04-12 09:54:03 +00008068cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008069#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008070_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008071
Michael W. Hudson54241132001-12-07 15:38:26 +00008072
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008073fi
8074
Thomas Wouters89f507f2006-12-13 04:49:30 +00008075
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008076# The cast to long int works around a bug in the HP C Compiler
8077# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8078# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8079# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8081$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008082if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008084else
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008086#ifdef HAVE_SYS_TYPES_H
8087#include <sys/types.h>
8088#endif
8089
Matthias Kloseb9621712010-04-24 17:59:49 +00008090"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008091
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008092else
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 if test "$ac_cv_type_off_t" = yes; then
8094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008096as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008097See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008098 else
8099 ac_cv_sizeof_off_t=0
8100 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008102
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8105$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008107
8108
Martin v. Löwis11437992002-04-12 09:54:03 +00008109cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008110#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008111_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008112
Michael W. Hudson54241132001-12-07 15:38:26 +00008113
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008114
Matthias Kloseb9621712010-04-24 17:59:49 +00008115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8116$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008117if test "$have_long_long" = yes
8118then
8119if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008120 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008123
Matthias Kloseb9621712010-04-24 17:59:49 +00008124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8125$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008126else
Matthias Kloseb9621712010-04-24 17:59:49 +00008127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8128$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008129fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008130else
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8132$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008133fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008134
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008135# The cast to long int works around a bug in the HP C Compiler
8136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8138# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8140$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008141if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008143else
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008145#ifdef HAVE_SYS_TYPES_H
8146#include <sys/types.h>
8147#endif
8148#ifdef HAVE_TIME_H
8149#include <time.h>
8150#endif
8151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008154else
Matthias Kloseb9621712010-04-24 17:59:49 +00008155 if test "$ac_cv_type_time_t" = yes; then
8156 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008158as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008159See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008160 else
8161 ac_cv_sizeof_time_t=0
8162 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008164
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8167$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008168
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008169
8170
Martin v. Löwis11437992002-04-12 09:54:03 +00008171cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008172#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008173_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008174
Michael W. Hudson54241132001-12-07 15:38:26 +00008175
8176
Trent Mick635f6fb2000-08-23 21:33:05 +00008177# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008178ac_save_cc="$CC"
8179if test "$ac_cv_kpthread" = "yes"
8180then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008181elif test "$ac_cv_kthread" = "yes"
8182then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008183elif test "$ac_cv_pthread" = "yes"
8184then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008185fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008186
Matthias Kloseb9621712010-04-24 17:59:49 +00008187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8188$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008189have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008191/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008192
8193 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008194int
8195main ()
8196{
Guido van Rossum12580492000-09-24 16:47:19 +00008197pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008198 ;
8199 return 0;
8200}
Matthias Kloseb159a552010-04-25 21:00:44 +00008201
Martin v. Löwis11437992002-04-12 09:54:03 +00008202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008203if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008204 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8208$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008209if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008210 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8213# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8215$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008216if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008218else
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008220#ifdef HAVE_PTHREAD_H
8221#include <pthread.h>
8222#endif
8223
Matthias Kloseb9621712010-04-24 17:59:49 +00008224"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008226else
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 if test "$ac_cv_type_pthread_t" = yes; then
8228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008230as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008231See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008232 else
8233 ac_cv_sizeof_pthread_t=0
8234 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008236
Trent Mick635f6fb2000-08-23 21:33:05 +00008237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8239$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008241
8242
Martin v. Löwis11437992002-04-12 09:54:03 +00008243cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008244#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008245_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008246
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008247
Trent Mick635f6fb2000-08-23 21:33:05 +00008248fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008249CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008250
Michael W. Hudson54241132001-12-07 15:38:26 +00008251
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008252case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008253 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008254 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8255 ;;
8256 Darwin/*)
8257 OTHER_LIBTOOL_OPT=""
8258 ;;
8259esac
8260
8261
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008262ARCH_RUN_32BIT=""
8263
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008264case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008265 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008266 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8267 if test "${enable_universalsdk}"; then
8268 :
8269 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008270 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008271 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008272 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008273 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008274 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008275 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008276 if test ${gcc_version} '<' 4.0
8277 then
8278 LIBTOOL_CRUFT="-lcc_dynamic"
8279 else
8280 LIBTOOL_CRUFT=""
8281 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008283 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008284else
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008286/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008287
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008288 #include <unistd.h>
8289 int main(int argc, char*argv[])
8290 {
8291 if (sizeof(long) == 4) {
8292 return 0;
8293 } else {
8294 return 1;
8295 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008296 }
8297
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008299if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008300 ac_osx_32bit=yes
8301else
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008303fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8305 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008306fi
8307
8308
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008309 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008310 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008311 i386)
8312 MACOSX_DEFAULT_ARCH="i386"
8313 ;;
8314 ppc)
8315 MACOSX_DEFAULT_ARCH="ppc"
8316 ;;
8317 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008318 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008319 ;;
8320 esac
8321 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008322 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008323 i386)
8324 MACOSX_DEFAULT_ARCH="x86_64"
8325 ;;
8326 ppc)
8327 MACOSX_DEFAULT_ARCH="ppc64"
8328 ;;
8329 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008330 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008331 ;;
8332 esac
8333
8334 #ARCH_RUN_32BIT="true"
8335 fi
8336
8337 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008338 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008339 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008340esac
8341
Matthias Kloseb9621712010-04-24 17:59:49 +00008342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8343$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008344if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008345then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008346 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008347 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008348 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8353$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008354 if test $enable_shared = "yes"
8355 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008356 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 +00008357 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008358else
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8360$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008361fi
8362
Matthias Kloseb9621712010-04-24 17:59:49 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8364$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008365case $ac_sys_system/$ac_sys_release in
8366 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008367
Matthias Kloseb9621712010-04-24 17:59:49 +00008368$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008369
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8371$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008372 ;;
8373 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8375$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008376 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008377esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008378
Guido van Rossum0a516c91994-09-12 10:58:40 +00008379# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008380
Michael W. Hudson54241132001-12-07 15:38:26 +00008381
8382
8383
8384
Benjamin Peterson99f03762010-04-11 22:15:28 +00008385
Thomas Wouters477c8d52006-05-27 19:21:47 +00008386
Georg Brandlb1441c72009-01-03 22:33:39 +00008387
Thomas Wouters477c8d52006-05-27 19:21:47 +00008388cat >>confdefs.h <<_ACEOF
8389#define SHLIB_EXT "$SO"
8390_ACEOF
8391
Guido van Rossum0a516c91994-09-12 10:58:40 +00008392# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008393# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008394# (Shared libraries in this instance are shared modules to be loaded into
8395# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8397$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008398if test -z "$LDSHARED"
8399then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008400 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008401 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008402 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008403 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008404 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008405 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008406 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008407 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008408 if test "$GCC" = "yes" ; then
8409 LDSHARED='$(CC) -shared'
8410 LDCXXSHARED='$(CXX) -shared'
8411 else
8412 LDSHARED='$(CC) -G'
8413 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008414 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008415 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008416 if test "$GCC" = "yes" ; then
8417 LDSHARED='$(CC) -shared'
8418 LDCXXSHARED='$(CXX) -shared'
8419 else
8420 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008421 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008422 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008423 LDSHARED='$(CC) -bundle'
8424 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008425 if test "$enable_framework" ; then
8426 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008427 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8428 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008429 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008430 else
8431 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008432 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008433 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008434 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008435 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008436 LDSHARED='$(CC) -bundle'
8437 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008438 if test "$enable_framework" ; then
8439 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008440 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8441 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008442 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008443 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008444 # No framework, use the Python app as bundle-loader
8445 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008446 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008447 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008448 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008449 Darwin/*)
8450 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8451 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008452
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008453 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008454 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008455 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008456 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008457 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008458 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8459 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008460 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008461 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008462 LDSHARED='$(CC) -bundle'
8463 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008464 if test "$enable_framework" ; then
8465 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008466 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8467 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008468 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008469 else
8470 # No framework, use the Python app as bundle-loader
8471 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8472 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008473 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008474 fi
8475 fi
8476 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008477 Linux*|GNU*|QNX*)
8478 LDSHARED='$(CC) -shared'
8479 LDCXXSHARED='$(CXX) -shared';;
8480 BSD/OS*/4*)
8481 LDSHARED="gcc -shared"
8482 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008483 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008484 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008485 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008486 LDSHARED='$(CC) -shared'
8487 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008488 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008489 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008490 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008491 OpenBSD*)
8492 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8493 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008494 LDSHARED='$(CC) -shared $(CCSHARED)'
8495 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008496 else
8497 case `uname -r` in
8498 [01].* | 2.[0-7] | 2.[0-7].*)
8499 LDSHARED="ld -Bshareable ${LDFLAGS}"
8500 ;;
8501 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008502 LDSHARED='$(CC) -shared $(CCSHARED)'
8503 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008504 ;;
8505 esac
8506 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008507 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008508 LDSHARED='$(CC) -shared'
8509 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008510 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008511 if test "$GCC" = "yes" ; then
8512 LDSHARED='$(CC) -shared'
8513 LDCXXSHARED='$(CXX) -shared'
8514 else
8515 LDSHARED='$(CC) -G'
8516 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008517 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008518 SCO_SV*)
8519 LDSHARED='$(CC) -Wl,-G,-Bexport'
8520 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8521 CYGWIN*)
8522 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8523 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008524 *) LDSHARED="ld";;
8525 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8528$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008529LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008530BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008531# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008532# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8534$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008535if test -z "$CCSHARED"
8536then
Guido van Rossum07397971997-04-29 21:49:50 +00008537 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008538 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008539 then CCSHARED="-fPIC";
8540 elif test `uname -p` = sparc;
8541 then CCSHARED="-xcode=pic32";
8542 else CCSHARED="-Kpic";
8543 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008544 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008545 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008546 else CCSHARED="+z";
8547 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008548 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008549 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008550 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008551 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008552 if test "$GCC" = "yes"
8553 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008554 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008555 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008556 SCO_SV*)
8557 if test "$GCC" = "yes"
8558 then CCSHARED="-fPIC"
8559 else CCSHARED="-Kpic -belf"
8560 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008561 IRIX*/6*) case $CC in
8562 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008563 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008564 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008565 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8568$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008569# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008570# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8572$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008573if test -z "$LINKFORSHARED"
8574then
Guido van Rossum07397971997-04-29 21:49:50 +00008575 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008576 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008577 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008578 LINKFORSHARED="-Wl,-E -Wl,+s";;
8579# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008580 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008581 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008582 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008584 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008585 if test "$enable_framework"
8586 then
Jack Jansenda49e192005-01-07 13:08:22 +00008587 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008588 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008589 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008590 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008591 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008592 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008593 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008594 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8595 then
8596 LINKFORSHARED="-Wl,--export-dynamic"
8597 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008598 SunOS/5*) case $CC in
8599 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008600 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008601 then
8602 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008603 fi;;
8604 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008605 CYGWIN*)
8606 if test $enable_shared = "no"
8607 then
8608 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8609 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008610 QNX*)
8611 # -Wl,-E causes the symbols to be added to the dynamic
8612 # symbol table so that they can be found when a module
8613 # is loaded. -N 2048K causes the stack size to be set
8614 # to 2048 kilobytes so that the stack doesn't overflow
8615 # when running test_compile.py.
8616 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008617 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8620$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008621
Michael W. Hudson54241132001-12-07 15:38:26 +00008622
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008623
Matthias Kloseb9621712010-04-24 17:59:49 +00008624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8625$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008626if test ! "$LIBRARY" = "$LDLIBRARY"
8627then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008628 case $ac_sys_system in
8629 CYGWIN*)
8630 # Cygwin needs CCSHARED when building extension DLLs
8631 # but not when building the interpreter DLL.
8632 CFLAGSFORSHARED='';;
8633 *)
8634 CFLAGSFORSHARED='$(CCSHARED)'
8635 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8638$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008639
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008640# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8641# library (with --enable-shared).
8642# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008643# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8644# if it is not required, since it creates a dependency of the shared library
8645# to LIBS. This, in turn, means that applications linking the shared libpython
8646# don't need to link LIBS explicitly. The default should be only changed
8647# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008648
Matthias Kloseb9621712010-04-24 17:59:49 +00008649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8650$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008651case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008652 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008653 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008654esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8656$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008657
8658
Guido van Rossum627b2d71993-12-24 10:39:16 +00008659# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8661$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008662if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008663 $as_echo_n "(cached) " >&6
8664else
8665 ac_check_lib_save_LIBS=$LIBS
8666LIBS="-lsendfile $LIBS"
8667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8668/* end confdefs.h. */
8669
8670/* Override any GCC internal prototype to avoid an error.
8671 Use char because int might match the return type of a GCC
8672 builtin and then its argument prototype would still apply. */
8673#ifdef __cplusplus
8674extern "C"
8675#endif
8676char sendfile ();
8677int
8678main ()
8679{
8680return sendfile ();
8681 ;
8682 return 0;
8683}
8684_ACEOF
8685if ac_fn_c_try_link "$LINENO"; then :
8686 ac_cv_lib_sendfile_sendfile=yes
8687else
8688 ac_cv_lib_sendfile_sendfile=no
8689fi
8690rm -f core conftest.err conftest.$ac_objext \
8691 conftest$ac_exeext conftest.$ac_ext
8692LIBS=$ac_check_lib_save_LIBS
8693fi
8694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8695$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008696if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008697 cat >>confdefs.h <<_ACEOF
8698#define HAVE_LIBSENDFILE 1
8699_ACEOF
8700
8701 LIBS="-lsendfile $LIBS"
8702
8703fi
8704
Matthias Kloseb9621712010-04-24 17:59:49 +00008705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8706$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008707if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008708 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008709else
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008711LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008715/* Override any GCC internal prototype to avoid an error.
8716 Use char because int might match the return type of a GCC
8717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008718#ifdef __cplusplus
8719extern "C"
8720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008721char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008722int
8723main ()
8724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008725return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ;
8727 return 0;
8728}
8729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008730if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008732else
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008735rm -f core conftest.err conftest.$ac_objext \
8736 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008737LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8740$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008741if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008742 cat >>confdefs.h <<_ACEOF
8743#define HAVE_LIBDL 1
8744_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008745
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008746 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008747
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008748fi
8749 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8751$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008752if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008754else
Martin v. Löwis11437992002-04-12 09:54:03 +00008755 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008756LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008760/* Override any GCC internal prototype to avoid an error.
8761 Use char because int might match the return type of a GCC
8762 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008763#ifdef __cplusplus
8764extern "C"
8765#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008766char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008767int
8768main ()
8769{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008770return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008771 ;
8772 return 0;
8773}
8774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008775if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008777else
Matthias Kloseb9621712010-04-24 17:59:49 +00008778 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008780rm -f core conftest.err conftest.$ac_objext \
8781 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008782LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8785$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008786if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 cat >>confdefs.h <<_ACEOF
8788#define HAVE_LIBDLD 1
8789_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008790
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008791 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008792
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008793fi
8794 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008795
Georg Brandlb1441c72009-01-03 22:33:39 +00008796# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008797if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8799$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008800if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008802else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008803 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008807/* Override any GCC internal prototype to avoid an error.
8808 Use char because int might match the return type of a GCC
8809 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008810#ifdef __cplusplus
8811extern "C"
8812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008813char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008814int
8815main ()
8816{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 ;
8819 return 0;
8820}
8821_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822for ac_lib in '' pthread rt posix4; do
8823 if test -z "$ac_lib"; then
8824 ac_res="none required"
8825 else
8826 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008827 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008828 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008830 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008832rm -f core conftest.err conftest.$ac_objext \
8833 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008834 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008837done
Victor Stinnere0be4232011-10-25 13:06:09 +02008838if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008840else
8841 ac_cv_search_sem_init=no
8842fi
8843rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008844LIBS=$ac_func_search_save_LIBS
8845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8847$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008848ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008849if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008850 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008851
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008852fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008853 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008854 # posix4 on Solaris 2.6
8855 # pthread (first!) on Linux
8856fi
8857
Martin v. Löwis19d17342003-06-14 21:03:05 +00008858# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8860$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008861if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008863else
8864 ac_check_lib_save_LIBS=$LIBS
8865LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008867/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008869/* Override any GCC internal prototype to avoid an error.
8870 Use char because int might match the return type of a GCC
8871 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008872#ifdef __cplusplus
8873extern "C"
8874#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008875char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008876int
8877main ()
8878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008880 ;
8881 return 0;
8882}
8883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008884if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008885 ac_cv_lib_intl_textdomain=yes
8886else
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008889rm -f core conftest.err conftest.$ac_objext \
8890 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008891LIBS=$ac_check_lib_save_LIBS
8892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8894$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008895if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008896
Matthias Kloseb9621712010-04-24 17:59:49 +00008897$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008898
Brett Cannonc6d936e2009-06-07 20:09:53 +00008899 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008900fi
8901
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008902
8903# checks for system dependent C++ extensions support
8904case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008905 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8906$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008908/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008909
Georg Brandl59e87bd2011-02-15 19:48:59 +00008910 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008911int
8912main ()
8913{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008914loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008915 ;
8916 return 0;
8917}
Matthias Kloseb159a552010-04-25 21:00:44 +00008918
Martin v. Löwis11437992002-04-12 09:54:03 +00008919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008920if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008921
Matthias Kloseb159a552010-04-25 21:00:44 +00008922
Matthias Kloseb9621712010-04-24 17:59:49 +00008923$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008924
Matthias Kloseb159a552010-04-25 21:00:44 +00008925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008926$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008927
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008928else
Matthias Kloseb159a552010-04-25 21:00:44 +00008929
8930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008931$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008932
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008933fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008934rm -f core conftest.err conftest.$ac_objext \
8935 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008936 *) ;;
8937esac
8938
Guido van Rossum70c7f481998-03-26 18:44:10 +00008939# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8941$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008942if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008943 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008944else
Martin v. Löwis11437992002-04-12 09:54:03 +00008945 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008946LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008950/* Override any GCC internal prototype to avoid an error.
8951 Use char because int might match the return type of a GCC
8952 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008953#ifdef __cplusplus
8954extern "C"
8955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008956char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008957int
8958main ()
8959{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008960return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 ;
8962 return 0;
8963}
8964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008965if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008966 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008967else
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008970rm -f core conftest.err conftest.$ac_objext \
8971 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008972LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8975$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008976if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008977 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008978fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008979 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8981$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008982if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008983 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008984else
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008986LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990/* Override any GCC internal prototype to avoid an error.
8991 Use char because int might match the return type of a GCC
8992 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008993#ifdef __cplusplus
8994extern "C"
8995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008996char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008997int
8998main ()
8999{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009000return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 ;
9002 return 0;
9003}
9004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009005if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009006 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009007else
Matthias Kloseb9621712010-04-24 17:59:49 +00009008 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009010rm -f core conftest.err conftest.$ac_objext \
9011 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009012LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009013fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9015$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009016if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009017 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009018fi
9019 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009020
Matthias Kloseb9621712010-04-24 17:59:49 +00009021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9022$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009025if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009026 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9028$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009029LIBS="$withval $LIBS"
9030
9031else
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9033$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034fi
9035
Guido van Rossum7f43da71994-08-01 12:15:30 +00009036
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009037if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009038 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9039set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9041$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009042if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009043 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009044else
9045 case $PKG_CONFIG in
9046 [\\/]* | ?:[\\/]*)
9047 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9048 ;;
9049 *)
9050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051for as_dir in $PATH
9052do
9053 IFS=$as_save_IFS
9054 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009056 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009057 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009059 break 2
9060 fi
9061done
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009063IFS=$as_save_IFS
9064
9065 ;;
9066esac
9067fi
9068PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9069if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9071$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009072else
Matthias Kloseb9621712010-04-24 17:59:49 +00009073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009075fi
9076
9077
9078fi
9079if test -z "$ac_cv_path_PKG_CONFIG"; then
9080 ac_pt_PKG_CONFIG=$PKG_CONFIG
9081 # Extract the first word of "pkg-config", so it can be a program name with args.
9082set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9084$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009085if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009086 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009087else
9088 case $ac_pt_PKG_CONFIG in
9089 [\\/]* | ?:[\\/]*)
9090 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9091 ;;
9092 *)
9093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9094for as_dir in $PATH
9095do
9096 IFS=$as_save_IFS
9097 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009098 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009100 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009102 break 2
9103 fi
9104done
Matthias Kloseb9621712010-04-24 17:59:49 +00009105 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009106IFS=$as_save_IFS
9107
9108 ;;
9109esac
9110fi
9111ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9112if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9114$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009115else
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9117$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009118fi
9119
9120 if test "x$ac_pt_PKG_CONFIG" = x; then
9121 PKG_CONFIG=""
9122 else
9123 case $cross_compiling:$ac_tool_warned in
9124yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009127ac_tool_warned=yes ;;
9128esac
9129 PKG_CONFIG=$ac_pt_PKG_CONFIG
9130 fi
9131else
9132 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9133fi
9134
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009135
9136# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9138$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009139
9140# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009141if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009142 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009143else
9144 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009145fi
9146
9147
Matthias Kloseb9621712010-04-24 17:59:49 +00009148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9149$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009150
9151# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9153$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009154
9155# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009156if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009157 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009158else
9159 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009160fi
9161
9162
9163if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009164 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9165else
9166 LIBFFI_INCLUDEDIR=""
9167fi
9168
9169
Matthias Kloseb9621712010-04-24 17:59:49 +00009170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9171$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009172
Stefan Krah60187b52012-03-23 19:06:27 +01009173# Check for use of the system libmpdec library
9174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9175$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9176
9177# Check whether --with-system_libmpdec was given.
9178if test "${with_system_libmpdec+set}" = set; then :
9179 withval=$with_system_libmpdec;
9180else
9181 with_system_libmpdec="no"
9182fi
9183
9184
9185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9186$as_echo "$with_system_libmpdec" >&6; }
9187
Benjamin Peterson076ed002010-10-31 17:11:02 +00009188# Check for support for loadable sqlite extensions
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9190$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9191# Check whether --enable-loadable-sqlite-extensions was given.
9192if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9193 enableval=$enable_loadable_sqlite_extensions;
9194else
9195 enable_loadable_sqlite_extensions="no"
9196fi
9197
9198
9199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9200$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9201
Matthias Klose55708cc2009-04-30 08:06:49 +00009202# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9204$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009205
9206# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009207if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009208 withval=$with_dbmliborder;
9209if test x$with_dbmliborder = xyes
9210then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009211as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009212else
9213 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9214 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9215 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009216 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009217 fi
9218 done
9219fi
9220fi
9221
Matthias Kloseb9621712010-04-24 17:59:49 +00009222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9223$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009224
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009225# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009226
9227
Matthias Kloseb9621712010-04-24 17:59:49 +00009228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9229$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009231# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009232if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009233 withval=$with_signal_module;
9234fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009235
9236
9237if test -z "$with_signal_module"
9238then with_signal_module="yes"
9239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9241$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009242
9243if test "${with_signal_module}" = "yes"; then
9244 USE_SIGNAL_MODULE=""
9245 SIGNAL_OBJS=""
9246else
9247 USE_SIGNAL_MODULE="#"
9248 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9249fi
9250
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009251# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009252
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009253USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009254
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009255
Martin v. Löwis11437992002-04-12 09:54:03 +00009256
9257# Templates for things AC_DEFINEd more than once.
9258# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009259
9260
Martin v. Löwis11437992002-04-12 09:54:03 +00009261
Matthias Kloseb9621712010-04-24 17:59:49 +00009262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9263$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009266if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009267 withval=$with_threads;
9268fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009269
9270
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009271# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009273# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009274if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009275 withval=$with_thread; with_threads=$with_thread
9276fi
9277
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009278
9279if test -z "$with_threads"
9280then with_threads="yes"
9281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9283$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009284
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009285
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009286if test "$with_threads" = "no"
9287then
9288 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009289elif test "$ac_cv_pthread_is_default" = yes
9290then
Matthias Kloseb9621712010-04-24 17:59:49 +00009291 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009292
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009293 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009294 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009295
9296 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009298elif test "$ac_cv_kpthread" = "yes"
9299then
9300 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009301 if test "$ac_cv_cxx_thread" = "yes"; then
9302 CXX="$CXX -Kpthread"
9303 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009304 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009305
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009306 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009307 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009308elif test "$ac_cv_kthread" = "yes"
9309then
9310 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009311 if test "$ac_cv_cxx_thread" = "yes"; then
9312 CXX="$CXX -Kthread"
9313 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009314 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009315
9316 posix_threads=yes
9317 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009318elif test "$ac_cv_pthread" = "yes"
9319then
9320 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009321 if test "$ac_cv_cxx_thread" = "yes"; then
9322 CXX="$CXX -pthread"
9323 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009324 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009325
9326 posix_threads=yes
9327 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009328else
9329 if test ! -z "$with_threads" -a -d "$with_threads"
9330 then LDFLAGS="$LDFLAGS -L$with_threads"
9331 fi
9332 if test ! -z "$withval" -a -d "$withval"
9333 then LDFLAGS="$LDFLAGS -L$withval"
9334 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009335
9336 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009337 # define _POSIX_THREADS in unistd.h. Some apparently don't
9338 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9340$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009342/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009343
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009344#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009345#ifdef _POSIX_THREADS
9346yes
9347#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009348
9349_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009352 unistd_defines_pthreads=yes
9353else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009354 unistd_defines_pthreads=no
9355fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009356rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009357
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9359$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009360
Matthias Kloseb9621712010-04-24 17:59:49 +00009361 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009362
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009363 # Just looking for pthread_create in libpthread is not enough:
9364 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9365 # So we really have to include pthread.h, and then link.
9366 _libs=$LIBS
9367 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9369$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009371/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009372
9373#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009374#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009375
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009376void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009377int
9378main ()
9379{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009380
9381pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009382 ;
9383 return 0;
9384}
9385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009386if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009387
Matthias Kloseb9621712010-04-24 17:59:49 +00009388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9389$as_echo "yes" >&6; }
9390 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009391
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009392 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009393 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009394else
Martin v. Löwis11437992002-04-12 09:54:03 +00009395
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009396 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009397 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009398if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009399 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009400
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009401 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009402 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009403else
Guido van Rossumad678af1998-10-02 14:42:15 +00009404
Matthias Kloseb9621712010-04-24 17:59:49 +00009405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9406$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009407if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009408 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009409else
Martin v. Löwis11437992002-04-12 09:54:03 +00009410 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009411LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009415/* Override any GCC internal prototype to avoid an error.
9416 Use char because int might match the return type of a GCC
9417 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009418#ifdef __cplusplus
9419extern "C"
9420#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009421char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009422int
9423main ()
9424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 ;
9427 return 0;
9428}
9429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009430if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009432else
Matthias Kloseb9621712010-04-24 17:59:49 +00009433 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009435rm -f core conftest.err conftest.$ac_objext \
9436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009437LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9440$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009441if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009443
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009444 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009445 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009446 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009447else
Greg Steinadf63d62000-07-05 10:38:09 +00009448
Matthias Kloseb9621712010-04-24 17:59:49 +00009449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9450$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009451if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009453else
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009455LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009458
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009459/* Override any GCC internal prototype to avoid an error.
9460 Use char because int might match the return type of a GCC
9461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009462#ifdef __cplusplus
9463extern "C"
9464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009465char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009466int
9467main ()
9468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009469return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009470 ;
9471 return 0;
9472}
9473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009474if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009475 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009476else
Matthias Kloseb9621712010-04-24 17:59:49 +00009477 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009479rm -f core conftest.err conftest.$ac_objext \
9480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009481LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9484$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009485if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009486 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009487
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009488 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009489 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009490 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009491else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009492
Matthias Kloseb9621712010-04-24 17:59:49 +00009493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9494$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009495if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009497else
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009499LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503/* Override any GCC internal prototype to avoid an error.
9504 Use char because int might match the return type of a GCC
9505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009506#ifdef __cplusplus
9507extern "C"
9508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009509char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009510int
9511main ()
9512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 ;
9515 return 0;
9516}
9517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009520else
Matthias Kloseb9621712010-04-24 17:59:49 +00009521 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009523rm -f core conftest.err conftest.$ac_objext \
9524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009525LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9528$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009529if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009530 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009531
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009532 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009533 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009534 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009535else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009536
Matthias Kloseb9621712010-04-24 17:59:49 +00009537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9538$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009539if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009540 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009541else
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009543LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009547/* Override any GCC internal prototype to avoid an error.
9548 Use char because int might match the return type of a GCC
9549 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009550#ifdef __cplusplus
9551extern "C"
9552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009553char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009554int
9555main ()
9556{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009557return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009558 ;
9559 return 0;
9560}
9561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009562if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009563 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009564else
Matthias Kloseb9621712010-04-24 17:59:49 +00009565 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009567rm -f core conftest.err conftest.$ac_objext \
9568 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009569LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9572$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009573if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009574 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009575
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009576 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009577 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009578 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009579else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009580
Martin v. Löwis130fb172001-07-19 11:00:41 +00009581 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009582fi
9583
Guido van Rossum627b2d71993-12-24 10:39:16 +00009584
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009585fi
9586
Guido van Rossum0be3e491997-05-22 20:33:33 +00009587fi
9588
Guido van Rossum49545951997-12-02 19:28:29 +00009589fi
9590
Guido van Rossumb93a8621998-05-07 13:27:32 +00009591fi
9592
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009594rm -f core conftest.err conftest.$ac_objext \
9595 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009596
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9598$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009599if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009600 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009601else
Martin v. Löwis11437992002-04-12 09:54:03 +00009602 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009603LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009605/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607/* Override any GCC internal prototype to avoid an error.
9608 Use char because int might match the return type of a GCC
9609 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009610#ifdef __cplusplus
9611extern "C"
9612#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009613char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009614int
9615main ()
9616{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009617return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009618 ;
9619 return 0;
9620}
9621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009622if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009623 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009624else
Matthias Kloseb9621712010-04-24 17:59:49 +00009625 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009627rm -f core conftest.err conftest.$ac_objext \
9628 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009629LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9632$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009633if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009634 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009635
Martin v. Löwis130fb172001-07-19 11:00:41 +00009636 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009637 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009638 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009639fi
9640
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009641
Neal Norwitza978ab02002-11-02 16:58:05 +00009642 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9644$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009645if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009646 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009647else
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009649LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009653/* Override any GCC internal prototype to avoid an error.
9654 Use char because int might match the return type of a GCC
9655 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009656#ifdef __cplusplus
9657extern "C"
9658#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009659char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009660int
9661main ()
9662{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009663return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 ;
9665 return 0;
9666}
9667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009668if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009669 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009670else
Matthias Kloseb9621712010-04-24 17:59:49 +00009671 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009673rm -f core conftest.err conftest.$ac_objext \
9674 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009675LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9678$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009679if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009680 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009681
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009682 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009683 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009684 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009685fi
9686
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009687 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009688fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009689
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009690if test "$posix_threads" = "yes"; then
9691 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009692
Matthias Kloseb9621712010-04-24 17:59:49 +00009693$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009694
9695 fi
9696
9697 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9698 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009699 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009700$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009701
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009702 ;;
9703 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009704$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009705
9706 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009707 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009708$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009709
9710 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009711 esac
9712
Matthias Kloseb9621712010-04-24 17:59:49 +00009713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9714$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009715 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009717else
Matthias Kloseb9621712010-04-24 17:59:49 +00009718 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009719 ac_cv_pthread_system_supported=no
9720else
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009722/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009723
9724 #include <stdio.h>
9725 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009726 void *foo(void *parm) {
9727 return NULL;
9728 }
9729 main() {
9730 pthread_attr_t attr;
9731 pthread_t id;
9732 if (pthread_attr_init(&attr)) exit(-1);
9733 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9734 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9735 exit(0);
9736 }
9737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009738if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009739 ac_cv_pthread_system_supported=yes
9740else
Matthias Kloseb9621712010-04-24 17:59:49 +00009741 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9744 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009745fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009746
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009747
Guido van Rossum627b2d71993-12-24 10:39:16 +00009748fi
9749
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9751$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009752 if test "$ac_cv_pthread_system_supported" = "yes"; then
9753
Matthias Kloseb9621712010-04-24 17:59:49 +00009754$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009755
9756 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009757 for ac_func in pthread_sigmask
9758do :
9759 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009760if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009761 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009762#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009763_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009764 case $ac_sys_system in
9765 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009766
Matthias Kloseb9621712010-04-24 17:59:49 +00009767$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009768
9769 ;;
9770 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009771fi
9772done
9773
9774fi
9775
9776
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009777# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009778
Matthias Kloseb9621712010-04-24 17:59:49 +00009779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9780$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009782if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009784 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9786$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009787 ipv6=no
9788 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009789 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9790$as_echo "yes" >&6; }
9791 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009792
9793 ipv6=yes
9794 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009796else
Martin v. Löwis11437992002-04-12 09:54:03 +00009797
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009799/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009800 /* AF_INET6 available check */
9801#include <sys/types.h>
9802#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009803int
9804main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009805{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009806int domain = AF_INET6;
9807 ;
9808 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009809}
Martin v. Löwis11437992002-04-12 09:54:03 +00009810_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009811if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009812
Matthias Kloseb9621712010-04-24 17:59:49 +00009813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9814$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009815 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009816
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009817else
Matthias Kloseb159a552010-04-25 21:00:44 +00009818
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9820$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009821 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009822
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009826if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9828$as_echo_n "checking if RFC2553 API is available... " >&6; }
9829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009830/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009831
9832 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009833#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009834int
9835main ()
9836{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009837struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009838 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 ;
9840 return 0;
9841}
Matthias Kloseb159a552010-04-25 21:00:44 +00009842
Martin v. Löwis11437992002-04-12 09:54:03 +00009843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009844if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009845
9846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009847$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009848 ipv6=yes
9849
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009850else
Matthias Kloseb159a552010-04-25 21:00:44 +00009851
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009853$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009854 ipv6=no
9855
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009858fi
9859
9860if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009861 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009862
9863fi
9864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865fi
9866
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009867
9868ipv6type=unknown
9869ipv6lib=none
9870ipv6trylibc=no
9871
9872if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9874$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009875 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9876 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009877 case $i in
9878 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009880/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009881
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009882#include <netinet/in.h>
9883#ifdef IPV6_INRIA_VERSION
9884yes
9885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009886_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009889 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009890fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009891rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009892
9893 ;;
9894 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009896/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009897
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009898#include <netinet/in.h>
9899#ifdef __KAME__
9900yes
9901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009902_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009905 ipv6type=$i;
9906 ipv6lib=inet6
9907 ipv6libdir=/usr/local/v6/lib
9908 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009909fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009910rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009911
9912 ;;
9913 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009915/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009916
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009917#include <features.h>
9918#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9919yes
9920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009921_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009924 ipv6type=$i;
9925 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009926fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009927rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009928
9929 ;;
9930 linux-inet6)
9931 if test -d /usr/inet6; then
9932 ipv6type=$i
9933 ipv6lib=inet6
9934 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009935 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009936 fi
9937 ;;
9938 solaris)
9939 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009940 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009941 ipv6type=$i
9942 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009943 fi
9944 fi
9945 ;;
9946 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009948/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009949
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009950#include <sys/param.h>
9951#ifdef _TOSHIBA_INET6
9952yes
9953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009954_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009955if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009957 ipv6type=$i;
9958 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009959 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009960fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009961rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009962
9963 ;;
9964 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009966/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009967
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009968#include </usr/local/v6/include/sys/v6config.h>
9969#ifdef __V6D__
9970yes
9971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009972_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009975 ipv6type=$i;
9976 ipv6lib=v6;
9977 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009978 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009979fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009980rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009981
9982 ;;
9983 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009985/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009986
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009987#include <sys/param.h>
9988#ifdef _ZETA_MINAMI_INET6
9989yes
9990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009991_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009993 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009994 ipv6type=$i;
9995 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009996 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009997fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009998rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009999
10000 ;;
10001 esac
10002 if test "$ipv6type" != "unknown"; then
10003 break
10004 fi
10005 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10007$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010008fi
10009
10010if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10011 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10012 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10013 echo "using lib$ipv6lib"
10014 else
10015 if test $ipv6trylibc = "yes"; then
10016 echo "using libc"
10017 else
10018 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10019 echo "You need to fetch lib$ipv6lib.a from appropriate"
10020 echo 'ipv6 kit and compile beforehand.'
10021 exit 1
10022 fi
10023 fi
10024fi
10025
Matthias Kloseb9621712010-04-24 17:59:49 +000010026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10027$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010029/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010030
10031 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010032int
10033main ()
10034{
10035FSIORefNum fRef = 0
10036 ;
10037 return 0;
10038}
Matthias Kloseb159a552010-04-25 21:00:44 +000010039
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010041if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010042
Matthias Kloseb159a552010-04-25 21:00:44 +000010043
Matthias Kloseb9621712010-04-24 17:59:49 +000010044$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010045
Matthias Kloseb9621712010-04-24 17:59:49 +000010046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10047$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010048
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010049else
Matthias Kloseb159a552010-04-25 21:00:44 +000010050
Matthias Kloseb9621712010-04-24 17:59:49 +000010051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10052$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010053
10054fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10056
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010057# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10059$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010061# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010062if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063 withval=$with_doc_strings;
10064fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010065
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010066
10067if test -z "$with_doc_strings"
10068then with_doc_strings="yes"
10069fi
10070if test "$with_doc_strings" != "no"
10071then
10072
Matthias Kloseb9621712010-04-24 17:59:49 +000010073$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010074
10075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10077$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010078
Antoine Pitrou042b1282010-08-13 21:15:58 +000010079# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10081$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010083# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010084if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010086if test "$withval" != no
10087then
10088
Matthias Kloseb9621712010-04-24 17:59:49 +000010089$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010090
Matthias Kloseb9621712010-04-24 17:59:49 +000010091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10092$as_echo "yes" >&6; }
10093else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010095fi
10096else
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010099fi
10100
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010101
10102# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10104$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010107if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108 withval=$with_pymalloc;
10109fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010110
Neil Schemenauera35c6882001-02-27 04:45:05 +000010111
Neil Schemenauer16c22972002-03-22 15:34:49 +000010112if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010113then
10114 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010115fi
10116if test "$with_pymalloc" != "no"
10117then
Martin v. Löwis11437992002-04-12 09:54:03 +000010118
Matthias Kloseb9621712010-04-24 17:59:49 +000010119$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010120
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010121 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10124$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010125
Benjamin Peterson05159c42009-12-03 03:01:27 +000010126# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10128$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010129
10130# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010131if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010132 withval=$with_valgrind;
10133else
10134 with_valgrind=no
10135fi
10136
Matthias Kloseb9621712010-04-24 17:59:49 +000010137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10138$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010139if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010140 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 +020010141if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010142
Matthias Kloseb9621712010-04-24 17:59:49 +000010143$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010144
10145else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010146 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010147
10148fi
10149
10150
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010151 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010152fi
10153
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010154# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010155
Guido van Rossum98935bf2001-09-05 19:13:16 +000010156DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010157
Guido van Rossume97ee181999-12-20 21:27:22 +000010158# the dlopen() function means we might want to use dynload_shlib.o. some
10159# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010160for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010161do :
10162 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010163if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010165#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010166_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010167
Guido van Rossume97ee181999-12-20 21:27:22 +000010168fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010169done
Guido van Rossume97ee181999-12-20 21:27:22 +000010170
Michael W. Hudson54241132001-12-07 15:38:26 +000010171
Guido van Rossume97ee181999-12-20 21:27:22 +000010172# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10173# loading of modules.
10174
Matthias Kloseb9621712010-04-24 17:59:49 +000010175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10176$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010177if test -z "$DYNLOADFILE"
10178then
10179 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010180 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10181 if test "$ac_cv_func_dlopen" = yes
10182 then DYNLOADFILE="dynload_shlib.o"
10183 else DYNLOADFILE="dynload_aix.o"
10184 fi
10185 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010186 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010187 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10188 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010189 *)
10190 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10191 # out any dynamic loading
10192 if test "$ac_cv_func_dlopen" = yes
10193 then DYNLOADFILE="dynload_shlib.o"
10194 else DYNLOADFILE="dynload_stub.o"
10195 fi
10196 ;;
10197 esac
10198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10200$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010201if test "$DYNLOADFILE" != "dynload_stub.o"
10202then
Martin v. Löwis11437992002-04-12 09:54:03 +000010203
Matthias Kloseb9621712010-04-24 17:59:49 +000010204$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010205
10206fi
10207
Neil Schemenauer4e425612001-06-19 15:44:15 +000010208# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10209
Michael W. Hudson54241132001-12-07 15:38:26 +000010210
Matthias Kloseb9621712010-04-24 17:59:49 +000010211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10212$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010213if test -z "$MACHDEP_OBJS"
10214then
Jack Jansene578a632001-08-15 01:27:14 +000010215 MACHDEP_OBJS=$extra_machdep_objs
10216else
10217 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010218fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010219if test -z "$MACHDEP_OBJS"; then
10220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10221$as_echo "none" >&6; }
10222else
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10224$as_echo "$MACHDEP_OBJS" >&6; }
10225fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010226
Guido van Rossum627b2d71993-12-24 10:39:16 +000010227# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010228for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010229 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010230 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010231 futimens futimes gai_strerror \
10232 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010233 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010234 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010235 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10236 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010237 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010238 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010239 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010240 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010241 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010242 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010243 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10244 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010245 sigaction sigaltstack siginterrupt sigpending sigrelse \
10246 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010247 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010248 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10249 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010250do :
10251 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10252ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010253if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010255#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010256_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010257
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010258fi
10259done
10260
Michael W. Hudson54241132001-12-07 15:38:26 +000010261
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010262ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10263 #include <dirent.h>
10264"
10265if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10266
10267$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10268
10269fi
10270
10271
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010272# For some functions, having a definition is not sufficient, since
10273# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10275$as_echo_n "checking for chroot... " >&6; }
10276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010277/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010278#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010279int
10280main ()
10281{
10282void *x=chroot
10283 ;
10284 return 0;
10285}
10286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010287if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010288
Matthias Kloseb9621712010-04-24 17:59:49 +000010289$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010290
Matthias Kloseb159a552010-04-25 21:00:44 +000010291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010292$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010293else
Matthias Kloseb9621712010-04-24 17:59:49 +000010294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10295$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010296
10297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10300$as_echo_n "checking for link... " >&6; }
10301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010302/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010303#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010304int
10305main ()
10306{
10307void *x=link
10308 ;
10309 return 0;
10310}
10311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010313
Matthias Kloseb9621712010-04-24 17:59:49 +000010314$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010315
Matthias Kloseb159a552010-04-25 21:00:44 +000010316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010317$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010318else
Matthias Kloseb9621712010-04-24 17:59:49 +000010319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10320$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010321
10322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10325$as_echo_n "checking for symlink... " >&6; }
10326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010327/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010328#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010329int
10330main ()
10331{
10332void *x=symlink
10333 ;
10334 return 0;
10335}
10336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010337if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010338
Matthias Kloseb9621712010-04-24 17:59:49 +000010339$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010340
Matthias Kloseb159a552010-04-25 21:00:44 +000010341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010342$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010343else
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10345$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010346
10347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10350$as_echo_n "checking for fchdir... " >&6; }
10351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010352/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010353#include <unistd.h>
10354int
10355main ()
10356{
10357void *x=fchdir
10358 ;
10359 return 0;
10360}
10361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010362if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010363
Matthias Kloseb9621712010-04-24 17:59:49 +000010364$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010365
Matthias Kloseb159a552010-04-25 21:00:44 +000010366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010367$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010368else
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10370$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010371
10372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10375$as_echo_n "checking for fsync... " >&6; }
10376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010377/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010378#include <unistd.h>
10379int
10380main ()
10381{
10382void *x=fsync
10383 ;
10384 return 0;
10385}
10386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010388
Matthias Kloseb9621712010-04-24 17:59:49 +000010389$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010390
Matthias Kloseb159a552010-04-25 21:00:44 +000010391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010392$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010393else
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10395$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010396
10397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10400$as_echo_n "checking for fdatasync... " >&6; }
10401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010402/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010403#include <unistd.h>
10404int
10405main ()
10406{
10407void *x=fdatasync
10408 ;
10409 return 0;
10410}
10411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010413
Matthias Kloseb9621712010-04-24 17:59:49 +000010414$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010415
Matthias Kloseb159a552010-04-25 21:00:44 +000010416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010417$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010418else
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10420$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010421
10422fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10425$as_echo_n "checking for epoll... " >&6; }
10426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010427/* end confdefs.h. */
10428#include <sys/epoll.h>
10429int
10430main ()
10431{
10432void *x=epoll_create
10433 ;
10434 return 0;
10435}
10436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010440
Matthias Kloseb159a552010-04-25 21:00:44 +000010441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010442$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010443else
Matthias Kloseb9621712010-04-24 17:59:49 +000010444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010446
10447fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10450$as_echo_n "checking for epoll_create1... " >&6; }
10451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10452/* end confdefs.h. */
10453#include <sys/epoll.h>
10454int
10455main ()
10456{
10457void *x=epoll_create1
10458 ;
10459 return 0;
10460}
10461_ACEOF
10462if ac_fn_c_try_compile "$LINENO"; then :
10463
10464$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10465
10466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10467$as_echo "yes" >&6; }
10468else
10469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10470$as_echo "no" >&6; }
10471
10472fi
10473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10475$as_echo_n "checking for kqueue... " >&6; }
10476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010477/* end confdefs.h. */
10478
10479#include <sys/types.h>
10480#include <sys/event.h>
10481
10482int
10483main ()
10484{
10485int x=kqueue()
10486 ;
10487 return 0;
10488}
10489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010490if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010491
Matthias Kloseb9621712010-04-24 17:59:49 +000010492$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010493
Matthias Kloseb159a552010-04-25 21:00:44 +000010494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010495$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010496else
Matthias Kloseb9621712010-04-24 17:59:49 +000010497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10498$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010499
10500fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010502# On some systems (eg. FreeBSD 5), we would find a definition of the
10503# functions ctermid_r, setgroups in the library, but no prototype
10504# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10505# address to avoid compiler warnings and potential miscompilations
10506# because of the missing prototypes.
10507
Matthias Kloseb9621712010-04-24 17:59:49 +000010508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10509$as_echo_n "checking for ctermid_r... " >&6; }
10510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010511/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010512
Martin v. Löwisd5843682002-11-21 20:41:28 +000010513#include <stdio.h>
10514
Martin v. Löwisd5843682002-11-21 20:41:28 +000010515int
10516main ()
10517{
10518void* p = ctermid_r
10519 ;
10520 return 0;
10521}
10522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010523if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010524
Matthias Kloseb9621712010-04-24 17:59:49 +000010525$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010526
Matthias Kloseb159a552010-04-25 21:00:44 +000010527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010528$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010529else
Matthias Kloseb9621712010-04-24 17:59:49 +000010530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10531$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010532
10533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10535
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10537$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010538if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010539 $as_echo_n "(cached) " >&6
10540else
10541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010542/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010543#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010544int
10545main ()
10546{
10547void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010548
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010549 ;
10550 return 0;
10551}
10552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010553if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010554 ac_cv_flock_decl=yes
10555else
10556 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010557
10558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010560
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010561fi
10562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10563$as_echo "$ac_cv_flock_decl" >&6; }
10564if test "x${ac_cv_flock_decl}" = xyes; then
10565 for ac_func in flock
10566do :
10567 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010568if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010569 cat >>confdefs.h <<_ACEOF
10570#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010571_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010572
Antoine Pitroua3000072010-09-07 14:52:42 +000010573else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010575$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010576if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010577 $as_echo_n "(cached) " >&6
10578else
10579 ac_check_lib_save_LIBS=$LIBS
10580LIBS="-lbsd $LIBS"
10581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582/* end confdefs.h. */
10583
10584/* Override any GCC internal prototype to avoid an error.
10585 Use char because int might match the return type of a GCC
10586 builtin and then its argument prototype would still apply. */
10587#ifdef __cplusplus
10588extern "C"
10589#endif
10590char flock ();
10591int
10592main ()
10593{
10594return flock ();
10595 ;
10596 return 0;
10597}
10598_ACEOF
10599if ac_fn_c_try_link "$LINENO"; then :
10600 ac_cv_lib_bsd_flock=yes
10601else
10602 ac_cv_lib_bsd_flock=no
10603fi
10604rm -f core conftest.err conftest.$ac_objext \
10605 conftest$ac_exeext conftest.$ac_ext
10606LIBS=$ac_check_lib_save_LIBS
10607fi
10608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10609$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010610if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010611 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010612
10613
10614$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10615
10616
10617fi
10618
10619
10620fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010621done
10622
Antoine Pitroua3000072010-09-07 14:52:42 +000010623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624
Matthias Kloseb9621712010-04-24 17:59:49 +000010625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10626$as_echo_n "checking for getpagesize... " >&6; }
10627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010628/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010629
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010630#include <unistd.h>
10631
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010632int
10633main ()
10634{
10635void* p = getpagesize
10636 ;
10637 return 0;
10638}
10639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010640if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010641
Matthias Kloseb9621712010-04-24 17:59:49 +000010642$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010643
Matthias Kloseb159a552010-04-25 21:00:44 +000010644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010645$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010646else
Matthias Kloseb9621712010-04-24 17:59:49 +000010647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10648$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010649
10650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010652
Victor Stinner984890f2011-11-24 13:53:38 +010010653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10654$as_echo_n "checking for broken unsetenv... " >&6; }
10655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10656/* end confdefs.h. */
10657
10658#include <stdlib.h>
10659
10660int
10661main ()
10662{
10663int res = unsetenv("DUMMY")
10664 ;
10665 return 0;
10666}
10667_ACEOF
10668if ac_fn_c_try_compile "$LINENO"; then :
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10670$as_echo "no" >&6; }
10671else
10672
10673$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10674
10675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10676$as_echo "yes" >&6; }
10677
10678fi
10679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10680
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010681for ac_prog in true
10682do
10683 # Extract the first word of "$ac_prog", so it can be a program name with args.
10684set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10686$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010687if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010688 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010689else
10690 if test -n "$TRUE"; then
10691 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10692else
10693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10694for as_dir in $PATH
10695do
10696 IFS=$as_save_IFS
10697 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010700 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 $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 +000010702 break 2
10703 fi
10704done
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010706IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010707
10708fi
10709fi
10710TRUE=$ac_cv_prog_TRUE
10711if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10713$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010714else
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10716$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010717fi
10718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010720 test -n "$TRUE" && break
10721done
10722test -n "$TRUE" || TRUE="/bin/true"
10723
10724
Matthias Kloseb9621712010-04-24 17:59:49 +000010725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10726$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010727if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010729else
10730 ac_check_lib_save_LIBS=$LIBS
10731LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010733/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735/* Override any GCC internal prototype to avoid an error.
10736 Use char because int might match the return type of a GCC
10737 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010738#ifdef __cplusplus
10739extern "C"
10740#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010741char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010742int
10743main ()
10744{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010745return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010746 ;
10747 return 0;
10748}
10749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010750if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010751 ac_cv_lib_c_inet_aton=yes
10752else
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010755rm -f core conftest.err conftest.$ac_objext \
10756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010757LIBS=$ac_check_lib_save_LIBS
10758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10760$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010761if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010762 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010763else
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10765$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010766if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010767 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010768else
10769 ac_check_lib_save_LIBS=$LIBS
10770LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010772/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010774/* Override any GCC internal prototype to avoid an error.
10775 Use char because int might match the return type of a GCC
10776 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010777#ifdef __cplusplus
10778extern "C"
10779#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010780char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010781int
10782main ()
10783{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010784return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010785 ;
10786 return 0;
10787}
10788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010789if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010790 ac_cv_lib_resolv_inet_aton=yes
10791else
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010794rm -f core conftest.err conftest.$ac_objext \
10795 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010796LIBS=$ac_check_lib_save_LIBS
10797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10799$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010800if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010801 cat >>confdefs.h <<_ACEOF
10802#define HAVE_LIBRESOLV 1
10803_ACEOF
10804
10805 LIBS="-lresolv $LIBS"
10806
10807fi
10808
10809
10810fi
10811
10812
Christian Heimesd0764e22007-12-04 15:00:33 +000010813# On Tru64, chflags seems to be present, but calling it will
10814# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10816$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010817if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010818 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010819else
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010821 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010822else
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010824/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010825
Christian Heimesd0764e22007-12-04 15:00:33 +000010826#include <sys/stat.h>
10827#include <unistd.h>
10828int main(int argc, char*argv[])
10829{
10830 if(chflags(argv[0], 0) != 0)
10831 return 1;
10832 return 0;
10833}
Ned Deily3eb67d52011-06-28 00:00:28 -070010834
Christian Heimesd0764e22007-12-04 15:00:33 +000010835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010836if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010837 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010838else
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010843fi
10844
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010845
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10848$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010849if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010851if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010852 ac_cv_have_chflags="yes"
10853else
10854 ac_cv_have_chflags="no"
10855fi
10856
10857fi
10858if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010859
Matthias Kloseb9621712010-04-24 17:59:49 +000010860$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010861
10862fi
10863
Matthias Kloseb9621712010-04-24 17:59:49 +000010864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10865$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010866if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010867 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010868else
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010870 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010871else
Matthias Kloseb9621712010-04-24 17:59:49 +000010872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010873/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010874
Christian Heimesd0764e22007-12-04 15:00:33 +000010875#include <sys/stat.h>
10876#include <unistd.h>
10877int main(int argc, char*argv[])
10878{
10879 if(lchflags(argv[0], 0) != 0)
10880 return 1;
10881 return 0;
10882}
Ned Deily3eb67d52011-06-28 00:00:28 -070010883
Christian Heimesd0764e22007-12-04 15:00:33 +000010884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010885if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010886 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010887else
Matthias Kloseb9621712010-04-24 17:59:49 +000010888 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010892fi
10893
10894
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10897$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010898if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010900if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010901 ac_cv_have_lchflags="yes"
10902else
10903 ac_cv_have_lchflags="no"
10904fi
10905
10906fi
10907if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010908
Matthias Kloseb9621712010-04-24 17:59:49 +000010909$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010910
10911fi
10912
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010913case $ac_sys_system/$ac_sys_release in
10914Darwin/*)
10915 _CUR_CFLAGS="${CFLAGS}"
10916 _CUR_LDFLAGS="${LDFLAGS}"
10917 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10918 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10919 ;;
10920esac
10921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10923$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010924if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010926else
10927 ac_check_lib_save_LIBS=$LIBS
10928LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010930/* end confdefs.h. */
10931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010932/* Override any GCC internal prototype to avoid an error.
10933 Use char because int might match the return type of a GCC
10934 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010935#ifdef __cplusplus
10936extern "C"
10937#endif
10938char inflateCopy ();
10939int
10940main ()
10941{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010942return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010943 ;
10944 return 0;
10945}
10946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010947if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010948 ac_cv_lib_z_inflateCopy=yes
10949else
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010951fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010952rm -f core conftest.err conftest.$ac_objext \
10953 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010954LIBS=$ac_check_lib_save_LIBS
10955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10957$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010958if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010961
10962fi
10963
10964
10965case $ac_sys_system/$ac_sys_release in
10966Darwin/*)
10967 CFLAGS="${_CUR_CFLAGS}"
10968 LDFLAGS="${_CUR_LDFLAGS}"
10969 ;;
10970esac
10971
Matthias Kloseb9621712010-04-24 17:59:49 +000010972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10973$as_echo_n "checking for hstrerror... " >&6; }
10974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010975/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010976
Martin v. Löwise9416172003-05-03 10:12:45 +000010977#include <netdb.h>
10978
Martin v. Löwise9416172003-05-03 10:12:45 +000010979int
10980main ()
10981{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010982void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010983 ;
10984 return 0;
10985}
10986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010987if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010988
Matthias Kloseb9621712010-04-24 17:59:49 +000010989$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010990
Matthias Kloseb159a552010-04-25 21:00:44 +000010991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010992$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010993else
Matthias Kloseb9621712010-04-24 17:59:49 +000010994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10995$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010996
10997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010998rm -f core conftest.err conftest.$ac_objext \
10999 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011000
Matthias Kloseb9621712010-04-24 17:59:49 +000011001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11002$as_echo_n "checking for inet_aton... " >&6; }
11003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011004/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011005
Martin v. Löwis86d66262006-02-17 08:40:11 +000011006#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011007#include <sys/socket.h>
11008#include <netinet/in.h>
11009#include <arpa/inet.h>
11010
Martin v. Löwise9416172003-05-03 10:12:45 +000011011int
11012main ()
11013{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011014void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011015 ;
11016 return 0;
11017}
11018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011019if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011020
Matthias Kloseb9621712010-04-24 17:59:49 +000011021$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011022
Matthias Kloseb159a552010-04-25 21:00:44 +000011023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011024$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011025else
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11027$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011028
11029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011030rm -f core conftest.err conftest.$ac_objext \
11031 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011032
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11034$as_echo_n "checking for inet_pton... " >&6; }
11035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011036/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011037
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011038#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011039#include <sys/socket.h>
11040#include <netinet/in.h>
11041#include <arpa/inet.h>
11042
Martin v. Löwise9416172003-05-03 10:12:45 +000011043int
11044main ()
11045{
11046void* p = inet_pton
11047 ;
11048 return 0;
11049}
11050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011051if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011052
Matthias Kloseb9621712010-04-24 17:59:49 +000011053$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011054
Matthias Kloseb159a552010-04-25 21:00:44 +000011055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011056$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011057else
Matthias Kloseb9621712010-04-24 17:59:49 +000011058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11059$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011060
11061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011063
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011064# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11066$as_echo_n "checking for setgroups... " >&6; }
11067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011068/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011069
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011070#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011071#ifdef HAVE_GRP_H
11072#include <grp.h>
11073#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011074
Martin v. Löwisd5843682002-11-21 20:41:28 +000011075int
11076main ()
11077{
11078void* p = setgroups
11079 ;
11080 return 0;
11081}
11082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011083if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011084
Matthias Kloseb9621712010-04-24 17:59:49 +000011085$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011086
Matthias Kloseb159a552010-04-25 21:00:44 +000011087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011088$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011089else
Matthias Kloseb9621712010-04-24 17:59:49 +000011090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11091$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011092
11093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011095
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011096# check for openpty and forkpty
11097
11098for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011099do :
11100 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011101if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011103#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011104_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011105
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011106else
Matthias Kloseb9621712010-04-24 17:59:49 +000011107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11108$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011109if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011110 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011111else
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011113LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011117/* Override any GCC internal prototype to avoid an error.
11118 Use char because int might match the return type of a GCC
11119 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011120#ifdef __cplusplus
11121extern "C"
11122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011123char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011124int
11125main ()
11126{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011127return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011128 ;
11129 return 0;
11130}
11131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011132if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011134else
Matthias Kloseb9621712010-04-24 17:59:49 +000011135 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011137rm -f core conftest.err conftest.$ac_objext \
11138 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011139LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11142$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011143if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011144 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011145 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011146else
Matthias Kloseb9621712010-04-24 17:59:49 +000011147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11148$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011149if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011151else
11152 ac_check_lib_save_LIBS=$LIBS
11153LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011155/* end confdefs.h. */
11156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011157/* Override any GCC internal prototype to avoid an error.
11158 Use char because int might match the return type of a GCC
11159 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011160#ifdef __cplusplus
11161extern "C"
11162#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011163char openpty ();
11164int
11165main ()
11166{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011167return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011168 ;
11169 return 0;
11170}
11171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011172if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011173 ac_cv_lib_bsd_openpty=yes
11174else
Matthias Kloseb9621712010-04-24 17:59:49 +000011175 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011177rm -f core conftest.err conftest.$ac_objext \
11178 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011179LIBS=$ac_check_lib_save_LIBS
11180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11182$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011183if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011184 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011185 LIBS="$LIBS -lbsd"
11186fi
11187
11188
11189fi
11190
Fred Drake8cef4cf2000-06-28 16:40:38 +000011191
11192fi
11193done
11194
11195for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011196do :
11197 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011198if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011200#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011201_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011202
Fred Drake8cef4cf2000-06-28 16:40:38 +000011203else
Matthias Kloseb9621712010-04-24 17:59:49 +000011204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11205$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011206if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011207 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011208else
Martin v. Löwis11437992002-04-12 09:54:03 +000011209 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011210LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214/* Override any GCC internal prototype to avoid an error.
11215 Use char because int might match the return type of a GCC
11216 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011217#ifdef __cplusplus
11218extern "C"
11219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011220char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011221int
11222main ()
11223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011224return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 ;
11226 return 0;
11227}
11228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011229if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011230 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011231else
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011234rm -f core conftest.err conftest.$ac_objext \
11235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011236LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11239$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011240if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011242 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011243else
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11245$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011246if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011247 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011248else
11249 ac_check_lib_save_LIBS=$LIBS
11250LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011252/* end confdefs.h. */
11253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011254/* Override any GCC internal prototype to avoid an error.
11255 Use char because int might match the return type of a GCC
11256 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011257#ifdef __cplusplus
11258extern "C"
11259#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011260char forkpty ();
11261int
11262main ()
11263{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011270 ac_cv_lib_bsd_forkpty=yes
11271else
Matthias Kloseb9621712010-04-24 17:59:49 +000011272 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011274rm -f core conftest.err conftest.$ac_objext \
11275 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011276LIBS=$ac_check_lib_save_LIBS
11277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11279$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011280if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011282 LIBS="$LIBS -lbsd"
11283fi
11284
11285
11286fi
11287
Fred Drake8cef4cf2000-06-28 16:40:38 +000011288
11289fi
11290done
11291
Jack Jansendd19cf82001-12-06 22:36:17 +000011292
Christian Heimesb186d002008-03-18 15:15:01 +000011293# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011294for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011295do :
11296 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011297if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011298 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011299#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011300_ACEOF
11301
11302fi
11303done
11304
11305
Michael W. Hudson54241132001-12-07 15:38:26 +000011306# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011307for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011308do :
11309 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11310ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011311if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011312 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011313#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011314_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011315
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011316fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011317done
11318
Michael W. Hudson54241132001-12-07 15:38:26 +000011319
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011320ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011321if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011322 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011323
Martin v. Löwis1142de32002-03-29 16:28:31 +000011324else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011325 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011326 *" dup2.$ac_objext "* ) ;;
11327 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011328 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011329esac
11330
Martin v. Löwis1142de32002-03-29 16:28:31 +000011331fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011332
11333ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011334if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011335 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11336
11337else
11338 case " $LIBOBJS " in
11339 *" getcwd.$ac_objext "* ) ;;
11340 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11341 ;;
11342esac
11343
11344fi
11345
11346ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011347if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011348 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11349
11350else
11351 case " $LIBOBJS " in
11352 *" strdup.$ac_objext "* ) ;;
11353 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11354 ;;
11355esac
11356
11357fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011358
11359
11360for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011361do :
11362 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011363if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011365#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011369#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011370int
11371main ()
11372{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011373getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011374 ;
11375 return 0;
11376}
11377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011381
Guido van Rossum627b2d71993-12-24 10:39:16 +000011382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011384
Guido van Rossum627b2d71993-12-24 10:39:16 +000011385fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011386done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011387
Jack Jansen150753c2003-03-29 22:07:47 +000011388for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011389do :
11390 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011391if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011392 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011393#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011396/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011397#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011398int
11399main ()
11400{
11401setpgrp(0,0);
11402 ;
11403 return 0;
11404}
11405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011409
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011412
11413fi
11414done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011415
Thomas Wouters3a584202000-08-05 23:28:51 +000011416for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011417do :
11418 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011419if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011420 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011421#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011424/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011425#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011426int
11427main ()
11428{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011429gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011430 ;
11431 return 0;
11432}
11433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011434if ac_fn_c_try_compile "$LINENO"; then :
11435
Guido van Rossum627b2d71993-12-24 10:39:16 +000011436else
Skip Montanaro6dead952003-09-25 14:50:04 +000011437
Matthias Kloseb9621712010-04-24 17:59:49 +000011438$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011439
Martin v. Löwis11437992002-04-12 09:54:03 +000011440
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011443
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011444fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011445done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011446
Michael W. Hudson54241132001-12-07 15:38:26 +000011447
Victor Stinnere0be4232011-10-25 13:06:09 +020011448for ac_func in clock_gettime
11449do :
11450 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11451if test "x$ac_cv_func_clock_gettime" = xyes; then :
11452 cat >>confdefs.h <<_ACEOF
11453#define HAVE_CLOCK_GETTIME 1
11454_ACEOF
11455
11456else
11457
11458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11459$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11460if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11461 $as_echo_n "(cached) " >&6
11462else
11463 ac_check_lib_save_LIBS=$LIBS
11464LIBS="-lrt $LIBS"
11465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11466/* end confdefs.h. */
11467
11468/* Override any GCC internal prototype to avoid an error.
11469 Use char because int might match the return type of a GCC
11470 builtin and then its argument prototype would still apply. */
11471#ifdef __cplusplus
11472extern "C"
11473#endif
11474char clock_gettime ();
11475int
11476main ()
11477{
11478return clock_gettime ();
11479 ;
11480 return 0;
11481}
11482_ACEOF
11483if ac_fn_c_try_link "$LINENO"; then :
11484 ac_cv_lib_rt_clock_gettime=yes
11485else
11486 ac_cv_lib_rt_clock_gettime=no
11487fi
11488rm -f core conftest.err conftest.$ac_objext \
11489 conftest$ac_exeext conftest.$ac_ext
11490LIBS=$ac_check_lib_save_LIBS
11491fi
11492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11493$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11494if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11495
11496 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11497
11498
11499$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11500
11501
11502fi
11503
11504
11505fi
11506done
11507
11508
11509for ac_func in clock_getres
11510do :
11511 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11512if test "x$ac_cv_func_clock_getres" = xyes; then :
11513 cat >>confdefs.h <<_ACEOF
11514#define HAVE_CLOCK_GETRES 1
11515_ACEOF
11516
11517else
11518
11519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11520$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11521if ${ac_cv_lib_rt_clock_getres+:} false; then :
11522 $as_echo_n "(cached) " >&6
11523else
11524 ac_check_lib_save_LIBS=$LIBS
11525LIBS="-lrt $LIBS"
11526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11527/* end confdefs.h. */
11528
11529/* Override any GCC internal prototype to avoid an error.
11530 Use char because int might match the return type of a GCC
11531 builtin and then its argument prototype would still apply. */
11532#ifdef __cplusplus
11533extern "C"
11534#endif
11535char clock_getres ();
11536int
11537main ()
11538{
11539return clock_getres ();
11540 ;
11541 return 0;
11542}
11543_ACEOF
11544if ac_fn_c_try_link "$LINENO"; then :
11545 ac_cv_lib_rt_clock_getres=yes
11546else
11547 ac_cv_lib_rt_clock_getres=no
11548fi
11549rm -f core conftest.err conftest.$ac_objext \
11550 conftest$ac_exeext conftest.$ac_ext
11551LIBS=$ac_check_lib_save_LIBS
11552fi
11553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11554$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11555if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11556
11557 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11558
11559
11560fi
11561
11562
11563fi
11564done
11565
11566
Matthias Kloseb9621712010-04-24 17:59:49 +000011567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11568$as_echo_n "checking for major... " >&6; }
11569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011570/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011571
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011572#if defined(MAJOR_IN_MKDEV)
11573#include <sys/mkdev.h>
11574#elif defined(MAJOR_IN_SYSMACROS)
11575#include <sys/sysmacros.h>
11576#else
11577#include <sys/types.h>
11578#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011579
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011580int
11581main ()
11582{
11583
11584 makedev(major(0),minor(0));
11585
11586 ;
11587 return 0;
11588}
11589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011590if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011591
11592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11596$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011597
11598else
Skip Montanaro6dead952003-09-25 14:50:04 +000011599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11601$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011602
11603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011604rm -f core conftest.err conftest.$ac_objext \
11605 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011606
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011607# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011608# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11610$as_echo_n "checking for getaddrinfo... " >&6; }
11611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011612/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011613
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011614#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011615#include <sys/socket.h>
11616#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011617#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011618
Martin v. Löwis11437992002-04-12 09:54:03 +000011619int
11620main ()
11621{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011622getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011623 ;
11624 return 0;
11625}
11626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011627if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011628 have_getaddrinfo=yes
11629else
Matthias Kloseb9621712010-04-24 17:59:49 +000011630 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011632rm -f core conftest.err conftest.$ac_objext \
11633 conftest$ac_exeext conftest.$ac_ext
11634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11635$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011636if test $have_getaddrinfo = yes
11637then
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11639$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011640 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011642else
Matthias Kloseb9621712010-04-24 17:59:49 +000011643 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011644
11645if test "${enable_ipv6+set}" = set; then
11646 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11647else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011648 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011649fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011650else
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011652/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011653
Stefan Krah19c21392012-11-22 23:47:32 +010011654#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011655#include <sys/types.h>
11656#include <netdb.h>
11657#include <string.h>
11658#include <sys/socket.h>
11659#include <netinet/in.h>
11660
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011661int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011662{
11663 int passive, gaierr, inet4 = 0, inet6 = 0;
11664 struct addrinfo hints, *ai, *aitop;
11665 char straddr[INET6_ADDRSTRLEN], strport[16];
11666
11667 for (passive = 0; passive <= 1; passive++) {
11668 memset(&hints, 0, sizeof(hints));
11669 hints.ai_family = AF_UNSPEC;
11670 hints.ai_flags = passive ? AI_PASSIVE : 0;
11671 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011672 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011673 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11674 (void)gai_strerror(gaierr);
11675 goto bad;
11676 }
11677 for (ai = aitop; ai; ai = ai->ai_next) {
11678 if (ai->ai_addr == NULL ||
11679 ai->ai_addrlen == 0 ||
11680 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11681 straddr, sizeof(straddr), strport, sizeof(strport),
11682 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11683 goto bad;
11684 }
11685 switch (ai->ai_family) {
11686 case AF_INET:
11687 if (strcmp(strport, "54321") != 0) {
11688 goto bad;
11689 }
11690 if (passive) {
11691 if (strcmp(straddr, "0.0.0.0") != 0) {
11692 goto bad;
11693 }
11694 } else {
11695 if (strcmp(straddr, "127.0.0.1") != 0) {
11696 goto bad;
11697 }
11698 }
11699 inet4++;
11700 break;
11701 case AF_INET6:
11702 if (strcmp(strport, "54321") != 0) {
11703 goto bad;
11704 }
11705 if (passive) {
11706 if (strcmp(straddr, "::") != 0) {
11707 goto bad;
11708 }
11709 } else {
11710 if (strcmp(straddr, "::1") != 0) {
11711 goto bad;
11712 }
11713 }
11714 inet6++;
11715 break;
11716 case AF_UNSPEC:
11717 goto bad;
11718 break;
11719 default:
11720 /* another family support? */
11721 break;
11722 }
11723 }
11724 }
11725
11726 if (!(inet4 == 0 || inet4 == 2))
11727 goto bad;
11728 if (!(inet6 == 0 || inet6 == 2))
11729 goto bad;
11730
11731 if (aitop)
11732 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011733 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011734
11735 bad:
11736 if (aitop)
11737 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011738 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011739}
11740
Martin v. Löwis11437992002-04-12 09:54:03 +000011741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011742if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011743 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011744else
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011749fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011750
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011751fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011752
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011754
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11756$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11757
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011758if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011759then
11760 if test $ipv6 = yes
11761 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011762 echo 'Fatal: You must get working getaddrinfo() function.'
11763 echo ' or you can specify "--disable-ipv6"'.
11764 exit 1
11765 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011766else
Martin v. Löwis11437992002-04-12 09:54:03 +000011767
Matthias Kloseb9621712010-04-24 17:59:49 +000011768$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011769
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011770fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011771
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011772for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011773do :
11774 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011775if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011776 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011777#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011778_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011779
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011780fi
11781done
11782
Michael W. Hudson54241132001-12-07 15:38:26 +000011783
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011784# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11786$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011787if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011788 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011789else
Matthias Kloseb9621712010-04-24 17:59:49 +000011790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011791/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011792#include <sys/types.h>
11793#include <sys/time.h>
11794#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011795
Martin v. Löwis11437992002-04-12 09:54:03 +000011796int
11797main ()
11798{
11799if ((struct tm *) 0)
11800return 0;
11801 ;
11802 return 0;
11803}
11804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011805if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011806 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011807else
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11813$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011814if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011815
Matthias Kloseb9621712010-04-24 17:59:49 +000011816$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011817
11818fi
11819
Matthias Kloseb9621712010-04-24 17:59:49 +000011820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11821$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011822if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011823 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011824else
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011826/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011827#include <sys/types.h>
11828#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011829
Martin v. Löwis11437992002-04-12 09:54:03 +000011830int
11831main ()
11832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011833struct tm tm;
11834 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011835 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 ;
11837 return 0;
11838}
11839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011841 ac_cv_struct_tm=time.h
11842else
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11848$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011849if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011850
Matthias Kloseb9621712010-04-24 17:59:49 +000011851$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011852
11853fi
11854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855ac_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 +000011856#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011857
Matthias Kloseb9621712010-04-24 17:59:49 +000011858"
Victor Stinnere0be4232011-10-25 13:06:09 +020011859if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011860
11861cat >>confdefs.h <<_ACEOF
11862#define HAVE_STRUCT_TM_TM_ZONE 1
11863_ACEOF
11864
11865
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011866fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011867
Martin v. Löwis11437992002-04-12 09:54:03 +000011868if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11869
Matthias Kloseb9621712010-04-24 17:59:49 +000011870$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011871
11872else
Matthias Kloseb9621712010-04-24 17:59:49 +000011873 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11874"
Victor Stinnere0be4232011-10-25 13:06:09 +020011875if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011877else
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011879fi
11880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011881cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011882#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011883_ACEOF
11884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11886$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011887if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011889else
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011891/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011892#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011893#if !HAVE_DECL_TZNAME
11894extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011895#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011896
Martin v. Löwis11437992002-04-12 09:54:03 +000011897int
11898main ()
11899{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011900return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011901 ;
11902 return 0;
11903}
11904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011905if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011906 ac_cv_var_tzname=yes
11907else
Matthias Kloseb9621712010-04-24 17:59:49 +000011908 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011910rm -f core conftest.err conftest.$ac_objext \
11911 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11914$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011915 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011916
Matthias Kloseb9621712010-04-24 17:59:49 +000011917$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011918
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011919 fi
11920fi
11921
Matthias Kloseb9621712010-04-24 17:59:49 +000011922ac_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 +020011923if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011924
11925cat >>confdefs.h <<_ACEOF
11926#define HAVE_STRUCT_STAT_ST_RDEV 1
11927_ACEOF
11928
11929
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011930fi
11931
Matthias Kloseb9621712010-04-24 17:59:49 +000011932ac_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 +020011933if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011934
Martin v. Löwis11437992002-04-12 09:54:03 +000011935cat >>confdefs.h <<_ACEOF
11936#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11937_ACEOF
11938
11939
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011940fi
11941
Matthias Kloseb9621712010-04-24 17:59:49 +000011942ac_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 +020011943if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011944
11945cat >>confdefs.h <<_ACEOF
11946#define HAVE_STRUCT_STAT_ST_FLAGS 1
11947_ACEOF
11948
11949
11950fi
11951
Matthias Kloseb9621712010-04-24 17:59:49 +000011952ac_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 +020011953if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011954
11955cat >>confdefs.h <<_ACEOF
11956#define HAVE_STRUCT_STAT_ST_GEN 1
11957_ACEOF
11958
11959
11960fi
11961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962ac_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 +020011963if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011964
11965cat >>confdefs.h <<_ACEOF
11966#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11967_ACEOF
11968
11969
11970fi
11971
Matthias Kloseb9621712010-04-24 17:59:49 +000011972ac_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 +020011973if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011974
Martin v. Löwis11437992002-04-12 09:54:03 +000011975cat >>confdefs.h <<_ACEOF
11976#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11977_ACEOF
11978
11979
Matthias Kloseb9621712010-04-24 17:59:49 +000011980$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011981
11982else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011983 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011984 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011985 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11986 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011987esac
11988
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011989fi
11990
Michael W. Hudson54241132001-12-07 15:38:26 +000011991
Martin v. Löwis11437992002-04-12 09:54:03 +000011992
Matthias Kloseb9621712010-04-24 17:59:49 +000011993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11994$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011995if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011997else
Matthias Kloseb159a552010-04-25 21:00:44 +000011998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012000/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012001#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012002int
12003main ()
12004{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012005return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012006 ;
12007 return 0;
12008}
12009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012010if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012011 ac_cv_header_time_altzone=yes
12012else
Matthias Kloseb9621712010-04-24 17:59:49 +000012013 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012017fi
12018
Matthias Kloseb9621712010-04-24 17:59:49 +000012019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12020$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012021if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012022
Matthias Kloseb9621712010-04-24 17:59:49 +000012023$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012024
12025fi
12026
Guido van Rossumda88dad1995-01-26 00:46:29 +000012027was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12029$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012031/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012032
12033#include <sys/types.h>
12034#include <sys/select.h>
12035#include <sys/time.h>
12036
Martin v. Löwis11437992002-04-12 09:54:03 +000012037int
12038main ()
12039{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012040;
Martin v. Löwis11437992002-04-12 09:54:03 +000012041 ;
12042 return 0;
12043}
12044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012045if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012046
12047
Matthias Kloseb9621712010-04-24 17:59:49 +000012048$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012049
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012050 was_it_defined=yes
12051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12055$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12058$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012059if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012061else
Matthias Kloseb9621712010-04-24 17:59:49 +000012062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012063/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012064#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012065int
12066main ()
12067{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012068struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012069 ;
12070 return 0;
12071}
12072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012073if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012074 ac_cv_struct_addrinfo=yes
12075else
Matthias Kloseb9621712010-04-24 17:59:49 +000012076 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12079fi
12080
Matthias Kloseb9621712010-04-24 17:59:49 +000012081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12082$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012083if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012084
Matthias Kloseb9621712010-04-24 17:59:49 +000012085$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012086
12087fi
12088
Matthias Kloseb9621712010-04-24 17:59:49 +000012089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12090$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012091if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012092 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012093else
Matthias Kloseb9621712010-04-24 17:59:49 +000012094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012095/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012096
12097# include <sys/types.h>
12098# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012099int
12100main ()
12101{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012102struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 ;
12104 return 0;
12105}
12106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012107if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012108 ac_cv_struct_sockaddr_storage=yes
12109else
Matthias Kloseb9621712010-04-24 17:59:49 +000012110 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12113fi
12114
Matthias Kloseb9621712010-04-24 17:59:49 +000012115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12116$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012117if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012118
Matthias Kloseb9621712010-04-24 17:59:49 +000012119$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012120
12121fi
12122
Guido van Rossum627b2d71993-12-24 10:39:16 +000012123# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012124
Matthias Kloseb9621712010-04-24 17:59:49 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12126$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012127if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012132$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012133int
12134main ()
12135{
12136static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012137test_array [0] = 0;
12138return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012139
12140 ;
12141 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012142}
Martin v. Löwis11437992002-04-12 09:54:03 +000012143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012144if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012145 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12152$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012153if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012155
12156fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012157
Matthias Kloseb9621712010-04-24 17:59:49 +000012158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12159$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012160if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012161 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012162else
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012164/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012165
Martin v. Löwis11437992002-04-12 09:54:03 +000012166int
12167main ()
12168{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012169
Martin v. Löwis11437992002-04-12 09:54:03 +000012170#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012171 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012173 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012174 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012175 char const *const *pcpcc;
12176 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 /* NEC SVR4.0.2 mips cc rejects this. */
12178 struct point {int x, y;};
12179 static struct point const zero = {0,0};
12180 /* AIX XL C 1.02.0.0 rejects this.
12181 It does not let you subtract one const X* pointer from another in
12182 an arm of an if-expression whose if-part is not a constant
12183 expression */
12184 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012185 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012187 ++pcpcc;
12188 ppc = (char**) pcpcc;
12189 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012190 { /* SCO 3.2v4 cc rejects this sort of thing. */
12191 char tx;
12192 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012193 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012194
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012197 }
12198 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12199 int x[] = {25, 17};
12200 const int *foo = &x[0];
12201 ++foo;
12202 }
12203 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12204 typedef const int *iptr;
12205 iptr p = 0;
12206 ++p;
12207 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012208 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012210 struct s { int j; const int *ap[3]; } bx;
12211 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 }
12213 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12214 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012215 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012217 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012218#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012219
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 ;
12221 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012222}
Martin v. Löwis11437992002-04-12 09:54:03 +000012223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012224if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012225 ac_cv_c_const=yes
12226else
Matthias Kloseb9621712010-04-24 17:59:49 +000012227 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12232$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012233if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012234
Matthias Kloseb9621712010-04-24 17:59:49 +000012235$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012236
12237fi
12238
Michael W. Hudson54241132001-12-07 15:38:26 +000012239
Guido van Rossumda88dad1995-01-26 00:46:29 +000012240works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12242$as_echo_n "checking for working volatile... " >&6; }
12243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012244/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012245
Martin v. Löwis11437992002-04-12 09:54:03 +000012246int
12247main ()
12248{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012249volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012250 ;
12251 return 0;
12252}
12253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012254if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012255 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012256else
Skip Montanaro6dead952003-09-25 14:50:04 +000012257
Matthias Kloseb9621712010-04-24 17:59:49 +000012258$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012259
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012260
Guido van Rossum627b2d71993-12-24 10:39:16 +000012261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12264$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012265
Guido van Rossumda88dad1995-01-26 00:46:29 +000012266works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12268$as_echo_n "checking for working signed char... " >&6; }
12269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012270/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012271
Martin v. Löwis11437992002-04-12 09:54:03 +000012272int
12273main ()
12274{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012275signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012276 ;
12277 return 0;
12278}
12279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012280if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012281 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012282else
Skip Montanaro6dead952003-09-25 14:50:04 +000012283
Matthias Kloseb9621712010-04-24 17:59:49 +000012284$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012285
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012286
Guido van Rossum7f43da71994-08-01 12:15:30 +000012287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12290$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012291
Guido van Rossumda88dad1995-01-26 00:46:29 +000012292have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12294$as_echo_n "checking for prototypes... " >&6; }
12295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012296/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012297int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012298int
12299main ()
12300{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012301return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 ;
12303 return 0;
12304}
12305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
Matthias Kloseb9621712010-04-24 17:59:49 +000012308$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012309
Matthias Kloseb159a552010-04-25 21:00:44 +000012310 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012311fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12314$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012315
Guido van Rossumda88dad1995-01-26 00:46:29 +000012316works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12318$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012320/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012321
12322#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012323int foo(int x, ...) {
12324 va_list va;
12325 va_start(va, x);
12326 va_arg(va, int);
12327 va_arg(va, char *);
12328 va_arg(va, double);
12329 return 0;
12330}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012331
Martin v. Löwis11437992002-04-12 09:54:03 +000012332int
12333main ()
12334{
Guido van Rossum90eea071996-08-30 20:58:57 +000012335return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012336 ;
12337 return 0;
12338}
12339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012340if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012341
12342
Matthias Kloseb9621712010-04-24 17:59:49 +000012343$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012344
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012345 works=yes
12346
Guido van Rossum627b2d71993-12-24 10:39:16 +000012347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12350$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012351
Martin v. Löwisd6320502004-08-12 13:45:08 +000012352# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12354$as_echo_n "checking for socketpair... " >&6; }
12355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012356/* end confdefs.h. */
12357
12358#include <sys/types.h>
12359#include <sys/socket.h>
12360
12361int
12362main ()
12363{
12364void *x=socketpair
12365 ;
12366 return 0;
12367}
12368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012370
Matthias Kloseb9621712010-04-24 17:59:49 +000012371$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012372
Matthias Kloseb159a552010-04-25 21:00:44 +000012373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012374$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012375else
Matthias Kloseb9621712010-04-24 17:59:49 +000012376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12377$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012378
12379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012381
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012382# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12384$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012386/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012387#include <sys/types.h>
12388#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012389int
12390main ()
12391{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012392struct sockaddr x;
12393x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012394 ;
12395 return 0;
12396}
12397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012398if ac_fn_c_try_compile "$LINENO"; then :
12399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12400$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012401
Matthias Kloseb9621712010-04-24 17:59:49 +000012402$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012403
12404else
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12406$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012407
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012410
Guido van Rossumda88dad1995-01-26 00:46:29 +000012411va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12413$as_echo_n "checking whether va_list is an array... " >&6; }
12414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012415/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416
12417#ifdef HAVE_STDARG_PROTOTYPES
12418#include <stdarg.h>
12419#else
12420#include <varargs.h>
12421#endif
12422
Martin v. Löwis11437992002-04-12 09:54:03 +000012423int
12424main ()
12425{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012426va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012427 ;
12428 return 0;
12429}
12430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012431if ac_fn_c_try_compile "$LINENO"; then :
12432
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012433else
Skip Montanaro6dead952003-09-25 14:50:04 +000012434
Martin v. Löwis11437992002-04-12 09:54:03 +000012435
Matthias Kloseb9621712010-04-24 17:59:49 +000012436$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012437
Guido van Rossumda88dad1995-01-26 00:46:29 +000012438 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012439
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12443$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012444
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012445# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
12447
Matthias Kloseb9621712010-04-24 17:59:49 +000012448ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012449if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012450
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012452
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12454$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012455 OLD_CFLAGS=$CFLAGS
12456 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012458/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012459
12460# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012461
Martin v. Löwis11437992002-04-12 09:54:03 +000012462int
12463main ()
12464{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012465
12466 char *name;
12467 struct hostent *he, *res;
12468 char buffer[2048];
12469 int buflen = 2048;
12470 int h_errnop;
12471
12472 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012473
12474 ;
12475 return 0;
12476}
12477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012478if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012479
Matthias Kloseb9621712010-04-24 17:59:49 +000012480 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012481
Martin v. Löwis11437992002-04-12 09:54:03 +000012482
Matthias Kloseb9621712010-04-24 17:59:49 +000012483$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12486$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012487
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012488else
Skip Montanaro6dead952003-09-25 14:50:04 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12491$as_echo "no" >&6; }
12492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12493$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012495/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012496
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012497# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
Martin v. Löwis11437992002-04-12 09:54:03 +000012499int
12500main ()
12501{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012502
12503 char *name;
12504 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012505 char buffer[2048];
12506 int buflen = 2048;
12507 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012508
Matthias Kloseb159a552010-04-25 21:00:44 +000012509 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012510
12511 ;
12512 return 0;
12513}
12514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012515if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012516
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012518
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
Matthias Kloseb159a552010-04-25 21:00:44 +000012520$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012521
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12523$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012524
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012525else
Skip Montanaro6dead952003-09-25 14:50:04 +000012526
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12528$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12530$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12532/* end confdefs.h. */
12533
12534# include <netdb.h>
12535
12536int
12537main ()
12538{
12539
12540 char *name;
12541 struct hostent *he;
12542 struct hostent_data data;
12543
12544 (void) gethostbyname_r(name, he, &data);
12545
12546 ;
12547 return 0;
12548}
12549_ACEOF
12550if ac_fn_c_try_compile "$LINENO"; then :
12551
12552 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12553
12554
12555$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12556
12557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12558$as_echo "yes" >&6; }
12559
12560else
12561
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12563$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012564
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012573 CFLAGS=$OLD_CFLAGS
12574
12575else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012576
Matthias Kloseb9621712010-04-24 17:59:49 +000012577 for ac_func in gethostbyname
12578do :
12579 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012580if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012581 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012582#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012583_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012584
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012585fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012586done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012587
Michael W. Hudson54241132001-12-07 15:38:26 +000012588
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012589fi
12590
Michael W. Hudson54241132001-12-07 15:38:26 +000012591
12592
12593
12594
12595
12596
Guido van Rossum627b2d71993-12-24 10:39:16 +000012597# checks for system services
12598# (none yet)
12599
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012600# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012601ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012602if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012603
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012604else
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12606$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012607if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012609else
Martin v. Löwis11437992002-04-12 09:54:03 +000012610 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012611LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012615/* Override any GCC internal prototype to avoid an error.
12616 Use char because int might match the return type of a GCC
12617 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012618#ifdef __cplusplus
12619extern "C"
12620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012621char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012622int
12623main ()
12624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012625return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 ;
12627 return 0;
12628}
12629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012630if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012631 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012632else
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012635rm -f core conftest.err conftest.$ac_objext \
12636 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012637LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012638fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12640$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012641if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012642 cat >>confdefs.h <<_ACEOF
12643#define HAVE_LIBIEEE 1
12644_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012645
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012646 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012647
Guido van Rossum627b2d71993-12-24 10:39:16 +000012648fi
12649
Michael W. Hudson54241132001-12-07 15:38:26 +000012650
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012651fi
12652
Michael W. Hudson54241132001-12-07 15:38:26 +000012653
Guido van Rossum7f253911997-05-09 02:42:48 +000012654# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12656$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012658# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012659if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012660 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012661if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012662then
12663
Matthias Kloseb9621712010-04-24 17:59:49 +000012664$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012665
Matthias Kloseb9621712010-04-24 17:59:49 +000012666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12667$as_echo "yes" >&6; }
12668else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12669$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012670fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012671else
Matthias Kloseb9621712010-04-24 17:59:49 +000012672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12673$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674fi
12675
Guido van Rossum7f253911997-05-09 02:42:48 +000012676
Guido van Rossum7f43da71994-08-01 12:15:30 +000012677# check for --with-libm=...
12678
Guido van Rossum563e7081996-09-10 18:20:48 +000012679case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012680Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012681*) LIBM=-lm
12682esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12684$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012686# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012687if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012688 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012689if test "$withval" = no
12690then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12692$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012693elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012694then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12696$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012697else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012698fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012699else
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12701$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012702fi
12703
Guido van Rossum7f43da71994-08-01 12:15:30 +000012704
12705# check for --with-libc=...
12706
Matthias Kloseb9621712010-04-24 17:59:49 +000012707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12708$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012710# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012711if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012712 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012713if test "$withval" = no
12714then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12716$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012717elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012718then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12720$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012721else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012722fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012723else
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12725$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726fi
12727
Guido van Rossum7f43da71994-08-01 12:15:30 +000012728
Stefan Krah1919b7e2012-03-21 18:25:23 +010012729# **************************************
12730# * Check for gcc x64 inline assembler *
12731# **************************************
12732
12733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12734$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12736/* end confdefs.h. */
12737
12738int
12739main ()
12740{
12741
12742 __asm__ __volatile__ ("movq %rcx, %rax");
12743
12744 ;
12745 return 0;
12746}
12747_ACEOF
12748if ac_fn_c_try_compile "$LINENO"; then :
12749 have_gcc_asm_for_x64=yes
12750else
12751 have_gcc_asm_for_x64=no
12752fi
12753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12755$as_echo "$have_gcc_asm_for_x64" >&6; }
12756if test "$have_gcc_asm_for_x64" = yes
12757then
12758
12759$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12760
12761fi
12762
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012763# **************************************************
12764# * Check for various properties of floating point *
12765# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12768$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012769if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012771else
12772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012774 ac_cv_little_endian_double=no
12775else
Matthias Kloseb9621712010-04-24 17:59:49 +000012776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012777/* end confdefs.h. */
12778
12779#include <string.h>
12780int main() {
12781 double x = 9006104071832581.0;
12782 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12783 return 0;
12784 else
12785 return 1;
12786}
12787
12788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012789if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012790 ac_cv_little_endian_double=yes
12791else
Matthias Kloseb9621712010-04-24 17:59:49 +000012792 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012796fi
12797
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012798fi
12799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12801$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012802if test "$ac_cv_little_endian_double" = yes
12803then
12804
Matthias Kloseb9621712010-04-24 17:59:49 +000012805$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012806
12807fi
12808
Matthias Kloseb9621712010-04-24 17:59:49 +000012809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12810$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012811if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012812 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012813else
12814
Matthias Kloseb9621712010-04-24 17:59:49 +000012815if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012816 ac_cv_big_endian_double=no
12817else
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012819/* end confdefs.h. */
12820
12821#include <string.h>
12822int main() {
12823 double x = 9006104071832581.0;
12824 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12825 return 0;
12826 else
12827 return 1;
12828}
12829
12830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012831if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012832 ac_cv_big_endian_double=yes
12833else
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012838fi
12839
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012840fi
12841
Matthias Kloseb9621712010-04-24 17:59:49 +000012842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12843$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012844if test "$ac_cv_big_endian_double" = yes
12845then
12846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012848
12849fi
12850
12851# Some ARM platforms use a mixed-endian representation for doubles.
12852# While Python doesn't currently have full support for these platforms
12853# (see e.g., issue 1762561), we can at least make sure that float <-> string
12854# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12856$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012857if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012859else
12860
Matthias Kloseb9621712010-04-24 17:59:49 +000012861if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012862 ac_cv_mixed_endian_double=no
12863else
Matthias Kloseb9621712010-04-24 17:59:49 +000012864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012865/* end confdefs.h. */
12866
12867#include <string.h>
12868int main() {
12869 double x = 9006104071832581.0;
12870 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12871 return 0;
12872 else
12873 return 1;
12874}
12875
12876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012877if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012878 ac_cv_mixed_endian_double=yes
12879else
Matthias Kloseb9621712010-04-24 17:59:49 +000012880 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012884fi
12885
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012886fi
12887
Matthias Kloseb9621712010-04-24 17:59:49 +000012888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12889$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012890if test "$ac_cv_mixed_endian_double" = yes
12891then
12892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012894
12895fi
12896
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012897# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012898# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012899# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012900# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012901# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012902# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012903
12904# This inline assembler syntax may also work for suncc and icc,
12905# so we try it on all platforms.
12906
Matthias Kloseb9621712010-04-24 17:59:49 +000012907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12908$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012910/* end confdefs.h. */
12911
12912int
12913main ()
12914{
12915
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012916 unsigned short cw;
12917 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12918 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012919
12920 ;
12921 return 0;
12922}
12923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012924if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012925 have_gcc_asm_for_x87=yes
12926else
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012928fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12931$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012932if test "$have_gcc_asm_for_x87" = yes
12933then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012934
Matthias Kloseb9621712010-04-24 17:59:49 +000012935$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012936
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012937fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012938
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012939# Detect whether system arithmetic is subject to x87-style double
12940# rounding issues. The result of this test has little meaning on non
12941# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12942# mode is round-to-nearest and double rounding issues are present, and
12943# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12945$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012946# $BASECFLAGS may affect the result
12947ac_save_cc="$CC"
12948CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012949if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012950 ac_cv_x87_double_rounding=no
12951else
Matthias Kloseb9621712010-04-24 17:59:49 +000012952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012953/* end confdefs.h. */
12954
12955#include <stdlib.h>
12956#include <math.h>
12957int main() {
12958 volatile double x, y, z;
12959 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12960 x = 0.99999999999999989; /* 1-2**-53 */
12961 y = 1./x;
12962 if (y != 1.)
12963 exit(0);
12964 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12965 x = 1e16;
12966 y = 2.99999;
12967 z = x + y;
12968 if (z != 1e16+4.)
12969 exit(0);
12970 /* both tests show evidence of double rounding */
12971 exit(1);
12972}
12973
12974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012975if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012976 ac_cv_x87_double_rounding=no
12977else
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12981 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012982fi
12983
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012984CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12986$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012987if test "$ac_cv_x87_double_rounding" = yes
12988then
12989
Matthias Kloseb9621712010-04-24 17:59:49 +000012990$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012991
12992fi
12993
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012994# ************************************
12995# * Check for mathematical functions *
12996# ************************************
12997
12998LIBS_SAVE=$LIBS
12999LIBS="$LIBS $LIBM"
13000
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013001for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13002do :
13003 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13004ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013005if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013006 cat >>confdefs.h <<_ACEOF
13007#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13008_ACEOF
13009
13010fi
13011done
13012
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013013for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013014do :
13015 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13016ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013017if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013018 cat >>confdefs.h <<_ACEOF
13019#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13020_ACEOF
13021
13022fi
13023done
13024
13025ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13026"
Victor Stinnere0be4232011-10-25 13:06:09 +020013027if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013028 ac_have_decl=1
13029else
13030 ac_have_decl=0
13031fi
13032
13033cat >>confdefs.h <<_ACEOF
13034#define HAVE_DECL_ISINF $ac_have_decl
13035_ACEOF
13036ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13037"
Victor Stinnere0be4232011-10-25 13:06:09 +020013038if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013039 ac_have_decl=1
13040else
13041 ac_have_decl=0
13042fi
13043
13044cat >>confdefs.h <<_ACEOF
13045#define HAVE_DECL_ISNAN $ac_have_decl
13046_ACEOF
13047ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13048"
Victor Stinnere0be4232011-10-25 13:06:09 +020013049if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013050 ac_have_decl=1
13051else
13052 ac_have_decl=0
13053fi
13054
13055cat >>confdefs.h <<_ACEOF
13056#define HAVE_DECL_ISFINITE $ac_have_decl
13057_ACEOF
13058
13059
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013060# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13061# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13063$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013064if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013065 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013066else
13067
Matthias Kloseb9621712010-04-24 17:59:49 +000013068if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013069 ac_cv_tanh_preserves_zero_sign=no
13070else
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013072/* end confdefs.h. */
13073
13074#include <math.h>
13075#include <stdlib.h>
13076int main() {
13077 /* return 0 if either negative zeros don't exist
13078 on this platform or if negative zeros exist
13079 and tanh(-0.) == -0. */
13080 if (atan2(0., -1.) == atan2(-0., -1.) ||
13081 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13082 else exit(1);
13083}
13084
13085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013086if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013087 ac_cv_tanh_preserves_zero_sign=yes
13088else
Matthias Kloseb9621712010-04-24 17:59:49 +000013089 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013093fi
13094
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013095fi
13096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13098$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013099if test "$ac_cv_tanh_preserves_zero_sign" = yes
13100then
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013103
13104fi
13105
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013106if test "$ac_cv_func_log1p" = yes
13107then
13108 # On some versions of AIX, log1p(-0.) returns 0. instead of
13109 # -0. See issue #9920.
13110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13111$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013112 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013113 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013114else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013115
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013116 if test "$cross_compiling" = yes; then :
13117 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013118else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13120/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013121
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013122 #include <math.h>
13123 #include <stdlib.h>
13124 int main() {
13125 /* Fail if the signs of log1p(-0.) and -0. can be
13126 distinguished. */
13127 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13128 return 0;
13129 else
13130 return 1;
13131 }
13132
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013133_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013134if ac_fn_c_try_run "$LINENO"; then :
13135 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013136else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013137 ac_cv_log1p_drops_zero_sign=yes
13138fi
13139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13140 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013141fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013142
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013143fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013144
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13146$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13147fi
13148if test "$ac_cv_log1p_drops_zero_sign" = yes
13149then
13150
13151$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13152
13153fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013154
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013155LIBS=$LIBS_SAVE
13156
Mark Dickinsona614f042009-11-28 12:48:43 +000013157# For multiprocessing module, check that sem_open
13158# actually works. For FreeBSD versions <= 7.2,
13159# the kernel module that provides POSIX semaphores
13160# isn't loaded by default, so an attempt to call
13161# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13163$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013164if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013165 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013166else
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013168 ac_cv_posix_semaphores_enabled=yes
13169else
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013171/* end confdefs.h. */
13172
13173#include <unistd.h>
13174#include <fcntl.h>
13175#include <stdio.h>
13176#include <semaphore.h>
13177#include <sys/stat.h>
13178
13179int main(void) {
13180 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13181 if (a == SEM_FAILED) {
13182 perror("sem_open");
13183 return 1;
13184 }
13185 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013186 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013187 return 0;
13188}
13189
13190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013191if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013192 ac_cv_posix_semaphores_enabled=yes
13193else
Matthias Kloseb9621712010-04-24 17:59:49 +000013194 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013195fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013196rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13197 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013198fi
13199
13200
Mark Dickinsona614f042009-11-28 12:48:43 +000013201fi
13202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13204$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013205if test $ac_cv_posix_semaphores_enabled = no
13206then
13207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013209
13210fi
13211
Mark Dickinson10683072009-04-18 21:18:19 +000013212# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13214$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013215if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013216 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013217else
Matthias Kloseb9621712010-04-24 17:59:49 +000013218 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013219 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013220else
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013222/* end confdefs.h. */
13223
13224#include <unistd.h>
13225#include <fcntl.h>
13226#include <stdio.h>
13227#include <semaphore.h>
13228#include <sys/stat.h>
13229
13230int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013231 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013232 int count;
13233 int res;
13234 if(a==SEM_FAILED){
13235 perror("sem_open");
13236 return 1;
13237
13238 }
13239 res = sem_getvalue(a, &count);
13240 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013241 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013242 return res==-1 ? 1 : 0;
13243}
13244
Mark Dickinson10683072009-04-18 21:18:19 +000013245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013246if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013247 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013248else
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13252 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013253fi
13254
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013255
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013256fi
13257
Matthias Kloseb9621712010-04-24 17:59:49 +000013258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13259$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013260if test $ac_cv_broken_sem_getvalue = yes
13261then
13262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013264
13265fi
13266
Mark Dickinsonbd792642009-03-18 20:06:12 +000013267# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13269$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013270# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013271if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013272 enableval=$enable_big_digits; case $enable_big_digits in
13273yes)
13274 enable_big_digits=30 ;;
13275no)
13276 enable_big_digits=15 ;;
1327715|30)
13278 ;;
13279*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013280 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 +000013281esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13283$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013284
13285cat >>confdefs.h <<_ACEOF
13286#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13287_ACEOF
13288
13289
13290else
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13292$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013293fi
13294
13295
Guido van Rossumef2255b2000-03-10 22:30:29 +000013296# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013297ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013298if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
13300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013302
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013303 wchar_h="yes"
13304
Guido van Rossumef2255b2000-03-10 22:30:29 +000013305else
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013307
13308fi
13309
Michael W. Hudson54241132001-12-07 15:38:26 +000013310
Martin v. Löwis11437992002-04-12 09:54:03 +000013311
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013312# determine wchar_t size
13313if test "$wchar_h" = yes
13314then
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013316# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13317# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13318# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13320$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013321if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13325"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013326
Martin v. Löwis11437992002-04-12 09:54:03 +000013327else
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 if test "$ac_cv_type_wchar_t" = yes; then
13329 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13330$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013331as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013332See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013333 else
13334 ac_cv_sizeof_wchar_t=0
13335 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013337
Martin v. Löwis11437992002-04-12 09:54:03 +000013338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13340$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013341
13342
13343
Martin v. Löwis11437992002-04-12 09:54:03 +000013344cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013345#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013346_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013347
Michael W. Hudson54241132001-12-07 15:38:26 +000013348
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013349fi
13350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13352$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013353have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013355/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013356
13357#include <tcl.h>
13358#if TCL_UTF_MAX != 6
13359# error "NOT UCS4_TCL"
13360#endif
13361int
13362main ()
13363{
13364
13365 ;
13366 return 0;
13367}
13368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013370
13371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013373
13374 have_ucs4_tcl=yes
13375
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13379$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013380
Skip Montanaro6dead952003-09-25 14:50:04 +000013381# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013382if test "$wchar_h" = yes
13383then
13384 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13386$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013387 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013389else
13390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013392 ac_cv_wchar_t_signed=yes
13393else
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013395/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013396
13397 #include <wchar.h>
13398 int main()
13399 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013400 /* Success: exit code 0 */
13401 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013402 }
13403
13404_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013405if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013406 ac_cv_wchar_t_signed=yes
13407else
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13411 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013412fi
13413
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013414fi
13415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13417$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013418fi
13419
Georg Brandl52d168a2008-01-07 18:10:24 +000013420# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013421if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013422 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013423then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013424 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013427
Georg Brandl52d168a2008-01-07 18:10:24 +000013428else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013429 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013430fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13432$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013433
13434# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13436$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013437if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013439else
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 ac_cv_c_bigendian=unknown
13441 # See if we're dealing with a universal compiler.
13442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13443/* end confdefs.h. */
13444#ifndef __APPLE_CC__
13445 not a universal capable compiler
13446 #endif
13447 typedef int dummy;
13448
Skip Montanaro6dead952003-09-25 14:50:04 +000013449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013450if ac_fn_c_try_compile "$LINENO"; then :
13451
13452 # Check for potential -arch flags. It is not universal unless
13453 # there are at least two -arch flags with different values.
13454 ac_arch=
13455 ac_prev=
13456 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13457 if test -n "$ac_prev"; then
13458 case $ac_word in
13459 i?86 | x86_64 | ppc | ppc64)
13460 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13461 ac_arch=$ac_word
13462 else
13463 ac_cv_c_bigendian=universal
13464 break
13465 fi
13466 ;;
13467 esac
13468 ac_prev=
13469 elif test "x$ac_word" = "x-arch"; then
13470 ac_prev=arch
13471 fi
13472 done
13473fi
13474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13475 if test $ac_cv_c_bigendian = unknown; then
13476 # See if sys/param.h defines the BYTE_ORDER macro.
13477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013478/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013479#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013481
Martin v. Löwis11437992002-04-12 09:54:03 +000013482int
13483main ()
13484{
Matthias Kloseb9621712010-04-24 17:59:49 +000013485#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13486 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13487 && LITTLE_ENDIAN)
13488 bogus endian macros
13489 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013490
13491 ;
13492 return 0;
13493}
13494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013495if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013496 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013498/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013499#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013501
Martin v. Löwis11437992002-04-12 09:54:03 +000013502int
13503main ()
13504{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013505#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013506 not big endian
13507 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013508
13509 ;
13510 return 0;
13511}
13512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013513if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013514 ac_cv_c_bigendian=yes
13515else
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013519fi
13520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13521 fi
13522 if test $ac_cv_c_bigendian = unknown; then
13523 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013525/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013526#include <limits.h>
13527
Martin v. Löwis11437992002-04-12 09:54:03 +000013528int
13529main ()
13530{
Matthias Kloseb9621712010-04-24 17:59:49 +000013531#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13532 bogus endian macros
13533 #endif
13534
Martin v. Löwis11437992002-04-12 09:54:03 +000013535 ;
13536 return 0;
13537}
13538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013539if ac_fn_c_try_compile "$LINENO"; then :
13540 # It does; now see whether it defined to _BIG_ENDIAN or not.
13541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13542/* end confdefs.h. */
13543#include <limits.h>
13544
13545int
13546main ()
13547{
13548#ifndef _BIG_ENDIAN
13549 not big endian
13550 #endif
13551
13552 ;
13553 return 0;
13554}
13555_ACEOF
13556if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013558else
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013560fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13562fi
13563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13564 fi
13565 if test $ac_cv_c_bigendian = unknown; then
13566 # Compile a test program.
13567 if test "$cross_compiling" = yes; then :
13568 # Try to guess by grepping values from an object file.
13569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13570/* end confdefs.h. */
13571short int ascii_mm[] =
13572 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13573 short int ascii_ii[] =
13574 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13575 int use_ascii (int i) {
13576 return ascii_mm[i] + ascii_ii[i];
13577 }
13578 short int ebcdic_ii[] =
13579 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13580 short int ebcdic_mm[] =
13581 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13582 int use_ebcdic (int i) {
13583 return ebcdic_mm[i] + ebcdic_ii[i];
13584 }
13585 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013586
Matthias Kloseb9621712010-04-24 17:59:49 +000013587int
13588main ()
13589{
13590return use_ascii (foo) == use_ebcdic (foo);
13591 ;
13592 return 0;
13593}
13594_ACEOF
13595if ac_fn_c_try_compile "$LINENO"; then :
13596 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13597 ac_cv_c_bigendian=yes
13598 fi
13599 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13600 if test "$ac_cv_c_bigendian" = unknown; then
13601 ac_cv_c_bigendian=no
13602 else
13603 # finding both strings is unlikely to happen, but who knows?
13604 ac_cv_c_bigendian=unknown
13605 fi
13606 fi
13607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013609else
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013611/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013612$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013613int
13614main ()
13615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013616
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 /* Are we little or big endian? From Harbison&Steele. */
13618 union
13619 {
13620 long int l;
13621 char c[sizeof (long int)];
13622 } u;
13623 u.l = 1;
13624 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013625
13626 ;
13627 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013628}
Martin v. Löwis11437992002-04-12 09:54:03 +000013629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013630if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013631 ac_cv_c_bigendian=no
13632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13636 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013638
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13642$as_echo "$ac_cv_c_bigendian" >&6; }
13643 case $ac_cv_c_bigendian in #(
13644 yes)
13645 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13646;; #(
13647 no)
13648 ;; #(
13649 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013652
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 ;; #(
13654 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013655 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013656 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013658
Michael W. Hudson54241132001-12-07 15:38:26 +000013659
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013660# ABI version string for Python extension modules. This appears between the
13661# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13662# from the following attributes which affect the ABI of this Python build (in
13663# this order):
13664#
13665# * The Python implementation (always 'cpython-' for us)
13666# * The major and minor version numbers
13667# * --with-pydebug (adds a 'd')
13668# * --with-pymalloc (adds a 'm')
13669# * --with-wide-unicode (adds a 'u')
13670#
13671# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013672# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13673# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013674
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13676$as_echo_n "checking ABIFLAGS... " >&6; }
13677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13678$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13680$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013681SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13683$as_echo "$SOABI" >&6; }
13684
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13686$as_echo_n "checking LDVERSION... " >&6; }
13687LDVERSION='$(VERSION)$(ABIFLAGS)'
13688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13689$as_echo "$LDVERSION" >&6; }
13690
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013691# SO is the extension of shared libraries `(including the dot!)
13692# -- usually .so, .sl on HP-UX, .dll on Cygwin
13693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13694$as_echo_n "checking SO... " >&6; }
13695if test -z "$SO"
13696then
13697 case $ac_sys_system in
13698 hp*|HP*)
13699 case `uname -m` in
13700 ia64) SO=.so;;
13701 *) SO=.sl;;
13702 esac
13703 ;;
13704 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013705 Linux*|GNU*)
13706 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013707 *) SO=.so;;
13708 esac
13709else
13710 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013711 echo
13712 echo '====================================================================='
13713 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013714 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013715 echo '+ Do you really mean to change the extension for shared libraries? +'
13716 echo '+ Continuing in 10 seconds to let you to ponder. +'
13717 echo '+ +'
13718 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013719 sleep 10
13720fi
13721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13722$as_echo "$SO" >&6; }
13723
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013724# Check whether right shifting a negative integer extends the sign bit
13725# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13727$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013728if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013730else
Martin v. Löwis11437992002-04-12 09:54:03 +000013731
Matthias Kloseb9621712010-04-24 17:59:49 +000013732if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013733 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013734else
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013736/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013737
13738int main()
13739{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013740 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013741}
13742
Martin v. Löwis11437992002-04-12 09:54:03 +000013743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013744if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013745 ac_cv_rshift_extends_sign=yes
13746else
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013749rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13750 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013751fi
13752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013753fi
13754
Matthias Kloseb9621712010-04-24 17:59:49 +000013755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13756$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013757if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013758then
Martin v. Löwis11437992002-04-12 09:54:03 +000013759
Matthias Kloseb9621712010-04-24 17:59:49 +000013760$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013761
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013762fi
13763
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013764# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13766$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013767if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013768 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013769else
Martin v. Löwis11437992002-04-12 09:54:03 +000013770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013772/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013773#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013774int
13775main ()
13776{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013777
13778 FILE *f = fopen("/dev/null", "r");
13779 flockfile(f);
13780 getc_unlocked(f);
13781 funlockfile(f);
13782
Martin v. Löwis11437992002-04-12 09:54:03 +000013783 ;
13784 return 0;
13785}
13786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013787if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013788 ac_cv_have_getc_unlocked=yes
13789else
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 ac_cv_have_getc_unlocked=no
13791fi
13792rm -f core conftest.err conftest.$ac_objext \
13793 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795
Matthias Kloseb9621712010-04-24 17:59:49 +000013796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13797$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013798if test "$ac_cv_have_getc_unlocked" = yes
13799then
Martin v. Löwis11437992002-04-12 09:54:03 +000013800
Matthias Kloseb9621712010-04-24 17:59:49 +000013801$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013802
13803fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013804
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013805# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013806# save the value of LIBS so we don't actually link Python with readline
13807LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013808
Gregory P. Smith18820942008-09-07 06:24:49 +000013809# On some systems we need to link readline to a termcap compatible
13810# library. NOTE: Keep the precedence of listed libraries synchronised
13811# with setup.py.
13812py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13814$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013815for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013816 if test -z "$py_libtermcap"; then
13817 READLINE_LIBS="-lreadline"
13818 else
13819 READLINE_LIBS="-lreadline -l$py_libtermcap"
13820 fi
13821 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013823/* end confdefs.h. */
13824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013825/* Override any GCC internal prototype to avoid an error.
13826 Use char because int might match the return type of a GCC
13827 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013828#ifdef __cplusplus
13829extern "C"
13830#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013831char readline ();
13832int
13833main ()
13834{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013835return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013836 ;
13837 return 0;
13838}
13839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013840if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013841 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013843rm -f core conftest.err conftest.$ac_objext \
13844 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013845 if test $py_cv_lib_readline = yes; then
13846 break
13847 fi
13848done
13849# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13850#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013851if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13853$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013854else
Matthias Kloseb9621712010-04-24 17:59:49 +000013855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13856$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013857
Matthias Kloseb9621712010-04-24 17:59:49 +000013858$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013859
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013860fi
13861
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013862# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13864$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013865if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013867else
13868 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013869LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013871/* end confdefs.h. */
13872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013873/* Override any GCC internal prototype to avoid an error.
13874 Use char because int might match the return type of a GCC
13875 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013876#ifdef __cplusplus
13877extern "C"
13878#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013879char rl_callback_handler_install ();
13880int
13881main ()
13882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013883return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013884 ;
13885 return 0;
13886}
13887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013888if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013889 ac_cv_lib_readline_rl_callback_handler_install=yes
13890else
Matthias Kloseb9621712010-04-24 17:59:49 +000013891 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013893rm -f core conftest.err conftest.$ac_objext \
13894 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013895LIBS=$ac_check_lib_save_LIBS
13896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13898$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013899if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013900
Matthias Kloseb9621712010-04-24 17:59:49 +000013901$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013902
13903fi
13904
13905
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013906# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013908/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013909#include <readline/readline.h>
13910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013911if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013912 have_readline=yes
13913else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013914 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013915
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013916fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013917rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013918if test $have_readline = yes
13919then
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013921/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013922#include <readline/readline.h>
13923
13924_ACEOF
13925if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013926 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013927
Matthias Kloseb9621712010-04-24 17:59:49 +000013928$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013929
13930fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013931rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013932
Matthias Kloseb9621712010-04-24 17:59:49 +000013933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013934/* end confdefs.h. */
13935#include <readline/readline.h>
13936
13937_ACEOF
13938if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013939 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013942
13943fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013944rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013945
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013946fi
13947
Martin v. Löwis0daad592001-09-30 21:09:59 +000013948# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13950$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013951if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013952 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013953else
Martin v. Löwis11437992002-04-12 09:54:03 +000013954 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013955LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013959/* Override any GCC internal prototype to avoid an error.
13960 Use char because int might match the return type of a GCC
13961 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013962#ifdef __cplusplus
13963extern "C"
13964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013965char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013966int
13967main ()
13968{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013969return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 ;
13971 return 0;
13972}
13973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013974if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013975 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013976else
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013979rm -f core conftest.err conftest.$ac_objext \
13980 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013981LIBS=$ac_check_lib_save_LIBS
13982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13984$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013985if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013986
Matthias Kloseb9621712010-04-24 17:59:49 +000013987$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013988
Martin v. Löwis0daad592001-09-30 21:09:59 +000013989fi
13990
Michael W. Hudson54241132001-12-07 15:38:26 +000013991
Thomas Wouters89d996e2007-09-08 17:39:28 +000013992# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13994$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013995if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013997else
13998 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013999LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014001/* end confdefs.h. */
14002
14003/* Override any GCC internal prototype to avoid an error.
14004 Use char because int might match the return type of a GCC
14005 builtin and then its argument prototype would still apply. */
14006#ifdef __cplusplus
14007extern "C"
14008#endif
14009char rl_completion_display_matches_hook ();
14010int
14011main ()
14012{
14013return rl_completion_display_matches_hook ();
14014 ;
14015 return 0;
14016}
14017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014018if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014019 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14020else
Matthias Kloseb9621712010-04-24 17:59:49 +000014021 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014023rm -f core conftest.err conftest.$ac_objext \
14024 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014025LIBS=$ac_check_lib_save_LIBS
14026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14028$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014029if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014030
Matthias Kloseb9621712010-04-24 17:59:49 +000014031$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014032
14033fi
14034
14035
Martin v. Löwis0daad592001-09-30 21:09:59 +000014036# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14038$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014039if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014041else
Martin v. Löwis11437992002-04-12 09:54:03 +000014042 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014043LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014045/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014047/* Override any GCC internal prototype to avoid an error.
14048 Use char because int might match the return type of a GCC
14049 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014050#ifdef __cplusplus
14051extern "C"
14052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014053char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014054int
14055main ()
14056{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014058 ;
14059 return 0;
14060}
14061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014062if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014063 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014064else
Matthias Kloseb9621712010-04-24 17:59:49 +000014065 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014067rm -f core conftest.err conftest.$ac_objext \
14068 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014069LIBS=$ac_check_lib_save_LIBS
14070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14072$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014073if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014074
Matthias Kloseb9621712010-04-24 17:59:49 +000014075$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014076
Guido van Rossum353ae582001-07-10 16:45:32 +000014077fi
14078
Jack Jansendd19cf82001-12-06 22:36:17 +000014079
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014080# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014082/* end confdefs.h. */
14083#include <readline/readline.h>
14084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014085if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014086 have_readline=yes
14087else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014088 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014089
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014090fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014091rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014092if test $have_readline = yes
14093then
Matthias Kloseb9621712010-04-24 17:59:49 +000014094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014095/* end confdefs.h. */
14096#include <readline/readline.h>
14097
14098_ACEOF
14099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014100 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014103
14104fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014105rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014106
14107fi
14108
Martin v. Löwis82bca632006-02-10 20:49:30 +000014109# End of readline checks: restore LIBS
14110LIBS=$LIBS_no_readline
14111
Matthias Kloseb9621712010-04-24 17:59:49 +000014112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14113$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014114if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014116else
Martin v. Löwis11437992002-04-12 09:54:03 +000014117
Matthias Kloseb9621712010-04-24 17:59:49 +000014118if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014119 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014120else
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014122/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014123
14124int main()
14125{
14126 int val1 = nice(1);
14127 if (val1 != -1 && val1 == nice(2))
14128 exit(0);
14129 exit(1);
14130}
14131
Martin v. Löwis11437992002-04-12 09:54:03 +000014132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014133if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014134 ac_cv_broken_nice=yes
14135else
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14139 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014140fi
14141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142fi
14143
Matthias Kloseb9621712010-04-24 17:59:49 +000014144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14145$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014146if test "$ac_cv_broken_nice" = yes
14147then
Martin v. Löwis11437992002-04-12 09:54:03 +000014148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014150
14151fi
14152
Matthias Kloseb9621712010-04-24 17:59:49 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14154$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014155if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014157else
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014159 ac_cv_broken_poll=no
14160else
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014162/* end confdefs.h. */
14163
14164#include <poll.h>
14165
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014166int main()
14167{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014168 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014169 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014170
14171 close (42);
14172
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014173 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014174 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014175 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014176 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014177 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014178 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014179 return 1;
14180}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014181
14182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014183if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014184 ac_cv_broken_poll=yes
14185else
Matthias Kloseb9621712010-04-24 17:59:49 +000014186 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14189 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014191
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014192fi
14193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14195$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014196if test "$ac_cv_broken_poll" = yes
14197then
14198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014200
14201fi
14202
Brett Cannon43802422005-02-10 20:48:03 +000014203# 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 +000014204# (which is not required by ISO C or UNIX spec) and/or if we support
14205# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014206ac_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 +000014207#include <$ac_cv_struct_tm>
14208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209"
Victor Stinnere0be4232011-10-25 13:06:09 +020014210if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014211
14212cat >>confdefs.h <<_ACEOF
14213#define HAVE_STRUCT_TM_TM_ZONE 1
14214_ACEOF
14215
14216
14217fi
14218
14219if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14220
Matthias Kloseb9621712010-04-24 17:59:49 +000014221$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014222
14223else
Matthias Kloseb9621712010-04-24 17:59:49 +000014224 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14225"
Victor Stinnere0be4232011-10-25 13:06:09 +020014226if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014227 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014228else
Matthias Kloseb9621712010-04-24 17:59:49 +000014229 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014230fi
14231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014232cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014233#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014234_ACEOF
14235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14237$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014238if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014240else
Matthias Kloseb9621712010-04-24 17:59:49 +000014241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014242/* end confdefs.h. */
14243#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244#if !HAVE_DECL_TZNAME
14245extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014246#endif
14247
14248int
14249main ()
14250{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014252 ;
14253 return 0;
14254}
14255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014256if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014257 ac_cv_var_tzname=yes
14258else
Matthias Kloseb9621712010-04-24 17:59:49 +000014259 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014261rm -f core conftest.err conftest.$ac_objext \
14262 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14265$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014266 if test $ac_cv_var_tzname = yes; then
14267
Matthias Kloseb9621712010-04-24 17:59:49 +000014268$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014269
14270 fi
14271fi
14272
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014273
Martin v. Löwis1d459062005-03-14 21:23:33 +000014274# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14276$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014277if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014279else
14280
Matthias Kloseb9621712010-04-24 17:59:49 +000014281if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014282 ac_cv_working_tzset=no
14283else
Matthias Kloseb9621712010-04-24 17:59:49 +000014284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014285/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014286
14287#include <stdlib.h>
14288#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014289#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014290
14291#if HAVE_TZNAME
14292extern char *tzname[];
14293#endif
14294
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014295int main()
14296{
Brett Cannon18367812003-09-19 00:59:16 +000014297 /* Note that we need to ensure that not only does tzset(3)
14298 do 'something' with localtime, but it works as documented
14299 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014300 This includes making sure that tzname is set properly if
14301 tm->tm_zone does not exist since it is the alternative way
14302 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014303
14304 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014305 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014306 */
14307
Martin v. Löwis1d459062005-03-14 21:23:33 +000014308 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014309 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14310
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014311 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014312 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014313 if (localtime(&groundhogday)->tm_hour != 0)
14314 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014315#if HAVE_TZNAME
14316 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14317 if (strcmp(tzname[0], "UTC") ||
14318 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14319 exit(1);
14320#endif
Brett Cannon18367812003-09-19 00:59:16 +000014321
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014322 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014323 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014324 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014325 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014326#if HAVE_TZNAME
14327 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14328 exit(1);
14329#endif
Brett Cannon18367812003-09-19 00:59:16 +000014330
14331 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14332 tzset();
14333 if (localtime(&groundhogday)->tm_hour != 11)
14334 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014335#if HAVE_TZNAME
14336 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14337 exit(1);
14338#endif
14339
14340#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014341 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14342 exit(1);
14343 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14344 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014345#endif
Brett Cannon18367812003-09-19 00:59:16 +000014346
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014347 exit(0);
14348}
14349
14350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014351if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014352 ac_cv_working_tzset=yes
14353else
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14357 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014358fi
14359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014360fi
14361
Matthias Kloseb9621712010-04-24 17:59:49 +000014362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14363$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014364if test "$ac_cv_working_tzset" = yes
14365then
14366
Matthias Kloseb9621712010-04-24 17:59:49 +000014367$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014368
14369fi
14370
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014371# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14373$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014374if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014376else
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014378/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014379#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014380int
14381main ()
14382{
14383
14384struct stat st;
14385st.st_mtim.tv_nsec = 1;
14386
14387 ;
14388 return 0;
14389}
14390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014391if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014392 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014393else
Matthias Kloseb9621712010-04-24 17:59:49 +000014394 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14397fi
14398
Matthias Kloseb9621712010-04-24 17:59:49 +000014399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14400$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014401if test "$ac_cv_stat_tv_nsec" = yes
14402then
14403
Matthias Kloseb9621712010-04-24 17:59:49 +000014404$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014405
14406fi
14407
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014408# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14410$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014411if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014412 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014413else
Matthias Kloseb9621712010-04-24 17:59:49 +000014414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014415/* end confdefs.h. */
14416#include <sys/stat.h>
14417int
14418main ()
14419{
14420
14421struct stat st;
14422st.st_mtimespec.tv_nsec = 1;
14423
14424 ;
14425 return 0;
14426}
14427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014428if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014429 ac_cv_stat_tv_nsec2=yes
14430else
Matthias Kloseb9621712010-04-24 17:59:49 +000014431 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14434fi
14435
Matthias Kloseb9621712010-04-24 17:59:49 +000014436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14437$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014438if test "$ac_cv_stat_tv_nsec2" = yes
14439then
14440
Matthias Kloseb9621712010-04-24 17:59:49 +000014441$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014442
14443fi
14444
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014445ac_save_cppflags="$CPPFLAGS"
14446CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014447# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14449$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014450if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014452else
Matthias Kloseb9621712010-04-24 17:59:49 +000014453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014454/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014455#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014456int
14457main ()
14458{
Jack Jansen666b1e72001-10-31 12:11:48 +000014459
14460 int rtn;
14461 rtn = mvwdelch(0,0,0);
14462
Martin v. Löwis11437992002-04-12 09:54:03 +000014463 ;
14464 return 0;
14465}
14466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014467if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014468 ac_cv_mvwdelch_is_expression=yes
14469else
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14473fi
14474
Matthias Kloseb9621712010-04-24 17:59:49 +000014475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14476$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014477
14478if test "$ac_cv_mvwdelch_is_expression" = yes
14479then
Martin v. Löwis11437992002-04-12 09:54:03 +000014480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014482
14483fi
14484
Matthias Kloseb9621712010-04-24 17:59:49 +000014485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14486$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014487if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014489else
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014491/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014492#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014493int
14494main ()
14495{
Jack Jansen666b1e72001-10-31 12:11:48 +000014496
14497 WINDOW *w;
14498 w->_flags = 0;
14499
Martin v. Löwis11437992002-04-12 09:54:03 +000014500 ;
14501 return 0;
14502}
14503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014504if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014505 ac_cv_window_has_flags=yes
14506else
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14510fi
14511
Matthias Kloseb9621712010-04-24 17:59:49 +000014512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14513$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014514
Jack Jansen666b1e72001-10-31 12:11:48 +000014515
14516if test "$ac_cv_window_has_flags" = yes
14517then
Martin v. Löwis11437992002-04-12 09:54:03 +000014518
Matthias Kloseb9621712010-04-24 17:59:49 +000014519$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014520
14521fi
14522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14524$as_echo_n "checking for is_term_resized... " >&6; }
14525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014526/* end confdefs.h. */
14527#include <curses.h>
14528int
14529main ()
14530{
14531void *x=is_term_resized
14532 ;
14533 return 0;
14534}
14535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014536if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014539
Matthias Kloseb159a552010-04-25 21:00:44 +000014540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014541$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014542else
Matthias Kloseb9621712010-04-24 17:59:49 +000014543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14544$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014545
14546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14548
Matthias Kloseb9621712010-04-24 17:59:49 +000014549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14550$as_echo_n "checking for resize_term... " >&6; }
14551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014552/* end confdefs.h. */
14553#include <curses.h>
14554int
14555main ()
14556{
14557void *x=resize_term
14558 ;
14559 return 0;
14560}
14561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014562if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014563
Matthias Kloseb9621712010-04-24 17:59:49 +000014564$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014565
Matthias Kloseb159a552010-04-25 21:00:44 +000014566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014567$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014568else
Matthias Kloseb9621712010-04-24 17:59:49 +000014569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14570$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014571
14572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14574
Matthias Kloseb9621712010-04-24 17:59:49 +000014575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14576$as_echo_n "checking for resizeterm... " >&6; }
14577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014578/* end confdefs.h. */
14579#include <curses.h>
14580int
14581main ()
14582{
14583void *x=resizeterm
14584 ;
14585 return 0;
14586}
14587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014588if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014589
Matthias Kloseb9621712010-04-24 17:59:49 +000014590$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014591
Matthias Kloseb159a552010-04-25 21:00:44 +000014592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014593$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014594else
Matthias Kloseb9621712010-04-24 17:59:49 +000014595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14596$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014597
14598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014600# last curses configure check
14601CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014602
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14604$as_echo "$as_me: checking for device files" >&6;}
14605
14606if test "x$cross_compiling" = xyes; then
14607 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14609$as_echo_n "checking for /dev/ptmx... " >&6; }
14610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14611$as_echo "not set" >&6; }
14612 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14613 fi
14614 if test "${ac_cv_file__dev_ptc+set}" != set; then
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14616$as_echo_n "checking for /dev/ptc... " >&6; }
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14618$as_echo "not set" >&6; }
14619 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14620 fi
14621fi
14622
Matthias Kloseb9621712010-04-24 17:59:49 +000014623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14624$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014625if ${ac_cv_file__dev_ptmx+:} false; then :
14626 $as_echo_n "(cached) " >&6
14627else
14628 test "$cross_compiling" = yes &&
14629 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14630if test -r "/dev/ptmx"; then
14631 ac_cv_file__dev_ptmx=yes
14632else
14633 ac_cv_file__dev_ptmx=no
14634fi
14635fi
14636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14637$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14638if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014639
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014640fi
14641
14642if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014643
Matthias Kloseb9621712010-04-24 17:59:49 +000014644$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014645
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14648$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014649if ${ac_cv_file__dev_ptc+:} false; then :
14650 $as_echo_n "(cached) " >&6
14651else
14652 test "$cross_compiling" = yes &&
14653 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14654if test -r "/dev/ptc"; then
14655 ac_cv_file__dev_ptc=yes
14656else
14657 ac_cv_file__dev_ptc=no
14658fi
14659fi
14660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14661$as_echo "$ac_cv_file__dev_ptc" >&6; }
14662if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014663
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014664fi
14665
14666if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014667
Matthias Kloseb9621712010-04-24 17:59:49 +000014668$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014669
Neal Norwitz865400f2003-03-21 01:42:58 +000014670fi
14671
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014672if test "$have_long_long" = yes
14673then
Matthias Kloseb9621712010-04-24 17:59:49 +000014674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14675$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014676 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014677 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014678else
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014680 ac_cv_have_long_long_format="cross -- assuming no"
14681 if test x$GCC = xyes; then
14682 save_CFLAGS=$CFLAGS
14683 CFLAGS="$CFLAGS -Werror -Wformat"
14684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14685/* end confdefs.h. */
14686
14687 #include <stdio.h>
14688 #include <stddef.h>
14689
14690int
14691main ()
14692{
14693
14694 char *buffer;
14695 sprintf(buffer, "%lld", (long long)123);
14696 sprintf(buffer, "%lld", (long long)-123);
14697 sprintf(buffer, "%llu", (unsigned long long)123);
14698
14699 ;
14700 return 0;
14701}
14702_ACEOF
14703if ac_fn_c_try_compile "$LINENO"; then :
14704 ac_cv_have_long_long_format=yes
14705
14706fi
14707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14708 CFLAGS=$save_CFLAGS
14709 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014710else
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014712/* end confdefs.h. */
14713
14714 #include <stdio.h>
14715 #include <stddef.h>
14716 #include <string.h>
14717
14718 #ifdef HAVE_SYS_TYPES_H
14719 #include <sys/types.h>
14720 #endif
14721
14722 int main()
14723 {
14724 char buffer[256];
14725
14726 if (sprintf(buffer, "%lld", (long long)123) < 0)
14727 return 1;
14728 if (strcmp(buffer, "123"))
14729 return 1;
14730
14731 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14732 return 1;
14733 if (strcmp(buffer, "-123"))
14734 return 1;
14735
14736 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14737 return 1;
14738 if (strcmp(buffer, "123"))
14739 return 1;
14740
14741 return 0;
14742 }
14743
14744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014745if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014746 ac_cv_have_long_long_format=yes
14747else
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014752fi
14753
14754
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014755fi
14756
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14758$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014759fi
14760
Mark Dickinson89d7d412009-12-31 20:50:59 +000014761if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014762then
14763
Matthias Kloseb9621712010-04-24 17:59:49 +000014764$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014765
14766fi
14767
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014768if test $ac_sys_system = Darwin
14769then
14770 LIBS="$LIBS -framework CoreFoundation"
14771fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014772
Matthias Kloseb9621712010-04-24 17:59:49 +000014773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14774$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014775if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014777else
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014779 ac_cv_have_size_t_format="cross -- assuming yes"
14780
Thomas Wouters477c8d52006-05-27 19:21:47 +000014781else
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014783/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014784
Thomas Wouters477c8d52006-05-27 19:21:47 +000014785#include <stdio.h>
14786#include <stddef.h>
14787#include <string.h>
14788
Christian Heimes2c181612007-12-17 20:04:13 +000014789#ifdef HAVE_SYS_TYPES_H
14790#include <sys/types.h>
14791#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014792
14793#ifdef HAVE_SSIZE_T
14794typedef ssize_t Py_ssize_t;
14795#elif SIZEOF_VOID_P == SIZEOF_LONG
14796typedef long Py_ssize_t;
14797#else
14798typedef int Py_ssize_t;
14799#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014800
Christian Heimes2c181612007-12-17 20:04:13 +000014801int main()
14802{
14803 char buffer[256];
14804
Thomas Wouters477c8d52006-05-27 19:21:47 +000014805 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14806 return 1;
14807
Thomas Wouters89f507f2006-12-13 04:49:30 +000014808 if (strcmp(buffer, "123"))
14809 return 1;
14810
14811 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14812 return 1;
14813
14814 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014815 return 1;
14816
14817 return 0;
14818}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014819
Thomas Wouters477c8d52006-05-27 19:21:47 +000014820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014821if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014822 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014823else
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014828fi
14829
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14832$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014833if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014834
Matthias Kloseb9621712010-04-24 17:59:49 +000014835$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014836
14837fi
14838
Matthias Kloseb9621712010-04-24 17:59:49 +000014839ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014840#ifdef HAVE_SYS_TYPES_H
14841#include <sys/types.h>
14842#endif
14843#ifdef HAVE_SYS_SOCKET_H
14844#include <sys/socket.h>
14845#endif
14846
Matthias Kloseb9621712010-04-24 17:59:49 +000014847"
Victor Stinnere0be4232011-10-25 13:06:09 +020014848if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014849
Martin v. Löwis11437992002-04-12 09:54:03 +000014850else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014853
14854fi
14855
Michael W. Hudson54241132001-12-07 15:38:26 +000014856
Matthias Kloseb9621712010-04-24 17:59:49 +000014857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14858$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014859if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014861else
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014863 ac_cv_broken_mbstowcs=no
14864else
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014866/* end confdefs.h. */
14867
Stefan Krah19c21392012-11-22 23:47:32 +010014868#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014869#include<stdlib.h>
14870int main() {
14871 size_t len = -1;
14872 const char *str = "text";
14873 len = mbstowcs(NULL, str, 0);
14874 return (len != 4);
14875}
14876
14877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014878if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014879 ac_cv_broken_mbstowcs=no
14880else
Matthias Kloseb9621712010-04-24 17:59:49 +000014881 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014885fi
14886
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014887fi
14888
Matthias Kloseb9621712010-04-24 17:59:49 +000014889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14890$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014891if test "$ac_cv_broken_mbstowcs" = yes
14892then
14893
Matthias Kloseb9621712010-04-24 17:59:49 +000014894$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014895
14896fi
14897
Antoine Pitroub52ec782009-01-25 16:34:23 +000014898# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14900$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014901
14902# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014903if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014904 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014905if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014906then
14907
Matthias Kloseb9621712010-04-24 17:59:49 +000014908$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014909
Matthias Kloseb9621712010-04-24 17:59:49 +000014910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14911$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014912fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014913if test "$withval" = no
14914then
14915
14916$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14917
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14919$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014920fi
14921
Antoine Pitrou042b1282010-08-13 21:15:58 +000014922else
14923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14924$as_echo "no value specified" >&6; }
14925fi
14926
Antoine Pitroub52ec782009-01-25 16:34:23 +000014927
Matthias Kloseb17289e2012-03-15 19:51:34 +010014928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14929$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14930if ${ac_cv_computed_gotos+:} false; then :
14931 $as_echo_n "(cached) " >&6
14932else
14933 if test "$cross_compiling" = yes; then :
14934 if test "${with_computed_gotos+set}" = set; then
14935 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14936 else
14937 ac_cv_computed_gotos=no
14938 fi
14939else
14940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14941/* end confdefs.h. */
14942
14943int main(int argc, char **argv)
14944{
14945 static void *targets[1] = { &&LABEL1 };
14946 goto LABEL2;
14947LABEL1:
14948 return 0;
14949LABEL2:
14950 goto *targets[0];
14951 return 1;
14952}
14953
14954_ACEOF
14955if ac_fn_c_try_run "$LINENO"; then :
14956 ac_cv_computed_gotos=yes
14957else
14958 ac_cv_computed_gotos=no
14959fi
14960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14961 conftest.$ac_objext conftest.beam conftest.$ac_ext
14962fi
14963
14964fi
14965
14966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14967$as_echo "$ac_cv_computed_gotos" >&6; }
14968case "$ac_cv_computed_gotos" in yes*)
14969
14970$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14971
14972esac
14973
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014974case $ac_sys_system in
14975AIX*)
14976
14977$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14978 ;;
14979esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014980
Michael W. Hudson54241132001-12-07 15:38:26 +000014981
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014982
14983
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014984for h in `(cd $srcdir;echo Python/thread_*.h)`
14985do
14986 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14987done
14988
Michael W. Hudson54241132001-12-07 15:38:26 +000014989
Neal Norwitzd24499d2005-12-18 21:36:39 +000014990SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14992$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014993for dir in $SRCDIRS; do
14994 if test ! -d $dir; then
14995 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014996 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014997done
Matthias Kloseb9621712010-04-24 17:59:49 +000014998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14999$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015000
Stefan Krah1919b7e2012-03-21 18:25:23 +010015001# Availability of -O2:
15002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15003$as_echo_n "checking for -O2... " >&6; }
15004saved_cflags="$CFLAGS"
15005CFLAGS="-O2"
15006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15007/* end confdefs.h. */
15008
15009int
15010main ()
15011{
15012
15013
15014 ;
15015 return 0;
15016}
15017_ACEOF
15018if ac_fn_c_try_compile "$LINENO"; then :
15019 have_O2=yes
15020else
15021 have_O2=no
15022fi
15023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15025$as_echo "$have_O2" >&6; }
15026CFLAGS="$saved_cflags"
15027
15028# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15029# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15031$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15032saved_cflags="$CFLAGS"
15033CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15034if test "$have_O2" = no; then
15035 CFLAGS=""
15036fi
15037if test "$cross_compiling" = yes; then :
15038 have_glibc_memmove_bug=undefined
15039else
15040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15041/* end confdefs.h. */
15042
15043#include <stdio.h>
15044#include <stdlib.h>
15045#include <string.h>
15046void foo(void *p, void *q) { memmove(p, q, 19); }
15047int main() {
15048 char a[32] = "123456789000000000";
15049 foo(&a[9], a);
15050 if (strcmp(a, "123456789123456789000000000") != 0)
15051 return 1;
15052 foo(a, &a[9]);
15053 if (strcmp(a, "123456789000000000") != 0)
15054 return 1;
15055 return 0;
15056}
15057
15058_ACEOF
15059if ac_fn_c_try_run "$LINENO"; then :
15060 have_glibc_memmove_bug=no
15061else
15062 have_glibc_memmove_bug=yes
15063fi
15064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15065 conftest.$ac_objext conftest.beam conftest.$ac_ext
15066fi
15067
15068CFLAGS="$saved_cflags"
15069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15070$as_echo "$have_glibc_memmove_bug" >&6; }
15071if test "$have_glibc_memmove_bug" = yes; then
15072
15073$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15074
15075fi
15076
15077if test "$have_gcc_asm_for_x87" = yes; then
15078 # Some versions of gcc miscompile inline asm:
15079 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15080 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15081 case $CC in
15082 *gcc*)
15083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15084$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15085 saved_cflags="$CFLAGS"
15086 CFLAGS="-O2"
15087 if test "$cross_compiling" = yes; then :
15088 have_ipa_pure_const_bug=undefined
15089else
15090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15091/* end confdefs.h. */
15092
15093 __attribute__((noinline)) int
15094 foo(int *p) {
15095 int r;
15096 asm ( "movl \$6, (%1)\n\t"
15097 "xorl %0, %0\n\t"
15098 : "=r" (r) : "r" (p) : "memory"
15099 );
15100 return r;
15101 }
15102 int main() {
15103 int p = 8;
15104 if ((foo(&p) ? : p) != 6)
15105 return 1;
15106 return 0;
15107 }
15108
15109_ACEOF
15110if ac_fn_c_try_run "$LINENO"; then :
15111 have_ipa_pure_const_bug=no
15112else
15113 have_ipa_pure_const_bug=yes
15114fi
15115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15116 conftest.$ac_objext conftest.beam conftest.$ac_ext
15117fi
15118
15119 CFLAGS="$saved_cflags"
15120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15121$as_echo "$have_ipa_pure_const_bug" >&6; }
15122 if test "$have_ipa_pure_const_bug" = yes; then
15123
15124$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15125
15126 fi
15127 ;;
15128 esac
15129fi
15130
Guido van Rossum627b2d71993-12-24 10:39:16 +000015131# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015132ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015133
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015134ac_config_files="$ac_config_files Modules/ld_so_aix"
15135
Martin v. Löwis11437992002-04-12 09:54:03 +000015136cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015137# This file is a shell script that caches the results of configure
15138# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015139# scripts and configure runs, see configure's option --config-cache.
15140# It is not useful on other systems. If it contains results you don't
15141# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015142#
Martin v. Löwis11437992002-04-12 09:54:03 +000015143# config.status only pays attention to the cache file if you give it
15144# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015145#
Skip Montanaro6dead952003-09-25 14:50:04 +000015146# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015147# loading this file, other *unset* `ac_cv_foo' will be assigned the
15148# following values.
15149
15150_ACEOF
15151
Guido van Rossumf78abae1997-01-21 22:02:36 +000015152# The following way of writing the cache mishandles newlines in values,
15153# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015155# Ultrix sh set writes to stderr and can't be redirected directly,
15156# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015157(
15158 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15159 eval ac_val=\$$ac_var
15160 case $ac_val in #(
15161 *${as_nl}*)
15162 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15164$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165 esac
15166 case $ac_var in #(
15167 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15169 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170 esac ;;
15171 esac
15172 done
15173
Martin v. Löwis11437992002-04-12 09:54:03 +000015174 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015175 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15176 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 # `set' does not quote correctly, so add quotes: double-quote
15178 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015179 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015180 "s/'/'\\\\''/g;
15181 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 *)
15184 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015187 esac |
15188 sort
15189) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015194 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15195 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15197 :end' >>confcache
15198if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15199 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015200 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15202$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015203 if test ! -f "$cache_file" || test -h "$cache_file"; then
15204 cat confcache >"$cache_file"
15205 else
15206 case $cache_file in #(
15207 */* | ?:*)
15208 mv -f confcache "$cache_file"$$ &&
15209 mv -f "$cache_file"$$ "$cache_file" ;; #(
15210 *)
15211 mv -f confcache "$cache_file" ;;
15212 esac
15213 fi
15214 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015215 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015216 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15217$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015218 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015219fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015220rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015221
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015222test "x$prefix" = xNONE && prefix=$ac_default_prefix
15223# Let make expand exec_prefix.
15224test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015225
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015226DEFS=-DHAVE_CONFIG_H
15227
Skip Montanaro6dead952003-09-25 14:50:04 +000015228ac_libobjs=
15229ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015230U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015231for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15232 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15236 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015237 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15238 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015239done
15240LIBOBJS=$ac_libobjs
15241
15242LTLIBOBJS=$ac_ltlibobjs
15243
15244
Martin v. Löwis11437992002-04-12 09:54:03 +000015245
Matthias Kloseb9621712010-04-24 17:59:49 +000015246
Victor Stinnere0be4232011-10-25 13:06:09 +020015247: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015248ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015249ac_clean_files_save=$ac_clean_files
15250ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015251{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15252$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15253as_write_fail=0
15254cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015255#! $SHELL
15256# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015257# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015258# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015259# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015260
Martin v. Löwis11437992002-04-12 09:54:03 +000015261debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015262ac_cs_recheck=false
15263ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015264
Matthias Kloseb9621712010-04-24 17:59:49 +000015265SHELL=\${CONFIG_SHELL-$SHELL}
15266export SHELL
15267_ASEOF
15268cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15269## -------------------- ##
15270## M4sh Initialization. ##
15271## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015273# Be more Bourne compatible
15274DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015275if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015276 emulate sh
15277 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015278 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015279 # is contrary to our usage. Disable this feature.
15280 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015281 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015282else
Matthias Kloseb9621712010-04-24 17:59:49 +000015283 case `(set -o) 2>/dev/null` in #(
15284 *posix*) :
15285 set -o posix ;; #(
15286 *) :
15287 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015288esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015289fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015290
15291
Matthias Kloseb9621712010-04-24 17:59:49 +000015292as_nl='
15293'
15294export as_nl
15295# Printing a long string crashes Solaris 7 /usr/bin/printf.
15296as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15297as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15298as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15299# Prefer a ksh shell builtin over an external printf program on Solaris,
15300# but without wasting forks for bash or zsh.
15301if test -z "$BASH_VERSION$ZSH_VERSION" \
15302 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15303 as_echo='print -r --'
15304 as_echo_n='print -rn --'
15305elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15306 as_echo='printf %s\n'
15307 as_echo_n='printf %s'
15308else
15309 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15310 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15311 as_echo_n='/usr/ucb/echo -n'
15312 else
15313 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15314 as_echo_n_body='eval
15315 arg=$1;
15316 case $arg in #(
15317 *"$as_nl"*)
15318 expr "X$arg" : "X\\(.*\\)$as_nl";
15319 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15320 esac;
15321 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15322 '
15323 export as_echo_n_body
15324 as_echo_n='sh -c $as_echo_n_body as_echo'
15325 fi
15326 export as_echo_body
15327 as_echo='sh -c $as_echo_body as_echo'
15328fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015329
15330# The user is always right.
15331if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 PATH_SEPARATOR=:
15333 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15334 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15335 PATH_SEPARATOR=';'
15336 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015337fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015339
15340# IFS
15341# We need space, tab and new line, in precisely that order. Quoting is
15342# there to prevent editors from complaining about space-tab.
15343# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15344# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015345IFS=" "" $as_nl"
15346
15347# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015348as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015349case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015350 *[\\/]* ) as_myself=$0 ;;
15351 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015352for as_dir in $PATH
15353do
15354 IFS=$as_save_IFS
15355 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015356 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15357 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015360 ;;
15361esac
15362# We did not find ourselves, most probably we were run as `sh COMMAND'
15363# in which case we are not to be found in the path.
15364if test "x$as_myself" = x; then
15365 as_myself=$0
15366fi
15367if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015368 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15369 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370fi
15371
Matthias Kloseb9621712010-04-24 17:59:49 +000015372# Unset variables that we do not need and which cause bugs (e.g. in
15373# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15374# suppresses any "Segmentation fault" message there. '((' could
15375# trigger a bug in pdksh 5.2.14.
15376for as_var in BASH_ENV ENV MAIL MAILPATH
15377do eval test x\${$as_var+set} = xset \
15378 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015379done
15380PS1='$ '
15381PS2='> '
15382PS4='+ '
15383
15384# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015385LC_ALL=C
15386export LC_ALL
15387LANGUAGE=C
15388export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015389
Matthias Kloseb9621712010-04-24 17:59:49 +000015390# CDPATH.
15391(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15392
15393
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015394# as_fn_error STATUS ERROR [LINENO LOG_FD]
15395# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015396# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15397# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015398# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015399as_fn_error ()
15400{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015401 as_status=$1; test $as_status -eq 0 && as_status=1
15402 if test "$4"; then
15403 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15404 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015405 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015406 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015407 as_fn_exit $as_status
15408} # as_fn_error
15409
15410
15411# as_fn_set_status STATUS
15412# -----------------------
15413# Set $? to STATUS, without forking.
15414as_fn_set_status ()
15415{
15416 return $1
15417} # as_fn_set_status
15418
15419# as_fn_exit STATUS
15420# -----------------
15421# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15422as_fn_exit ()
15423{
15424 set +e
15425 as_fn_set_status $1
15426 exit $1
15427} # as_fn_exit
15428
15429# as_fn_unset VAR
15430# ---------------
15431# Portably unset VAR.
15432as_fn_unset ()
15433{
15434 { eval $1=; unset $1;}
15435}
15436as_unset=as_fn_unset
15437# as_fn_append VAR VALUE
15438# ----------------------
15439# Append the text in VALUE to the end of the definition contained in VAR. Take
15440# advantage of any shell optimizations that allow amortized linear growth over
15441# repeated appends, instead of the typical quadratic growth present in naive
15442# implementations.
15443if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15444 eval 'as_fn_append ()
15445 {
15446 eval $1+=\$2
15447 }'
15448else
15449 as_fn_append ()
15450 {
15451 eval $1=\$$1\$2
15452 }
15453fi # as_fn_append
15454
15455# as_fn_arith ARG...
15456# ------------------
15457# Perform arithmetic evaluation on the ARGs, and store the result in the
15458# global $as_val. Take advantage of shells that can avoid forks. The arguments
15459# must be portable across $(()) and expr.
15460if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15461 eval 'as_fn_arith ()
15462 {
15463 as_val=$(( $* ))
15464 }'
15465else
15466 as_fn_arith ()
15467 {
15468 as_val=`expr "$@" || test $? -eq 1`
15469 }
15470fi # as_fn_arith
15471
15472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015473if expr a : '\(a\)' >/dev/null 2>&1 &&
15474 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15475 as_expr=expr
15476else
15477 as_expr=false
15478fi
15479
15480if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15481 as_basename=basename
15482else
15483 as_basename=false
15484fi
15485
Matthias Kloseb9621712010-04-24 17:59:49 +000015486if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15487 as_dirname=dirname
15488else
15489 as_dirname=false
15490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015492as_me=`$as_basename -- "$0" ||
15493$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15494 X"$0" : 'X\(//\)$' \| \
15495 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015496$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015497 sed '/^.*\/\([^/][^/]*\)\/*$/{
15498 s//\1/
15499 q
15500 }
15501 /^X\/\(\/\/\)$/{
15502 s//\1/
15503 q
15504 }
15505 /^X\/\(\/\).*/{
15506 s//\1/
15507 q
15508 }
15509 s/.*/./; q'`
15510
Matthias Kloseb9621712010-04-24 17:59:49 +000015511# Avoid depending upon Character Ranges.
15512as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15513as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15514as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15515as_cr_digits='0123456789'
15516as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015517
15518ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015519case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015523 xy) ECHO_C='\c';;
15524 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15525 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526 esac;;
15527*)
15528 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015529esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015530
Martin v. Löwis11437992002-04-12 09:54:03 +000015531rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015532if test -d conf$$.dir; then
15533 rm -f conf$$.dir/conf$$.file
15534else
15535 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015536 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015538if (echo >conf$$.file) 2>/dev/null; then
15539 if ln -s conf$$.file conf$$ 2>/dev/null; then
15540 as_ln_s='ln -s'
15541 # ... but there are two gotchas:
15542 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15543 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015544 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015546 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015547 elif ln conf$$.file conf$$ 2>/dev/null; then
15548 as_ln_s=ln
15549 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015550 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015551 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015552else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015553 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15556rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015557
Matthias Kloseb9621712010-04-24 17:59:49 +000015558
15559# as_fn_mkdir_p
15560# -------------
15561# Create "$as_dir" as a directory, including parents if necessary.
15562as_fn_mkdir_p ()
15563{
15564
15565 case $as_dir in #(
15566 -*) as_dir=./$as_dir;;
15567 esac
15568 test -d "$as_dir" || eval $as_mkdir_p || {
15569 as_dirs=
15570 while :; do
15571 case $as_dir in #(
15572 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15573 *) as_qdir=$as_dir;;
15574 esac
15575 as_dirs="'$as_qdir' $as_dirs"
15576 as_dir=`$as_dirname -- "$as_dir" ||
15577$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15578 X"$as_dir" : 'X\(//\)[^/]' \| \
15579 X"$as_dir" : 'X\(//\)$' \| \
15580 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15581$as_echo X"$as_dir" |
15582 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15583 s//\1/
15584 q
15585 }
15586 /^X\(\/\/\)[^/].*/{
15587 s//\1/
15588 q
15589 }
15590 /^X\(\/\/\)$/{
15591 s//\1/
15592 q
15593 }
15594 /^X\(\/\).*/{
15595 s//\1/
15596 q
15597 }
15598 s/.*/./; q'`
15599 test -d "$as_dir" && break
15600 done
15601 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015602 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015603
15604
15605} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015606if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015607 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015608else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015609 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015610 as_mkdir_p=false
15611fi
15612
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015613
15614# as_fn_executable_p FILE
15615# -----------------------
15616# Test if FILE is an executable regular file.
15617as_fn_executable_p ()
15618{
15619 test -f "$1" && test -x "$1"
15620} # as_fn_executable_p
15621as_test_x='test -x'
15622as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015623
15624# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015625as_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 +000015626
15627# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015628as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
15630
Martin v. Löwis11437992002-04-12 09:54:03 +000015631exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015632## ----------------------------------- ##
15633## Main body of $CONFIG_STATUS script. ##
15634## ----------------------------------- ##
15635_ASEOF
15636test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15639# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015640# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015641# values after options handling.
15642ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015643This file was extended by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015644generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015645
15646 CONFIG_FILES = $CONFIG_FILES
15647 CONFIG_HEADERS = $CONFIG_HEADERS
15648 CONFIG_LINKS = $CONFIG_LINKS
15649 CONFIG_COMMANDS = $CONFIG_COMMANDS
15650 $ $0 $@
15651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652on `(hostname || uname -n) 2>/dev/null | sed 1q`
15653"
15654
Martin v. Löwis11437992002-04-12 09:54:03 +000015655_ACEOF
15656
Matthias Kloseb9621712010-04-24 17:59:49 +000015657case $ac_config_files in *"
15658"*) set x $ac_config_files; shift; ac_config_files=$*;;
15659esac
15660
15661case $ac_config_headers in *"
15662"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15663esac
15664
15665
15666cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015667# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015668config_files="$ac_config_files"
15669config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015670
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015671_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015672
Matthias Kloseb9621712010-04-24 17:59:49 +000015673cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015674ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015675\`$as_me' instantiates files and other configuration actions
15676from templates according to the current configuration. Unless the files
15677and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015678
Matthias Kloseb9621712010-04-24 17:59:49 +000015679Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015680
15681 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015682 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015683 --config print configuration, then exit
15684 -q, --quiet, --silent
15685 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015686 -d, --debug don't remove temporary files
15687 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015688 --file=FILE[:TEMPLATE]
15689 instantiate the configuration file FILE
15690 --header=FILE[:TEMPLATE]
15691 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015692
15693Configuration files:
15694$config_files
15695
15696Configuration headers:
15697$config_headers
15698
Matthias Kloseb9621712010-04-24 17:59:49 +000015699Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015702cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15703ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015704ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015705python config.status 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015706configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015707 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015708
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015709Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015710This config.status script is free software; the Free Software Foundation
15711gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712
15713ac_pwd='$ac_pwd'
15714srcdir='$srcdir'
15715INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015716MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015717test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015718_ACEOF
15719
Matthias Kloseb9621712010-04-24 17:59:49 +000015720cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15721# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015722ac_need_defaults=:
15723while test $# != 0
15724do
15725 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015726 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015727 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15728 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015729 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015731 --*=)
15732 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15733 ac_optarg=
15734 ac_shift=:
15735 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015737 ac_option=$1
15738 ac_optarg=$2
15739 ac_shift=shift
15740 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015741 esac
15742
Skip Montanaro6dead952003-09-25 14:50:04 +000015743 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015745 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15746 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015747 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015748 $as_echo "$ac_cs_version"; exit ;;
15749 --config | --confi | --conf | --con | --co | --c )
15750 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015751 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015752 debug=: ;;
15753 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015754 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015755 case $ac_optarg in
15756 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015757 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015758 esac
15759 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 ac_need_defaults=false;;
15761 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015762 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 case $ac_optarg in
15764 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15765 esac
15766 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015768 --he | --h)
15769 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015770 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015771Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015772 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015773 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015774 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15775 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15776 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015777
15778 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015779 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015780Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015781
Matthias Kloseb9621712010-04-24 17:59:49 +000015782 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015783 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015784
15785 esac
15786 shift
15787done
15788
Skip Montanaro6dead952003-09-25 14:50:04 +000015789ac_configure_extra_args=
15790
15791if $ac_cs_silent; then
15792 exec 6>/dev/null
15793 ac_configure_extra_args="$ac_configure_extra_args --silent"
15794fi
15795
15796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015797cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015798if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015799 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015800 shift
15801 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15802 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015803 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015804 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015805fi
15806
Martin v. Löwis11437992002-04-12 09:54:03 +000015807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015808cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809exec 5>>config.log
15810{
15811 echo
15812 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15813## Running $as_me. ##
15814_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015815 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015816} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015819cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015820_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015821
Matthias Kloseb9621712010-04-24 17:59:49 +000015822cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015823
15824# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015825for ac_config_target in $ac_config_targets
15826do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827 case $ac_config_target in
15828 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15829 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15830 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015831 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15832 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15834 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015835 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015836 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015837
Victor Stinnere0be4232011-10-25 13:06:09 +020015838 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015839 esac
15840done
15841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015842
Martin v. Löwis11437992002-04-12 09:54:03 +000015843# If the user did not use the arguments to specify the items to instantiate,
15844# then the envvar interface is used. Set only those that are not.
15845# We use the long form for the default assignment because of an extremely
15846# bizarre bug on SunOS 4.1.3.
15847if $ac_need_defaults; then
15848 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15849 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15850fi
15851
Skip Montanaro6dead952003-09-25 14:50:04 +000015852# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015853# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015854# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015855# Hook for its removal unless debugging.
15856# Note that there is a small window in which the directory will not be cleaned:
15857# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015858$debug ||
15859{
Victor Stinnere0be4232011-10-25 13:06:09 +020015860 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015861 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015862 : "${ac_tmp:=$tmp}"
15863 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015865 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015866}
Martin v. Löwis11437992002-04-12 09:54:03 +000015867# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015868
Martin v. Löwis11437992002-04-12 09:54:03 +000015869{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015870 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015871 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015872} ||
15873{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015874 tmp=./conf$$-$RANDOM
15875 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015876} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015877ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879# Set up the scripts for CONFIG_FILES section.
15880# No need to generate them if there are no CONFIG_FILES.
15881# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015882if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015883
Matthias Kloseb9621712010-04-24 17:59:49 +000015884
15885ac_cr=`echo X | tr X '\015'`
15886# On cygwin, bash can eat \r inside `` if the user requested igncr.
15887# But we know of no other shell where ac_cr would be empty at this
15888# point, so we can use a bashism as a fallback.
15889if test "x$ac_cr" = x; then
15890 eval ac_cr=\$\'\\r\'
15891fi
15892ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15893if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015894 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015895else
15896 ac_cs_awk_cr=$ac_cr
15897fi
15898
Victor Stinnere0be4232011-10-25 13:06:09 +020015899echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015900_ACEOF
15901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015902
Matthias Kloseb9621712010-04-24 17:59:49 +000015903{
15904 echo "cat >conf$$subs.awk <<_ACEOF" &&
15905 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15906 echo "_ACEOF"
15907} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015908 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15909ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015910ac_delim='%!_!# '
15911for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015912 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015913 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015914
Matthias Kloseb9621712010-04-24 17:59:49 +000015915 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15916 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015917 break
15918 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015919 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015920 else
15921 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015922 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923done
Matthias Kloseb9621712010-04-24 17:59:49 +000015924rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015925
Matthias Kloseb9621712010-04-24 17:59:49 +000015926cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015927cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015929sed -n '
15930h
15931s/^/S["/; s/!.*/"]=/
15932p
15933g
15934s/^[^!]*!//
15935:repl
15936t repl
15937s/'"$ac_delim"'$//
15938t delim
15939:nl
15940h
15941s/\(.\{148\}\)..*/\1/
15942t more1
15943s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15944p
15945n
15946b repl
15947:more1
15948s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15949p
15950g
15951s/.\{148\}//
15952t nl
15953:delim
15954h
15955s/\(.\{148\}\)..*/\1/
15956t more2
15957s/["\\]/\\&/g; s/^/"/; s/$/"/
15958p
15959b
15960:more2
15961s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15962p
15963g
15964s/.\{148\}//
15965t delim
15966' <conf$$subs.awk | sed '
15967/^[^""]/{
15968 N
15969 s/\n//
15970}
15971' >>$CONFIG_STATUS || ac_write_fail=1
15972rm -f conf$$subs.awk
15973cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15974_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015975cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015976 for (key in S) S_is_set[key] = 1
15977 FS = ""
15978
15979}
15980{
15981 line = $ 0
15982 nfields = split(line, field, "@")
15983 substed = 0
15984 len = length(field[1])
15985 for (i = 2; i < nfields; i++) {
15986 key = field[i]
15987 keylen = length(key)
15988 if (S_is_set[key]) {
15989 value = S[key]
15990 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15991 len += length(value) + length(field[++i])
15992 substed = 1
15993 } else
15994 len += 1 + keylen
15995 }
15996
15997 print line
15998}
15999
16000_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016002cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16003if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16004 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16005else
16006 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016007fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016008 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016009_ACEOF
16010
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016011# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16012# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016013# trailing colons and then remove the whole line if VPATH becomes empty
16014# (actually we leave an empty line to preserve line numbers).
16015if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016016 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16017h
16018s///
16019s/^/:/
16020s/[ ]*$/:/
16021s/:\$(srcdir):/:/g
16022s/:\${srcdir}:/:/g
16023s/:@srcdir@:/:/g
16024s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016025s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016026x
16027s/\(=[ ]*\).*/\1/
16028G
16029s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016030s/^[^=]*=[ ]*$//
16031}'
16032fi
16033
Matthias Kloseb9621712010-04-24 17:59:49 +000016034cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016035fi # test -n "$CONFIG_FILES"
16036
Matthias Kloseb9621712010-04-24 17:59:49 +000016037# Set up the scripts for CONFIG_HEADERS section.
16038# No need to generate them if there are no CONFIG_HEADERS.
16039# This happens for instance with `./config.status Makefile'.
16040if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016041cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016042BEGIN {
16043_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016044
Matthias Kloseb9621712010-04-24 17:59:49 +000016045# Transform confdefs.h into an awk script `defines.awk', embedded as
16046# here-document in config.status, that substitutes the proper values into
16047# config.h.in to produce config.h.
16048
16049# Create a delimiter string that does not exist in confdefs.h, to ease
16050# handling of long lines.
16051ac_delim='%!_!# '
16052for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016053 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16054 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016055 break
16056 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016057 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016058 else
16059 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16060 fi
16061done
16062
16063# For the awk script, D is an array of macro values keyed by name,
16064# likewise P contains macro parameters if any. Preserve backslash
16065# newline sequences.
16066
16067ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16068sed -n '
16069s/.\{148\}/&'"$ac_delim"'/g
16070t rset
16071:rset
16072s/^[ ]*#[ ]*define[ ][ ]*/ /
16073t def
16074d
16075:def
16076s/\\$//
16077t bsnl
16078s/["\\]/\\&/g
16079s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16080D["\1"]=" \3"/p
16081s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16082d
16083:bsnl
16084s/["\\]/\\&/g
16085s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16086D["\1"]=" \3\\\\\\n"\\/p
16087t cont
16088s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16089t cont
16090d
16091:cont
16092n
16093s/.\{148\}/&'"$ac_delim"'/g
16094t clear
16095:clear
16096s/\\$//
16097t bsnlc
16098s/["\\]/\\&/g; s/^/"/; s/$/"/p
16099d
16100:bsnlc
16101s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16102b cont
16103' <confdefs.h | sed '
16104s/'"$ac_delim"'/"\\\
16105"/g' >>$CONFIG_STATUS || ac_write_fail=1
16106
16107cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16108 for (key in D) D_is_set[key] = 1
16109 FS = ""
16110}
16111/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16112 line = \$ 0
16113 split(line, arg, " ")
16114 if (arg[1] == "#") {
16115 defundef = arg[2]
16116 mac1 = arg[3]
16117 } else {
16118 defundef = substr(arg[1], 2)
16119 mac1 = arg[2]
16120 }
16121 split(mac1, mac2, "(") #)
16122 macro = mac2[1]
16123 prefix = substr(line, 1, index(line, defundef) - 1)
16124 if (D_is_set[macro]) {
16125 # Preserve the white space surrounding the "#".
16126 print prefix "define", macro P[macro] D[macro]
16127 next
16128 } else {
16129 # Replace #undef with comments. This is necessary, for example,
16130 # in the case of _POSIX_SOURCE, which is predefined and required
16131 # on some systems where configure will not decide to define it.
16132 if (defundef == "undef") {
16133 print "/*", prefix defundef, macro, "*/"
16134 next
16135 }
16136 }
16137}
16138{ print }
16139_ACAWK
16140_ACEOF
16141cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016142 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016143fi # test -n "$CONFIG_HEADERS"
16144
16145
16146eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16147shift
16148for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016149do
16150 case $ac_tag in
16151 :[FHLC]) ac_mode=$ac_tag; continue;;
16152 esac
16153 case $ac_mode$ac_tag in
16154 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016155 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156 :[FH]-) ac_tag=-:-;;
16157 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16158 esac
16159 ac_save_IFS=$IFS
16160 IFS=:
16161 set x $ac_tag
16162 IFS=$ac_save_IFS
16163 shift
16164 ac_file=$1
16165 shift
16166
16167 case $ac_mode in
16168 :L) ac_source=$1;;
16169 :[FH])
16170 ac_file_inputs=
16171 for ac_f
16172 do
16173 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016174 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016175 *) # Look for the file first in the build tree, then in the source tree
16176 # (if the path is not absolute). The absolute path cannot be DOS-style,
16177 # because $ac_f cannot contain `:'.
16178 test -f "$ac_f" ||
16179 case $ac_f in
16180 [\\/$]*) false;;
16181 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16182 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016183 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016185 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16186 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016187 done
16188
16189 # Let's still pretend it is `configure' which instantiates (i.e., don't
16190 # use $as_me), people would be surprised to read:
16191 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016192 configure_input='Generated from '`
16193 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16194 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016195 if test x"$ac_file" != x-; then
16196 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016197 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16198$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016199 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016200 # Neutralize special characters interpreted by sed in replacement strings.
16201 case $configure_input in #(
16202 *\&* | *\|* | *\\* )
16203 ac_sed_conf_input=`$as_echo "$configure_input" |
16204 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16205 *) ac_sed_conf_input=$configure_input;;
16206 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016207
16208 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016209 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16210 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016211 esac
16212 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 esac
16214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016215 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016216$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016217 X"$ac_file" : 'X\(//\)[^/]' \| \
16218 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016219 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016220$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016221 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16222 s//\1/
16223 q
16224 }
16225 /^X\(\/\/\)[^/].*/{
16226 s//\1/
16227 q
16228 }
16229 /^X\(\/\/\)$/{
16230 s//\1/
16231 q
16232 }
16233 /^X\(\/\).*/{
16234 s//\1/
16235 q
16236 }
16237 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016238 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016239 ac_builddir=.
16240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016241case "$ac_dir" in
16242.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16243*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016244 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016245 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016246 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016247 case $ac_top_builddir_sub in
16248 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16249 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16250 esac ;;
16251esac
16252ac_abs_top_builddir=$ac_pwd
16253ac_abs_builddir=$ac_pwd$ac_dir_suffix
16254# for backward compatibility:
16255ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016256
16257case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016258 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016260 ac_top_srcdir=$ac_top_builddir_sub
16261 ac_abs_top_srcdir=$ac_pwd ;;
16262 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016263 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264 ac_top_srcdir=$srcdir
16265 ac_abs_top_srcdir=$srcdir ;;
16266 *) # Relative name.
16267 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16268 ac_top_srcdir=$ac_top_build_prefix$srcdir
16269 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016270esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016272
Martin v. Löwis11437992002-04-12 09:54:03 +000016273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016274 case $ac_mode in
16275 :F)
16276 #
16277 # CONFIG_FILE
16278 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016279
16280 case $INSTALL in
16281 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016283 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016284 ac_MKDIR_P=$MKDIR_P
16285 case $MKDIR_P in
16286 [\\/$]* | ?:[\\/]* ) ;;
16287 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16288 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016289_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290
Matthias Kloseb9621712010-04-24 17:59:49 +000016291cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292# If the template does not know about datarootdir, expand it.
16293# FIXME: This hack should be removed a few years after 2.60.
16294ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016295ac_sed_dataroot='
16296/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016297 p
16298 q
16299}
16300/@datadir@/p
16301/@docdir@/p
16302/@infodir@/p
16303/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016304/@mandir@/p'
16305case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306*datarootdir*) ac_datarootdir_seen=yes;;
16307*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16309$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016311cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016312 ac_datarootdir_hack='
16313 s&@datadir@&$datadir&g
16314 s&@docdir@&$docdir&g
16315 s&@infodir@&$infodir&g
16316 s&@localedir@&$localedir&g
16317 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016318 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016319esac
16320_ACEOF
16321
16322# Neutralize VPATH when `$srcdir' = `.'.
16323# Shell code in configure.ac might set extrasub.
16324# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016325cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16326ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016327$extrasub
16328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016329cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016330:t
16331/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016332s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016334s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016335s&@srcdir@&$ac_srcdir&;t t
16336s&@abs_srcdir@&$ac_abs_srcdir&;t t
16337s&@top_srcdir@&$ac_top_srcdir&;t t
16338s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16339s&@builddir@&$ac_builddir&;t t
16340s&@abs_builddir@&$ac_abs_builddir&;t t
16341s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16342s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016343s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016345"
Victor Stinnere0be4232011-10-25 13:06:09 +020016346eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16347 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016350 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16351 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16352 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016354which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016355$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016356which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016357
Victor Stinnere0be4232011-10-25 13:06:09 +020016358 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016359 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016360 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16361 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016362 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016363 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016364 ;;
16365 :H)
16366 #
16367 # CONFIG_HEADER
16368 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016369 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016370 {
16371 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016372 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16373 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016374 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016375 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016376 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16377$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016378 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016379 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016380 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016381 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016382 fi
16383 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016384 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016385 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016386 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016390
16391 esac
16392
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016393
16394 case $ac_file$ac_mode in
16395 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16396
16397 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016398done # for ac_tag
16399
Guido van Rossum627b2d71993-12-24 10:39:16 +000016400
Matthias Kloseb9621712010-04-24 17:59:49 +000016401as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016402_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016403ac_clean_files=$ac_clean_files_save
16404
Matthias Kloseb9621712010-04-24 17:59:49 +000016405test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016406 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016407
Martin v. Löwis11437992002-04-12 09:54:03 +000016408
16409# configure is writing to config.log, and then calls config.status.
16410# config.status does its own redirection, appending to config.log.
16411# Unfortunately, on DOS this fails, as config.log is still kept open
16412# by configure, so config.status won't be able to write to it; its
16413# output is simply discarded. So we exec the FD to /dev/null,
16414# effectively closing config.log, so it can be properly (re)opened and
16415# appended to by config.status. When coming back to configure, we
16416# need to make the FD available again.
16417if test "$no_create" != yes; then
16418 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016419 ac_config_status_args=
16420 test "$silent" = yes &&
16421 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016422 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016423 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 exec 5>>config.log
16425 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16426 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016427 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016428fi
16429if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16430 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16431$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016432fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016433
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016434
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016435echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016436if test ! -f Modules/Setup
16437then
16438 cp $srcdir/Modules/Setup.dist Modules/Setup
16439fi
16440
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016441echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016442if test ! -f Modules/Setup.local
16443then
16444 echo "# Edit this file for local setup changes" >Modules/Setup.local
16445fi
16446
16447echo "creating Makefile"
16448$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16449 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016450 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016451mv config.c Modules