blob: 6407cc4b68842e489a9bfd4eacd324680956b29c [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 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009799
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9801$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009802 ipv6=no
9803
9804else
Matthias Kloseb9621712010-04-24 17:59:49 +00009805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009806/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009807 /* AF_INET6 available check */
9808#include <sys/types.h>
9809#include <sys/socket.h>
9810main()
9811{
9812 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9813 exit(1);
9814 else
9815 exit(0);
9816}
9817
Martin v. Löwis11437992002-04-12 09:54:03 +00009818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009819if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009820
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9822$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009824
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009825else
Matthias Kloseb159a552010-04-25 21:00:44 +00009826
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9828$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009829 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009830
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009832rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9833 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009834fi
9835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009836
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009837if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9839$as_echo_n "checking if RFC2553 API is available... " >&6; }
9840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009841/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009842
9843 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009844#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009848struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009849 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 ;
9851 return 0;
9852}
Matthias Kloseb159a552010-04-25 21:00:44 +00009853
Martin v. Löwis11437992002-04-12 09:54:03 +00009854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009855if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009856
9857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009858$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009859 ipv6=yes
9860
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009861else
Matthias Kloseb159a552010-04-25 21:00:44 +00009862
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009864$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009865 ipv6=no
9866
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009869fi
9870
9871if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009873
9874fi
9875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876fi
9877
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009878
9879ipv6type=unknown
9880ipv6lib=none
9881ipv6trylibc=no
9882
9883if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9885$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009886 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9887 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009888 case $i in
9889 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009891/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009892
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893#include <netinet/in.h>
9894#ifdef IPV6_INRIA_VERSION
9895yes
9896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009897_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009900 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009901fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009902rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009903
9904 ;;
9905 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009907/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009908
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009909#include <netinet/in.h>
9910#ifdef __KAME__
9911yes
9912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009913_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009916 ipv6type=$i;
9917 ipv6lib=inet6
9918 ipv6libdir=/usr/local/v6/lib
9919 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009920fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009921rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009922
9923 ;;
9924 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009926/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009927
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009928#include <features.h>
9929#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9930yes
9931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009932_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009935 ipv6type=$i;
9936 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009937fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009938rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009939
9940 ;;
9941 linux-inet6)
9942 if test -d /usr/inet6; then
9943 ipv6type=$i
9944 ipv6lib=inet6
9945 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009946 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009947 fi
9948 ;;
9949 solaris)
9950 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009951 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009952 ipv6type=$i
9953 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009954 fi
9955 fi
9956 ;;
9957 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009959/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009960
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009961#include <sys/param.h>
9962#ifdef _TOSHIBA_INET6
9963yes
9964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009965_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009967 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009968 ipv6type=$i;
9969 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009970 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009971fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009972rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009973
9974 ;;
9975 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009977/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009978
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009979#include </usr/local/v6/include/sys/v6config.h>
9980#ifdef __V6D__
9981yes
9982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009983_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009985 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009986 ipv6type=$i;
9987 ipv6lib=v6;
9988 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009989 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009990fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009991rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009992
9993 ;;
9994 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009996/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009997
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009998#include <sys/param.h>
9999#ifdef _ZETA_MINAMI_INET6
10000yes
10001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010002_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010004 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010005 ipv6type=$i;
10006 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010007 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010008fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010009rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010010
10011 ;;
10012 esac
10013 if test "$ipv6type" != "unknown"; then
10014 break
10015 fi
10016 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10018$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010019fi
10020
10021if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10022 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10023 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10024 echo "using lib$ipv6lib"
10025 else
10026 if test $ipv6trylibc = "yes"; then
10027 echo "using libc"
10028 else
10029 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10030 echo "You need to fetch lib$ipv6lib.a from appropriate"
10031 echo 'ipv6 kit and compile beforehand.'
10032 exit 1
10033 fi
10034 fi
10035fi
10036
Matthias Kloseb9621712010-04-24 17:59:49 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10038$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010040/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010041
10042 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010043int
10044main ()
10045{
10046FSIORefNum fRef = 0
10047 ;
10048 return 0;
10049}
Matthias Kloseb159a552010-04-25 21:00:44 +000010050
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010052if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010053
Matthias Kloseb159a552010-04-25 21:00:44 +000010054
Matthias Kloseb9621712010-04-24 17:59:49 +000010055$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010056
Matthias Kloseb9621712010-04-24 17:59:49 +000010057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10058$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010059
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010060else
Matthias Kloseb159a552010-04-25 21:00:44 +000010061
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10063$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010064
10065fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10067
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010068# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10070$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010072# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010073if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010074 withval=$with_doc_strings;
10075fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010076
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010077
10078if test -z "$with_doc_strings"
10079then with_doc_strings="yes"
10080fi
10081if test "$with_doc_strings" != "no"
10082then
10083
Matthias Kloseb9621712010-04-24 17:59:49 +000010084$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010085
10086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10088$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010089
Antoine Pitrou042b1282010-08-13 21:15:58 +000010090# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10092$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010095if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010096 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010097if test "$withval" != no
10098then
10099
Matthias Kloseb9621712010-04-24 17:59:49 +000010100$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010101
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10103$as_echo "yes" >&6; }
10104else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10105$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010106fi
10107else
Matthias Kloseb9621712010-04-24 17:59:49 +000010108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10109$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110fi
10111
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010112
10113# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10115$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010118if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010119 withval=$with_pymalloc;
10120fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010121
Neil Schemenauera35c6882001-02-27 04:45:05 +000010122
Neil Schemenauer16c22972002-03-22 15:34:49 +000010123if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010124then
10125 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010126fi
10127if test "$with_pymalloc" != "no"
10128then
Martin v. Löwis11437992002-04-12 09:54:03 +000010129
Matthias Kloseb9621712010-04-24 17:59:49 +000010130$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010131
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010132 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10135$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010136
Benjamin Peterson05159c42009-12-03 03:01:27 +000010137# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10139$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010140
10141# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010142if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010143 withval=$with_valgrind;
10144else
10145 with_valgrind=no
10146fi
10147
Matthias Kloseb9621712010-04-24 17:59:49 +000010148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10149$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010150if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010151 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 +020010152if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010153
Matthias Kloseb9621712010-04-24 17:59:49 +000010154$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010155
10156else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010157 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010158
10159fi
10160
10161
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010162 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010163fi
10164
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010165# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010166
Guido van Rossum98935bf2001-09-05 19:13:16 +000010167DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010168
Guido van Rossume97ee181999-12-20 21:27:22 +000010169# the dlopen() function means we might want to use dynload_shlib.o. some
10170# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010171for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010172do :
10173 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010174if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010175 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010176#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010177_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010178
Guido van Rossume97ee181999-12-20 21:27:22 +000010179fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010180done
Guido van Rossume97ee181999-12-20 21:27:22 +000010181
Michael W. Hudson54241132001-12-07 15:38:26 +000010182
Guido van Rossume97ee181999-12-20 21:27:22 +000010183# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10184# loading of modules.
10185
Matthias Kloseb9621712010-04-24 17:59:49 +000010186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10187$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010188if test -z "$DYNLOADFILE"
10189then
10190 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010191 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10192 if test "$ac_cv_func_dlopen" = yes
10193 then DYNLOADFILE="dynload_shlib.o"
10194 else DYNLOADFILE="dynload_aix.o"
10195 fi
10196 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010197 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010198 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10199 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010200 *)
10201 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10202 # out any dynamic loading
10203 if test "$ac_cv_func_dlopen" = yes
10204 then DYNLOADFILE="dynload_shlib.o"
10205 else DYNLOADFILE="dynload_stub.o"
10206 fi
10207 ;;
10208 esac
10209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10211$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010212if test "$DYNLOADFILE" != "dynload_stub.o"
10213then
Martin v. Löwis11437992002-04-12 09:54:03 +000010214
Matthias Kloseb9621712010-04-24 17:59:49 +000010215$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010216
10217fi
10218
Neil Schemenauer4e425612001-06-19 15:44:15 +000010219# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10220
Michael W. Hudson54241132001-12-07 15:38:26 +000010221
Matthias Kloseb9621712010-04-24 17:59:49 +000010222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10223$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010224if test -z "$MACHDEP_OBJS"
10225then
Jack Jansene578a632001-08-15 01:27:14 +000010226 MACHDEP_OBJS=$extra_machdep_objs
10227else
10228 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010229fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010230if test -z "$MACHDEP_OBJS"; then
10231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10232$as_echo "none" >&6; }
10233else
10234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10235$as_echo "$MACHDEP_OBJS" >&6; }
10236fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010237
Guido van Rossum627b2d71993-12-24 10:39:16 +000010238# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010239for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010240 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010241 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010242 futimens futimes gai_strerror \
10243 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010244 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010245 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010246 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10247 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010248 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010249 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010250 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010251 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010252 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010253 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010254 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10255 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010256 sigaction sigaltstack siginterrupt sigpending sigrelse \
10257 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010258 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010259 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10260 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010261do :
10262 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10263ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010264if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010266#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010267_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010268
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010269fi
10270done
10271
Michael W. Hudson54241132001-12-07 15:38:26 +000010272
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010273ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10274 #include <dirent.h>
10275"
10276if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10277
10278$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10279
10280fi
10281
10282
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010283# For some functions, having a definition is not sufficient, since
10284# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10286$as_echo_n "checking for chroot... " >&6; }
10287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010288/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010289#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010290int
10291main ()
10292{
10293void *x=chroot
10294 ;
10295 return 0;
10296}
10297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010299
Matthias Kloseb9621712010-04-24 17:59:49 +000010300$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010301
Matthias Kloseb159a552010-04-25 21:00:44 +000010302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010303$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010304else
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10306$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010307
10308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10311$as_echo_n "checking for link... " >&6; }
10312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010313/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010314#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010315int
10316main ()
10317{
10318void *x=link
10319 ;
10320 return 0;
10321}
10322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010323if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010324
Matthias Kloseb9621712010-04-24 17:59:49 +000010325$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010326
Matthias Kloseb159a552010-04-25 21:00:44 +000010327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010328$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010329else
Matthias Kloseb9621712010-04-24 17:59:49 +000010330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10331$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010332
10333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10336$as_echo_n "checking for symlink... " >&6; }
10337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010338/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010339#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010340int
10341main ()
10342{
10343void *x=symlink
10344 ;
10345 return 0;
10346}
10347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010348if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010351
Matthias Kloseb159a552010-04-25 21:00:44 +000010352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010353$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010354else
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10356$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010357
10358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10361$as_echo_n "checking for fchdir... " >&6; }
10362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010363/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010364#include <unistd.h>
10365int
10366main ()
10367{
10368void *x=fchdir
10369 ;
10370 return 0;
10371}
10372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010374
Matthias Kloseb9621712010-04-24 17:59:49 +000010375$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010376
Matthias Kloseb159a552010-04-25 21:00:44 +000010377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010378$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010379else
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010382
10383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10386$as_echo_n "checking for fsync... " >&6; }
10387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010388/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010389#include <unistd.h>
10390int
10391main ()
10392{
10393void *x=fsync
10394 ;
10395 return 0;
10396}
10397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010399
Matthias Kloseb9621712010-04-24 17:59:49 +000010400$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010401
Matthias Kloseb159a552010-04-25 21:00:44 +000010402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010403$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010404else
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10406$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010407
10408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10411$as_echo_n "checking for fdatasync... " >&6; }
10412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010413/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010414#include <unistd.h>
10415int
10416main ()
10417{
10418void *x=fdatasync
10419 ;
10420 return 0;
10421}
10422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010423if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010424
Matthias Kloseb9621712010-04-24 17:59:49 +000010425$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010426
Matthias Kloseb159a552010-04-25 21:00:44 +000010427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010428$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010429else
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10431$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010432
10433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10436$as_echo_n "checking for epoll... " >&6; }
10437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010438/* end confdefs.h. */
10439#include <sys/epoll.h>
10440int
10441main ()
10442{
10443void *x=epoll_create
10444 ;
10445 return 0;
10446}
10447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010448if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010449
Matthias Kloseb9621712010-04-24 17:59:49 +000010450$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010451
Matthias Kloseb159a552010-04-25 21:00:44 +000010452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010453$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010454else
Matthias Kloseb9621712010-04-24 17:59:49 +000010455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10456$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010457
10458fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10461$as_echo_n "checking for epoll_create1... " >&6; }
10462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10463/* end confdefs.h. */
10464#include <sys/epoll.h>
10465int
10466main ()
10467{
10468void *x=epoll_create1
10469 ;
10470 return 0;
10471}
10472_ACEOF
10473if ac_fn_c_try_compile "$LINENO"; then :
10474
10475$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10476
10477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10478$as_echo "yes" >&6; }
10479else
10480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10481$as_echo "no" >&6; }
10482
10483fi
10484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10486$as_echo_n "checking for kqueue... " >&6; }
10487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010488/* end confdefs.h. */
10489
10490#include <sys/types.h>
10491#include <sys/event.h>
10492
10493int
10494main ()
10495{
10496int x=kqueue()
10497 ;
10498 return 0;
10499}
10500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010501if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010502
Matthias Kloseb9621712010-04-24 17:59:49 +000010503$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010504
Matthias Kloseb159a552010-04-25 21:00:44 +000010505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010506$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010507else
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10509$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010510
10511fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010513# On some systems (eg. FreeBSD 5), we would find a definition of the
10514# functions ctermid_r, setgroups in the library, but no prototype
10515# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10516# address to avoid compiler warnings and potential miscompilations
10517# because of the missing prototypes.
10518
Matthias Kloseb9621712010-04-24 17:59:49 +000010519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10520$as_echo_n "checking for ctermid_r... " >&6; }
10521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010522/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010523
Martin v. Löwisd5843682002-11-21 20:41:28 +000010524#include <stdio.h>
10525
Martin v. Löwisd5843682002-11-21 20:41:28 +000010526int
10527main ()
10528{
10529void* p = ctermid_r
10530 ;
10531 return 0;
10532}
10533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010534if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010535
Matthias Kloseb9621712010-04-24 17:59:49 +000010536$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010537
Matthias Kloseb159a552010-04-25 21:00:44 +000010538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010539$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010540else
Matthias Kloseb9621712010-04-24 17:59:49 +000010541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10542$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010543
10544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10546
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10548$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010549if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010550 $as_echo_n "(cached) " >&6
10551else
10552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010553/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010554#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010555int
10556main ()
10557{
10558void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010559
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010560 ;
10561 return 0;
10562}
10563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010564if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010565 ac_cv_flock_decl=yes
10566else
10567 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010568
10569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010571
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010572fi
10573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10574$as_echo "$ac_cv_flock_decl" >&6; }
10575if test "x${ac_cv_flock_decl}" = xyes; then
10576 for ac_func in flock
10577do :
10578 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010579if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010580 cat >>confdefs.h <<_ACEOF
10581#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010582_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010583
Antoine Pitroua3000072010-09-07 14:52:42 +000010584else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010586$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010587if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010588 $as_echo_n "(cached) " >&6
10589else
10590 ac_check_lib_save_LIBS=$LIBS
10591LIBS="-lbsd $LIBS"
10592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10593/* end confdefs.h. */
10594
10595/* Override any GCC internal prototype to avoid an error.
10596 Use char because int might match the return type of a GCC
10597 builtin and then its argument prototype would still apply. */
10598#ifdef __cplusplus
10599extern "C"
10600#endif
10601char flock ();
10602int
10603main ()
10604{
10605return flock ();
10606 ;
10607 return 0;
10608}
10609_ACEOF
10610if ac_fn_c_try_link "$LINENO"; then :
10611 ac_cv_lib_bsd_flock=yes
10612else
10613 ac_cv_lib_bsd_flock=no
10614fi
10615rm -f core conftest.err conftest.$ac_objext \
10616 conftest$ac_exeext conftest.$ac_ext
10617LIBS=$ac_check_lib_save_LIBS
10618fi
10619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10620$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010621if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010622 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010623
10624
10625$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10626
10627
10628fi
10629
10630
10631fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010632done
10633
Antoine Pitroua3000072010-09-07 14:52:42 +000010634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635
Matthias Kloseb9621712010-04-24 17:59:49 +000010636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10637$as_echo_n "checking for getpagesize... " >&6; }
10638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010639/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010640
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010641#include <unistd.h>
10642
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010643int
10644main ()
10645{
10646void* p = getpagesize
10647 ;
10648 return 0;
10649}
10650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010651if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010652
Matthias Kloseb9621712010-04-24 17:59:49 +000010653$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010654
Matthias Kloseb159a552010-04-25 21:00:44 +000010655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010656$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010657else
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10659$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010660
10661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010663
Victor Stinner984890f2011-11-24 13:53:38 +010010664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10665$as_echo_n "checking for broken unsetenv... " >&6; }
10666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10667/* end confdefs.h. */
10668
10669#include <stdlib.h>
10670
10671int
10672main ()
10673{
10674int res = unsetenv("DUMMY")
10675 ;
10676 return 0;
10677}
10678_ACEOF
10679if ac_fn_c_try_compile "$LINENO"; then :
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10681$as_echo "no" >&6; }
10682else
10683
10684$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10685
10686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10687$as_echo "yes" >&6; }
10688
10689fi
10690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10691
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010692for ac_prog in true
10693do
10694 # Extract the first word of "$ac_prog", so it can be a program name with args.
10695set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10697$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010698if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010700else
10701 if test -n "$TRUE"; then
10702 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10703else
10704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10705for as_dir in $PATH
10706do
10707 IFS=$as_save_IFS
10708 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010711 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 $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 +000010713 break 2
10714 fi
10715done
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010718
10719fi
10720fi
10721TRUE=$ac_cv_prog_TRUE
10722if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10724$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010725else
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10727$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010728fi
10729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010730
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010731 test -n "$TRUE" && break
10732done
10733test -n "$TRUE" || TRUE="/bin/true"
10734
10735
Matthias Kloseb9621712010-04-24 17:59:49 +000010736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10737$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010738if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010740else
10741 ac_check_lib_save_LIBS=$LIBS
10742LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010744/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010746/* Override any GCC internal prototype to avoid an error.
10747 Use char because int might match the return type of a GCC
10748 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010749#ifdef __cplusplus
10750extern "C"
10751#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010752char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010753int
10754main ()
10755{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010756return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010757 ;
10758 return 0;
10759}
10760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010761if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010762 ac_cv_lib_c_inet_aton=yes
10763else
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010766rm -f core conftest.err conftest.$ac_objext \
10767 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010768LIBS=$ac_check_lib_save_LIBS
10769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10771$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010772if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010773 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010774else
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10776$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010777if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010779else
10780 ac_check_lib_save_LIBS=$LIBS
10781LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010785/* Override any GCC internal prototype to avoid an error.
10786 Use char because int might match the return type of a GCC
10787 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010788#ifdef __cplusplus
10789extern "C"
10790#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010791char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010792int
10793main ()
10794{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010796 ;
10797 return 0;
10798}
10799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010800if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010801 ac_cv_lib_resolv_inet_aton=yes
10802else
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010805rm -f core conftest.err conftest.$ac_objext \
10806 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010807LIBS=$ac_check_lib_save_LIBS
10808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10810$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010811if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010812 cat >>confdefs.h <<_ACEOF
10813#define HAVE_LIBRESOLV 1
10814_ACEOF
10815
10816 LIBS="-lresolv $LIBS"
10817
10818fi
10819
10820
10821fi
10822
10823
Christian Heimesd0764e22007-12-04 15:00:33 +000010824# On Tru64, chflags seems to be present, but calling it will
10825# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10827$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010828if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010830else
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010832 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010833else
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010835/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010836
Christian Heimesd0764e22007-12-04 15:00:33 +000010837#include <sys/stat.h>
10838#include <unistd.h>
10839int main(int argc, char*argv[])
10840{
10841 if(chflags(argv[0], 0) != 0)
10842 return 1;
10843 return 0;
10844}
Ned Deily3eb67d52011-06-28 00:00:28 -070010845
Christian Heimesd0764e22007-12-04 15:00:33 +000010846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010847if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010848 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010849else
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10853 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010854fi
10855
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010856
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10859$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010860if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010862if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010863 ac_cv_have_chflags="yes"
10864else
10865 ac_cv_have_chflags="no"
10866fi
10867
10868fi
10869if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010872
10873fi
10874
Matthias Kloseb9621712010-04-24 17:59:49 +000010875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10876$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010877if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010879else
Matthias Kloseb9621712010-04-24 17:59:49 +000010880 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010881 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010882else
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010884/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010885
Christian Heimesd0764e22007-12-04 15:00:33 +000010886#include <sys/stat.h>
10887#include <unistd.h>
10888int main(int argc, char*argv[])
10889{
10890 if(lchflags(argv[0], 0) != 0)
10891 return 1;
10892 return 0;
10893}
Ned Deily3eb67d52011-06-28 00:00:28 -070010894
Christian Heimesd0764e22007-12-04 15:00:33 +000010895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010896if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010897 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010898else
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010903fi
10904
10905
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10908$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010909if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010910 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010911if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010912 ac_cv_have_lchflags="yes"
10913else
10914 ac_cv_have_lchflags="no"
10915fi
10916
10917fi
10918if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010921
10922fi
10923
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010924case $ac_sys_system/$ac_sys_release in
10925Darwin/*)
10926 _CUR_CFLAGS="${CFLAGS}"
10927 _CUR_LDFLAGS="${LDFLAGS}"
10928 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10929 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10930 ;;
10931esac
10932
Matthias Kloseb9621712010-04-24 17:59:49 +000010933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10934$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010935if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010937else
10938 ac_check_lib_save_LIBS=$LIBS
10939LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010941/* end confdefs.h. */
10942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010943/* Override any GCC internal prototype to avoid an error.
10944 Use char because int might match the return type of a GCC
10945 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010946#ifdef __cplusplus
10947extern "C"
10948#endif
10949char inflateCopy ();
10950int
10951main ()
10952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010953return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010954 ;
10955 return 0;
10956}
10957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010958if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010959 ac_cv_lib_z_inflateCopy=yes
10960else
Matthias Kloseb9621712010-04-24 17:59:49 +000010961 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010963rm -f core conftest.err conftest.$ac_objext \
10964 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010965LIBS=$ac_check_lib_save_LIBS
10966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10968$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010969if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010970
Matthias Kloseb9621712010-04-24 17:59:49 +000010971$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010972
10973fi
10974
10975
10976case $ac_sys_system/$ac_sys_release in
10977Darwin/*)
10978 CFLAGS="${_CUR_CFLAGS}"
10979 LDFLAGS="${_CUR_LDFLAGS}"
10980 ;;
10981esac
10982
Matthias Kloseb9621712010-04-24 17:59:49 +000010983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10984$as_echo_n "checking for hstrerror... " >&6; }
10985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010986/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010987
Martin v. Löwise9416172003-05-03 10:12:45 +000010988#include <netdb.h>
10989
Martin v. Löwise9416172003-05-03 10:12:45 +000010990int
10991main ()
10992{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010993void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010994 ;
10995 return 0;
10996}
10997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010998if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010999
Matthias Kloseb9621712010-04-24 17:59:49 +000011000$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011001
Matthias Kloseb159a552010-04-25 21:00:44 +000011002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011003$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011004else
Matthias Kloseb9621712010-04-24 17:59:49 +000011005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11006$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011007
11008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011009rm -f core conftest.err conftest.$ac_objext \
11010 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011
Matthias Kloseb9621712010-04-24 17:59:49 +000011012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11013$as_echo_n "checking for inet_aton... " >&6; }
11014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011015/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011016
Martin v. Löwis86d66262006-02-17 08:40:11 +000011017#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011018#include <sys/socket.h>
11019#include <netinet/in.h>
11020#include <arpa/inet.h>
11021
Martin v. Löwise9416172003-05-03 10:12:45 +000011022int
11023main ()
11024{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011025void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011026 ;
11027 return 0;
11028}
11029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011030if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011031
Matthias Kloseb9621712010-04-24 17:59:49 +000011032$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011033
Matthias Kloseb159a552010-04-25 21:00:44 +000011034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011035$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011036else
Matthias Kloseb9621712010-04-24 17:59:49 +000011037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011039
11040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011041rm -f core conftest.err conftest.$ac_objext \
11042 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043
Matthias Kloseb9621712010-04-24 17:59:49 +000011044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11045$as_echo_n "checking for inet_pton... " >&6; }
11046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011047/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011048
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011049#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011050#include <sys/socket.h>
11051#include <netinet/in.h>
11052#include <arpa/inet.h>
11053
Martin v. Löwise9416172003-05-03 10:12:45 +000011054int
11055main ()
11056{
11057void* p = inet_pton
11058 ;
11059 return 0;
11060}
11061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011062if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011063
Matthias Kloseb9621712010-04-24 17:59:49 +000011064$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011065
Matthias Kloseb159a552010-04-25 21:00:44 +000011066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011067$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011068else
Matthias Kloseb9621712010-04-24 17:59:49 +000011069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11070$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011071
11072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011074
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011075# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11077$as_echo_n "checking for setgroups... " >&6; }
11078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011079/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011080
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011081#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011082#ifdef HAVE_GRP_H
11083#include <grp.h>
11084#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011085
Martin v. Löwisd5843682002-11-21 20:41:28 +000011086int
11087main ()
11088{
11089void* p = setgroups
11090 ;
11091 return 0;
11092}
11093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011094if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011095
Matthias Kloseb9621712010-04-24 17:59:49 +000011096$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011097
Matthias Kloseb159a552010-04-25 21:00:44 +000011098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011099$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011100else
Matthias Kloseb9621712010-04-24 17:59:49 +000011101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11102$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011103
11104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011106
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011107# check for openpty and forkpty
11108
11109for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011110do :
11111 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011112if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011114#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011115_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011116
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011117else
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11119$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011120if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011121 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011122else
Martin v. Löwis11437992002-04-12 09:54:03 +000011123 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011124LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011126/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128/* Override any GCC internal prototype to avoid an error.
11129 Use char because int might match the return type of a GCC
11130 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011131#ifdef __cplusplus
11132extern "C"
11133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011134char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011135int
11136main ()
11137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011138return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 ;
11140 return 0;
11141}
11142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011143if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011145else
Matthias Kloseb9621712010-04-24 17:59:49 +000011146 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011148rm -f core conftest.err conftest.$ac_objext \
11149 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011150LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11153$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011154if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011155 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011156 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011157else
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11159$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011160if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011161 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011162else
11163 ac_check_lib_save_LIBS=$LIBS
11164LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011166/* end confdefs.h. */
11167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011168/* Override any GCC internal prototype to avoid an error.
11169 Use char because int might match the return type of a GCC
11170 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011171#ifdef __cplusplus
11172extern "C"
11173#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011174char openpty ();
11175int
11176main ()
11177{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011178return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011179 ;
11180 return 0;
11181}
11182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011183if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011184 ac_cv_lib_bsd_openpty=yes
11185else
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011188rm -f core conftest.err conftest.$ac_objext \
11189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011190LIBS=$ac_check_lib_save_LIBS
11191fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11193$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011194if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011195 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011196 LIBS="$LIBS -lbsd"
11197fi
11198
11199
11200fi
11201
Fred Drake8cef4cf2000-06-28 16:40:38 +000011202
11203fi
11204done
11205
11206for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011207do :
11208 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011209if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011211#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011212_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011213
Fred Drake8cef4cf2000-06-28 16:40:38 +000011214else
Matthias Kloseb9621712010-04-24 17:59:49 +000011215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11216$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011217if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011218 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011219else
Martin v. Löwis11437992002-04-12 09:54:03 +000011220 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011221LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011225/* Override any GCC internal prototype to avoid an error.
11226 Use char because int might match the return type of a GCC
11227 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011228#ifdef __cplusplus
11229extern "C"
11230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011231char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011232int
11233main ()
11234{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011235return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011236 ;
11237 return 0;
11238}
11239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011240if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011241 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011242else
Matthias Kloseb9621712010-04-24 17:59:49 +000011243 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011245rm -f core conftest.err conftest.$ac_objext \
11246 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011247LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11250$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011251if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011252 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011253 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011254else
Matthias Kloseb9621712010-04-24 17:59:49 +000011255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11256$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011257if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011258 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011259else
11260 ac_check_lib_save_LIBS=$LIBS
11261LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011263/* end confdefs.h. */
11264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011265/* Override any GCC internal prototype to avoid an error.
11266 Use char because int might match the return type of a GCC
11267 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011268#ifdef __cplusplus
11269extern "C"
11270#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011271char forkpty ();
11272int
11273main ()
11274{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011276 ;
11277 return 0;
11278}
11279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011280if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011281 ac_cv_lib_bsd_forkpty=yes
11282else
Matthias Kloseb9621712010-04-24 17:59:49 +000011283 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011285rm -f core conftest.err conftest.$ac_objext \
11286 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011287LIBS=$ac_check_lib_save_LIBS
11288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11290$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011291if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011292 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011293 LIBS="$LIBS -lbsd"
11294fi
11295
11296
11297fi
11298
Fred Drake8cef4cf2000-06-28 16:40:38 +000011299
11300fi
11301done
11302
Jack Jansendd19cf82001-12-06 22:36:17 +000011303
Christian Heimesb186d002008-03-18 15:15:01 +000011304# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011305for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011306do :
11307 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011308if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011309 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011310#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011311_ACEOF
11312
11313fi
11314done
11315
11316
Michael W. Hudson54241132001-12-07 15:38:26 +000011317# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011318for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011319do :
11320 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11321ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011322if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011323 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011324#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011325_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011326
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011327fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011328done
11329
Michael W. Hudson54241132001-12-07 15:38:26 +000011330
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011331ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011332if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011333 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011334
Martin v. Löwis1142de32002-03-29 16:28:31 +000011335else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011336 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011337 *" dup2.$ac_objext "* ) ;;
11338 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011340esac
11341
Martin v. Löwis1142de32002-03-29 16:28:31 +000011342fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011343
11344ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011345if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011346 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11347
11348else
11349 case " $LIBOBJS " in
11350 *" getcwd.$ac_objext "* ) ;;
11351 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11352 ;;
11353esac
11354
11355fi
11356
11357ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011358if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011359 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11360
11361else
11362 case " $LIBOBJS " in
11363 *" strdup.$ac_objext "* ) ;;
11364 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11365 ;;
11366esac
11367
11368fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011369
11370
11371for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011372do :
11373 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011374if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011376#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011379/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011380#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011381int
11382main ()
11383{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011384getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011385 ;
11386 return 0;
11387}
11388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011390
Matthias Kloseb9621712010-04-24 17:59:49 +000011391$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011392
Guido van Rossum627b2d71993-12-24 10:39:16 +000011393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011395
Guido van Rossum627b2d71993-12-24 10:39:16 +000011396fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011397done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011398
Jack Jansen150753c2003-03-29 22:07:47 +000011399for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011400do :
11401 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011402if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011403 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011404#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011407/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011408#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011409int
11410main ()
11411{
11412setpgrp(0,0);
11413 ;
11414 return 0;
11415}
11416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011417if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011418
Matthias Kloseb9621712010-04-24 17:59:49 +000011419$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011420
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011423
11424fi
11425done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011426
Thomas Wouters3a584202000-08-05 23:28:51 +000011427for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011428do :
11429 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011430if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011431 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011432#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011435/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011436#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011437int
11438main ()
11439{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011440gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 ;
11442 return 0;
11443}
11444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011445if ac_fn_c_try_compile "$LINENO"; then :
11446
Guido van Rossum627b2d71993-12-24 10:39:16 +000011447else
Skip Montanaro6dead952003-09-25 14:50:04 +000011448
Matthias Kloseb9621712010-04-24 17:59:49 +000011449$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011450
Martin v. Löwis11437992002-04-12 09:54:03 +000011451
Guido van Rossum627b2d71993-12-24 10:39:16 +000011452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011454
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011455fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011456done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011457
Michael W. Hudson54241132001-12-07 15:38:26 +000011458
Victor Stinnere0be4232011-10-25 13:06:09 +020011459for ac_func in clock_gettime
11460do :
11461 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11462if test "x$ac_cv_func_clock_gettime" = xyes; then :
11463 cat >>confdefs.h <<_ACEOF
11464#define HAVE_CLOCK_GETTIME 1
11465_ACEOF
11466
11467else
11468
11469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11470$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11471if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11472 $as_echo_n "(cached) " >&6
11473else
11474 ac_check_lib_save_LIBS=$LIBS
11475LIBS="-lrt $LIBS"
11476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477/* end confdefs.h. */
11478
11479/* Override any GCC internal prototype to avoid an error.
11480 Use char because int might match the return type of a GCC
11481 builtin and then its argument prototype would still apply. */
11482#ifdef __cplusplus
11483extern "C"
11484#endif
11485char clock_gettime ();
11486int
11487main ()
11488{
11489return clock_gettime ();
11490 ;
11491 return 0;
11492}
11493_ACEOF
11494if ac_fn_c_try_link "$LINENO"; then :
11495 ac_cv_lib_rt_clock_gettime=yes
11496else
11497 ac_cv_lib_rt_clock_gettime=no
11498fi
11499rm -f core conftest.err conftest.$ac_objext \
11500 conftest$ac_exeext conftest.$ac_ext
11501LIBS=$ac_check_lib_save_LIBS
11502fi
11503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11504$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11505if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11506
11507 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11508
11509
11510$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11511
11512
11513fi
11514
11515
11516fi
11517done
11518
11519
11520for ac_func in clock_getres
11521do :
11522 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11523if test "x$ac_cv_func_clock_getres" = xyes; then :
11524 cat >>confdefs.h <<_ACEOF
11525#define HAVE_CLOCK_GETRES 1
11526_ACEOF
11527
11528else
11529
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11531$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11532if ${ac_cv_lib_rt_clock_getres+:} false; then :
11533 $as_echo_n "(cached) " >&6
11534else
11535 ac_check_lib_save_LIBS=$LIBS
11536LIBS="-lrt $LIBS"
11537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11538/* end confdefs.h. */
11539
11540/* Override any GCC internal prototype to avoid an error.
11541 Use char because int might match the return type of a GCC
11542 builtin and then its argument prototype would still apply. */
11543#ifdef __cplusplus
11544extern "C"
11545#endif
11546char clock_getres ();
11547int
11548main ()
11549{
11550return clock_getres ();
11551 ;
11552 return 0;
11553}
11554_ACEOF
11555if ac_fn_c_try_link "$LINENO"; then :
11556 ac_cv_lib_rt_clock_getres=yes
11557else
11558 ac_cv_lib_rt_clock_getres=no
11559fi
11560rm -f core conftest.err conftest.$ac_objext \
11561 conftest$ac_exeext conftest.$ac_ext
11562LIBS=$ac_check_lib_save_LIBS
11563fi
11564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11565$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11566if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11567
11568 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11569
11570
11571fi
11572
11573
11574fi
11575done
11576
11577
Matthias Kloseb9621712010-04-24 17:59:49 +000011578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11579$as_echo_n "checking for major... " >&6; }
11580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011581/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011582
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011583#if defined(MAJOR_IN_MKDEV)
11584#include <sys/mkdev.h>
11585#elif defined(MAJOR_IN_SYSMACROS)
11586#include <sys/sysmacros.h>
11587#else
11588#include <sys/types.h>
11589#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011590
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011591int
11592main ()
11593{
11594
11595 makedev(major(0),minor(0));
11596
11597 ;
11598 return 0;
11599}
11600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011601if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011602
11603
Matthias Kloseb9621712010-04-24 17:59:49 +000011604$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011605
Matthias Kloseb9621712010-04-24 17:59:49 +000011606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11607$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011608
11609else
Skip Montanaro6dead952003-09-25 14:50:04 +000011610
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11612$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011613
11614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011615rm -f core conftest.err conftest.$ac_objext \
11616 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011617
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011618# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011619# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11621$as_echo_n "checking for getaddrinfo... " >&6; }
11622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011623/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011624
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011625#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011626#include <sys/socket.h>
11627#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011628#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011629
Martin v. Löwis11437992002-04-12 09:54:03 +000011630int
11631main ()
11632{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011633getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 ;
11635 return 0;
11636}
11637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011638if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011639 have_getaddrinfo=yes
11640else
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011643rm -f core conftest.err conftest.$ac_objext \
11644 conftest$ac_exeext conftest.$ac_ext
11645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11646$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011647if test $have_getaddrinfo = yes
11648then
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11650$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011651 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011653else
Matthias Kloseb9621712010-04-24 17:59:49 +000011654 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011655
11656if test "${enable_ipv6+set}" = set; then
11657 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11658else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011659 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011660fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011661else
Matthias Kloseb9621712010-04-24 17:59:49 +000011662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011663/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011664
Stefan Krah19c21392012-11-22 23:47:32 +010011665#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011666#include <sys/types.h>
11667#include <netdb.h>
11668#include <string.h>
11669#include <sys/socket.h>
11670#include <netinet/in.h>
11671
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011672int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011673{
11674 int passive, gaierr, inet4 = 0, inet6 = 0;
11675 struct addrinfo hints, *ai, *aitop;
11676 char straddr[INET6_ADDRSTRLEN], strport[16];
11677
11678 for (passive = 0; passive <= 1; passive++) {
11679 memset(&hints, 0, sizeof(hints));
11680 hints.ai_family = AF_UNSPEC;
11681 hints.ai_flags = passive ? AI_PASSIVE : 0;
11682 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011683 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011684 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11685 (void)gai_strerror(gaierr);
11686 goto bad;
11687 }
11688 for (ai = aitop; ai; ai = ai->ai_next) {
11689 if (ai->ai_addr == NULL ||
11690 ai->ai_addrlen == 0 ||
11691 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11692 straddr, sizeof(straddr), strport, sizeof(strport),
11693 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11694 goto bad;
11695 }
11696 switch (ai->ai_family) {
11697 case AF_INET:
11698 if (strcmp(strport, "54321") != 0) {
11699 goto bad;
11700 }
11701 if (passive) {
11702 if (strcmp(straddr, "0.0.0.0") != 0) {
11703 goto bad;
11704 }
11705 } else {
11706 if (strcmp(straddr, "127.0.0.1") != 0) {
11707 goto bad;
11708 }
11709 }
11710 inet4++;
11711 break;
11712 case AF_INET6:
11713 if (strcmp(strport, "54321") != 0) {
11714 goto bad;
11715 }
11716 if (passive) {
11717 if (strcmp(straddr, "::") != 0) {
11718 goto bad;
11719 }
11720 } else {
11721 if (strcmp(straddr, "::1") != 0) {
11722 goto bad;
11723 }
11724 }
11725 inet6++;
11726 break;
11727 case AF_UNSPEC:
11728 goto bad;
11729 break;
11730 default:
11731 /* another family support? */
11732 break;
11733 }
11734 }
11735 }
11736
11737 if (!(inet4 == 0 || inet4 == 2))
11738 goto bad;
11739 if (!(inet6 == 0 || inet6 == 2))
11740 goto bad;
11741
11742 if (aitop)
11743 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011744 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011745
11746 bad:
11747 if (aitop)
11748 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011749 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011750}
11751
Martin v. Löwis11437992002-04-12 09:54:03 +000011752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011753if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011754 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011755else
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011760fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011761
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011762fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011763
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011765
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11767$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11768
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011769if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011770then
11771 if test $ipv6 = yes
11772 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011773 echo 'Fatal: You must get working getaddrinfo() function.'
11774 echo ' or you can specify "--disable-ipv6"'.
11775 exit 1
11776 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011777else
Martin v. Löwis11437992002-04-12 09:54:03 +000011778
Matthias Kloseb9621712010-04-24 17:59:49 +000011779$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011780
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011781fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011782
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011783for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011784do :
11785 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011786if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011788#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011789_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011790
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011791fi
11792done
11793
Michael W. Hudson54241132001-12-07 15:38:26 +000011794
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011795# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11797$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011798if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011800else
Matthias Kloseb9621712010-04-24 17:59:49 +000011801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011802/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011803#include <sys/types.h>
11804#include <sys/time.h>
11805#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011806
Martin v. Löwis11437992002-04-12 09:54:03 +000011807int
11808main ()
11809{
11810if ((struct tm *) 0)
11811return 0;
11812 ;
11813 return 0;
11814}
11815_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011816if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011817 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011818else
Matthias Kloseb9621712010-04-24 17:59:49 +000011819 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11824$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011825if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011826
Matthias Kloseb9621712010-04-24 17:59:49 +000011827$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011828
11829fi
11830
Matthias Kloseb9621712010-04-24 17:59:49 +000011831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11832$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011833if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011835else
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011837/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011838#include <sys/types.h>
11839#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011840
Martin v. Löwis11437992002-04-12 09:54:03 +000011841int
11842main ()
11843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011844struct tm tm;
11845 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011846 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011847 ;
11848 return 0;
11849}
11850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011851if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011852 ac_cv_struct_tm=time.h
11853else
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11859$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011860if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011861
Matthias Kloseb9621712010-04-24 17:59:49 +000011862$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011863
11864fi
11865
Matthias Kloseb9621712010-04-24 17:59:49 +000011866ac_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 +000011867#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011868
Matthias Kloseb9621712010-04-24 17:59:49 +000011869"
Victor Stinnere0be4232011-10-25 13:06:09 +020011870if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011871
11872cat >>confdefs.h <<_ACEOF
11873#define HAVE_STRUCT_TM_TM_ZONE 1
11874_ACEOF
11875
11876
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011877fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011878
Martin v. Löwis11437992002-04-12 09:54:03 +000011879if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11880
Matthias Kloseb9621712010-04-24 17:59:49 +000011881$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011882
11883else
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11885"
Victor Stinnere0be4232011-10-25 13:06:09 +020011886if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011890fi
11891
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011892cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011893#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011894_ACEOF
11895
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11897$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011898if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011900else
Matthias Kloseb9621712010-04-24 17:59:49 +000011901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011902/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011903#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011904#if !HAVE_DECL_TZNAME
11905extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011906#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011907
Martin v. Löwis11437992002-04-12 09:54:03 +000011908int
11909main ()
11910{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011911return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011912 ;
11913 return 0;
11914}
11915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011916if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011917 ac_cv_var_tzname=yes
11918else
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011921rm -f core conftest.err conftest.$ac_objext \
11922 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011923fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11925$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011926 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011927
Matthias Kloseb9621712010-04-24 17:59:49 +000011928$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011929
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011930 fi
11931fi
11932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933ac_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 +020011934if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011935
11936cat >>confdefs.h <<_ACEOF
11937#define HAVE_STRUCT_STAT_ST_RDEV 1
11938_ACEOF
11939
11940
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011941fi
11942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943ac_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 +020011944if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011945
Martin v. Löwis11437992002-04-12 09:54:03 +000011946cat >>confdefs.h <<_ACEOF
11947#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11948_ACEOF
11949
11950
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011951fi
11952
Matthias Kloseb9621712010-04-24 17:59:49 +000011953ac_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 +020011954if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011955
11956cat >>confdefs.h <<_ACEOF
11957#define HAVE_STRUCT_STAT_ST_FLAGS 1
11958_ACEOF
11959
11960
11961fi
11962
Matthias Kloseb9621712010-04-24 17:59:49 +000011963ac_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 +020011964if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011965
11966cat >>confdefs.h <<_ACEOF
11967#define HAVE_STRUCT_STAT_ST_GEN 1
11968_ACEOF
11969
11970
11971fi
11972
Matthias Kloseb9621712010-04-24 17:59:49 +000011973ac_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 +020011974if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011975
11976cat >>confdefs.h <<_ACEOF
11977#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11978_ACEOF
11979
11980
11981fi
11982
Matthias Kloseb9621712010-04-24 17:59:49 +000011983ac_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 +020011984if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011985
Martin v. Löwis11437992002-04-12 09:54:03 +000011986cat >>confdefs.h <<_ACEOF
11987#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11988_ACEOF
11989
11990
Matthias Kloseb9621712010-04-24 17:59:49 +000011991$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011992
11993else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011994 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011995 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011996 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11997 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011998esac
11999
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012000fi
12001
Michael W. Hudson54241132001-12-07 15:38:26 +000012002
Martin v. Löwis11437992002-04-12 09:54:03 +000012003
Matthias Kloseb9621712010-04-24 17:59:49 +000012004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12005$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012006if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012008else
Matthias Kloseb159a552010-04-25 21:00:44 +000012009
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012011/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012012#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012013int
12014main ()
12015{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012016return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012017 ;
12018 return 0;
12019}
12020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012021if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012022 ac_cv_header_time_altzone=yes
12023else
Matthias Kloseb9621712010-04-24 17:59:49 +000012024 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012028fi
12029
Matthias Kloseb9621712010-04-24 17:59:49 +000012030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12031$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012032if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012033
Matthias Kloseb9621712010-04-24 17:59:49 +000012034$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012035
12036fi
12037
Guido van Rossumda88dad1995-01-26 00:46:29 +000012038was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12040$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012042/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012043
12044#include <sys/types.h>
12045#include <sys/select.h>
12046#include <sys/time.h>
12047
Martin v. Löwis11437992002-04-12 09:54:03 +000012048int
12049main ()
12050{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012051;
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 ;
12053 return 0;
12054}
12055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012056if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012057
12058
Matthias Kloseb9621712010-04-24 17:59:49 +000012059$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012060
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012061 was_it_defined=yes
12062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12066$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067
Matthias Kloseb9621712010-04-24 17:59:49 +000012068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12069$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012070if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012072else
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012074/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012075#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012076int
12077main ()
12078{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012079struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012080 ;
12081 return 0;
12082}
12083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012084if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012085 ac_cv_struct_addrinfo=yes
12086else
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12090fi
12091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12093$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012094if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012095
Matthias Kloseb9621712010-04-24 17:59:49 +000012096$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012097
12098fi
12099
Matthias Kloseb9621712010-04-24 17:59:49 +000012100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12101$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012102if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012103 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012104else
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012106/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012107
12108# include <sys/types.h>
12109# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012110int
12111main ()
12112{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012113struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012114 ;
12115 return 0;
12116}
12117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012118if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012119 ac_cv_struct_sockaddr_storage=yes
12120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12124fi
12125
Matthias Kloseb9621712010-04-24 17:59:49 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12127$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012128if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012129
Matthias Kloseb9621712010-04-24 17:59:49 +000012130$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012131
12132fi
12133
Guido van Rossum627b2d71993-12-24 10:39:16 +000012134# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012135
Matthias Kloseb9621712010-04-24 17:59:49 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12137$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012138if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012140else
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012143$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012144int
12145main ()
12146{
12147static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012148test_array [0] = 0;
12149return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012150
12151 ;
12152 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012153}
Martin v. Löwis11437992002-04-12 09:54:03 +000012154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012155if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012156 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012157else
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12163$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012164if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166
12167fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012168
Matthias Kloseb9621712010-04-24 17:59:49 +000012169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12170$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012171if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012173else
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012175/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012176
Martin v. Löwis11437992002-04-12 09:54:03 +000012177int
12178main ()
12179{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012180
Martin v. Löwis11437992002-04-12 09:54:03 +000012181#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012182 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012183 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012184 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012185 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012186 char const *const *pcpcc;
12187 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012188 /* NEC SVR4.0.2 mips cc rejects this. */
12189 struct point {int x, y;};
12190 static struct point const zero = {0,0};
12191 /* AIX XL C 1.02.0.0 rejects this.
12192 It does not let you subtract one const X* pointer from another in
12193 an arm of an if-expression whose if-part is not a constant
12194 expression */
12195 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012197 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198 ++pcpcc;
12199 ppc = (char**) pcpcc;
12200 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012201 { /* SCO 3.2v4 cc rejects this sort of thing. */
12202 char tx;
12203 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012205
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012207 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 }
12209 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12210 int x[] = {25, 17};
12211 const int *foo = &x[0];
12212 ++foo;
12213 }
12214 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12215 typedef const int *iptr;
12216 iptr p = 0;
12217 ++p;
12218 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012219 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012221 struct s { int j; const int *ap[3]; } bx;
12222 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 }
12224 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12225 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012226 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012228 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012229#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012230
Martin v. Löwis11437992002-04-12 09:54:03 +000012231 ;
12232 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012233}
Martin v. Löwis11437992002-04-12 09:54:03 +000012234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012235if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012236 ac_cv_c_const=yes
12237else
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12243$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012244if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012245
Matthias Kloseb9621712010-04-24 17:59:49 +000012246$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012247
12248fi
12249
Michael W. Hudson54241132001-12-07 15:38:26 +000012250
Guido van Rossumda88dad1995-01-26 00:46:29 +000012251works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12253$as_echo_n "checking for working volatile... " >&6; }
12254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012255/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012256
Martin v. Löwis11437992002-04-12 09:54:03 +000012257int
12258main ()
12259{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012260volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 ;
12262 return 0;
12263}
12264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012265if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012266 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012267else
Skip Montanaro6dead952003-09-25 14:50:04 +000012268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012270
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012271
Guido van Rossum627b2d71993-12-24 10:39:16 +000012272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12275$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012276
Guido van Rossumda88dad1995-01-26 00:46:29 +000012277works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12279$as_echo_n "checking for working signed char... " >&6; }
12280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012281/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012282
Martin v. Löwis11437992002-04-12 09:54:03 +000012283int
12284main ()
12285{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012286signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012287 ;
12288 return 0;
12289}
12290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012291if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012292 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012293else
Skip Montanaro6dead952003-09-25 14:50:04 +000012294
Matthias Kloseb9621712010-04-24 17:59:49 +000012295$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012296
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012297
Guido van Rossum7f43da71994-08-01 12:15:30 +000012298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12301$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012302
Guido van Rossumda88dad1995-01-26 00:46:29 +000012303have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12305$as_echo_n "checking for prototypes... " >&6; }
12306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012307/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012308int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012309int
12310main ()
12311{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012312return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012313 ;
12314 return 0;
12315}
12316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012317if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012318
Matthias Kloseb9621712010-04-24 17:59:49 +000012319$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012320
Matthias Kloseb159a552010-04-25 21:00:44 +000012321 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12325$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012326
Guido van Rossumda88dad1995-01-26 00:46:29 +000012327works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12329$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012331/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012332
12333#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012334int foo(int x, ...) {
12335 va_list va;
12336 va_start(va, x);
12337 va_arg(va, int);
12338 va_arg(va, char *);
12339 va_arg(va, double);
12340 return 0;
12341}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012342
Martin v. Löwis11437992002-04-12 09:54:03 +000012343int
12344main ()
12345{
Guido van Rossum90eea071996-08-30 20:58:57 +000012346return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012347 ;
12348 return 0;
12349}
12350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012352
12353
Matthias Kloseb9621712010-04-24 17:59:49 +000012354$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012355
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012356 works=yes
12357
Guido van Rossum627b2d71993-12-24 10:39:16 +000012358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12361$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012362
Martin v. Löwisd6320502004-08-12 13:45:08 +000012363# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12365$as_echo_n "checking for socketpair... " >&6; }
12366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012367/* end confdefs.h. */
12368
12369#include <sys/types.h>
12370#include <sys/socket.h>
12371
12372int
12373main ()
12374{
12375void *x=socketpair
12376 ;
12377 return 0;
12378}
12379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012381
Matthias Kloseb9621712010-04-24 17:59:49 +000012382$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012383
Matthias Kloseb159a552010-04-25 21:00:44 +000012384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012385$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012386else
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12388$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012389
12390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012392
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012393# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12395$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012397/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012398#include <sys/types.h>
12399#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012400int
12401main ()
12402{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012403struct sockaddr x;
12404x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012405 ;
12406 return 0;
12407}
12408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012409if ac_fn_c_try_compile "$LINENO"; then :
12410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12411$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012412
Matthias Kloseb9621712010-04-24 17:59:49 +000012413$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012414
12415else
Matthias Kloseb9621712010-04-24 17:59:49 +000012416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12417$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012418
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012421
Guido van Rossumda88dad1995-01-26 00:46:29 +000012422va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12424$as_echo_n "checking whether va_list is an array... " >&6; }
12425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012426/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012427
12428#ifdef HAVE_STDARG_PROTOTYPES
12429#include <stdarg.h>
12430#else
12431#include <varargs.h>
12432#endif
12433
Martin v. Löwis11437992002-04-12 09:54:03 +000012434int
12435main ()
12436{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012437va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012438 ;
12439 return 0;
12440}
12441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012442if ac_fn_c_try_compile "$LINENO"; then :
12443
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012444else
Skip Montanaro6dead952003-09-25 14:50:04 +000012445
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
Matthias Kloseb9621712010-04-24 17:59:49 +000012447$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012448
Guido van Rossumda88dad1995-01-26 00:46:29 +000012449 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012450
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12454$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012455
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012456# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012457
12458
Matthias Kloseb9621712010-04-24 17:59:49 +000012459ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012460if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012461
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012463
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12465$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012466 OLD_CFLAGS=$CFLAGS
12467 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012469/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012470
12471# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
Martin v. Löwis11437992002-04-12 09:54:03 +000012473int
12474main ()
12475{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012476
12477 char *name;
12478 struct hostent *he, *res;
12479 char buffer[2048];
12480 int buflen = 2048;
12481 int h_errnop;
12482
12483 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
12485 ;
12486 return 0;
12487}
12488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012490
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012492
Martin v. Löwis11437992002-04-12 09:54:03 +000012493
Matthias Kloseb9621712010-04-24 17:59:49 +000012494$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012495
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12497$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012499else
Skip Montanaro6dead952003-09-25 14:50:04 +000012500
Matthias Kloseb9621712010-04-24 17:59:49 +000012501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12502$as_echo "no" >&6; }
12503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12504$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012506/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012507
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012508# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012509
Martin v. Löwis11437992002-04-12 09:54:03 +000012510int
12511main ()
12512{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012513
12514 char *name;
12515 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012516 char buffer[2048];
12517 int buflen = 2048;
12518 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012519
Matthias Kloseb159a552010-04-25 21:00:44 +000012520 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
12522 ;
12523 return 0;
12524}
12525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012526if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012527
Matthias Kloseb9621712010-04-24 17:59:49 +000012528 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012529
Martin v. Löwis11437992002-04-12 09:54:03 +000012530
Matthias Kloseb159a552010-04-25 21:00:44 +000012531$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012532
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12534$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012535
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012536else
Skip Montanaro6dead952003-09-25 14:50:04 +000012537
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12539$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12541$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12543/* end confdefs.h. */
12544
12545# include <netdb.h>
12546
12547int
12548main ()
12549{
12550
12551 char *name;
12552 struct hostent *he;
12553 struct hostent_data data;
12554
12555 (void) gethostbyname_r(name, he, &data);
12556
12557 ;
12558 return 0;
12559}
12560_ACEOF
12561if ac_fn_c_try_compile "$LINENO"; then :
12562
12563 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12564
12565
12566$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12567
12568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12569$as_echo "yes" >&6; }
12570
12571else
12572
12573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12574$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012575
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012578
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012581
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012584 CFLAGS=$OLD_CFLAGS
12585
12586else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012587
Matthias Kloseb9621712010-04-24 17:59:49 +000012588 for ac_func in gethostbyname
12589do :
12590 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012591if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012592 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012593#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012594_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012595
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012596fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012597done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012598
Michael W. Hudson54241132001-12-07 15:38:26 +000012599
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012600fi
12601
Michael W. Hudson54241132001-12-07 15:38:26 +000012602
12603
12604
12605
12606
12607
Guido van Rossum627b2d71993-12-24 10:39:16 +000012608# checks for system services
12609# (none yet)
12610
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012611# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012612ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012613if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012614
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012615else
Matthias Kloseb9621712010-04-24 17:59:49 +000012616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12617$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012618if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012619 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012620else
Martin v. Löwis11437992002-04-12 09:54:03 +000012621 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012622LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012626/* Override any GCC internal prototype to avoid an error.
12627 Use char because int might match the return type of a GCC
12628 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012629#ifdef __cplusplus
12630extern "C"
12631#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012632char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012633int
12634main ()
12635{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012636return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012637 ;
12638 return 0;
12639}
12640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012641if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012642 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012643else
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012646rm -f core conftest.err conftest.$ac_objext \
12647 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012648LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12651$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012652if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012653 cat >>confdefs.h <<_ACEOF
12654#define HAVE_LIBIEEE 1
12655_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012656
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012657 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012658
Guido van Rossum627b2d71993-12-24 10:39:16 +000012659fi
12660
Michael W. Hudson54241132001-12-07 15:38:26 +000012661
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012662fi
12663
Michael W. Hudson54241132001-12-07 15:38:26 +000012664
Guido van Rossum7f253911997-05-09 02:42:48 +000012665# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12667$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012669# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012670if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012672if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012673then
12674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012676
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12678$as_echo "yes" >&6; }
12679else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12680$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012681fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012682else
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12684$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685fi
12686
Guido van Rossum7f253911997-05-09 02:42:48 +000012687
Guido van Rossum7f43da71994-08-01 12:15:30 +000012688# check for --with-libm=...
12689
Guido van Rossum563e7081996-09-10 18:20:48 +000012690case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012691Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012692*) LIBM=-lm
12693esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12695$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012697# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012698if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012700if test "$withval" = no
12701then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12703$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012704elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012705then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12707$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012708else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012709fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012710else
Matthias Kloseb9621712010-04-24 17:59:49 +000012711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12712$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012713fi
12714
Guido van Rossum7f43da71994-08-01 12:15:30 +000012715
12716# check for --with-libc=...
12717
Matthias Kloseb9621712010-04-24 17:59:49 +000012718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12719$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012722if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012723 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012724if test "$withval" = no
12725then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12727$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012728elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012729then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12731$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012732else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012733fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012734else
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12736$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737fi
12738
Guido van Rossum7f43da71994-08-01 12:15:30 +000012739
Stefan Krah1919b7e2012-03-21 18:25:23 +010012740# **************************************
12741# * Check for gcc x64 inline assembler *
12742# **************************************
12743
12744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12745$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12747/* end confdefs.h. */
12748
12749int
12750main ()
12751{
12752
12753 __asm__ __volatile__ ("movq %rcx, %rax");
12754
12755 ;
12756 return 0;
12757}
12758_ACEOF
12759if ac_fn_c_try_compile "$LINENO"; then :
12760 have_gcc_asm_for_x64=yes
12761else
12762 have_gcc_asm_for_x64=no
12763fi
12764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12766$as_echo "$have_gcc_asm_for_x64" >&6; }
12767if test "$have_gcc_asm_for_x64" = yes
12768then
12769
12770$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12771
12772fi
12773
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012774# **************************************************
12775# * Check for various properties of floating point *
12776# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012777
Matthias Kloseb9621712010-04-24 17:59:49 +000012778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12779$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012780if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012782else
12783
Matthias Kloseb9621712010-04-24 17:59:49 +000012784if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012785 ac_cv_little_endian_double=no
12786else
Matthias Kloseb9621712010-04-24 17:59:49 +000012787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012788/* end confdefs.h. */
12789
12790#include <string.h>
12791int main() {
12792 double x = 9006104071832581.0;
12793 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12794 return 0;
12795 else
12796 return 1;
12797}
12798
12799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012800if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012801 ac_cv_little_endian_double=yes
12802else
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12806 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012807fi
12808
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012809fi
12810
Matthias Kloseb9621712010-04-24 17:59:49 +000012811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12812$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012813if test "$ac_cv_little_endian_double" = yes
12814then
12815
Matthias Kloseb9621712010-04-24 17:59:49 +000012816$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012817
12818fi
12819
Matthias Kloseb9621712010-04-24 17:59:49 +000012820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12821$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012822if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012823 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012824else
12825
Matthias Kloseb9621712010-04-24 17:59:49 +000012826if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012827 ac_cv_big_endian_double=no
12828else
Matthias Kloseb9621712010-04-24 17:59:49 +000012829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012830/* end confdefs.h. */
12831
12832#include <string.h>
12833int main() {
12834 double x = 9006104071832581.0;
12835 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12836 return 0;
12837 else
12838 return 1;
12839}
12840
12841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012842if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012843 ac_cv_big_endian_double=yes
12844else
Matthias Kloseb9621712010-04-24 17:59:49 +000012845 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12848 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012849fi
12850
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012851fi
12852
Matthias Kloseb9621712010-04-24 17:59:49 +000012853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12854$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012855if test "$ac_cv_big_endian_double" = yes
12856then
12857
Matthias Kloseb9621712010-04-24 17:59:49 +000012858$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012859
12860fi
12861
12862# Some ARM platforms use a mixed-endian representation for doubles.
12863# While Python doesn't currently have full support for these platforms
12864# (see e.g., issue 1762561), we can at least make sure that float <-> string
12865# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12867$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012868if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012870else
12871
Matthias Kloseb9621712010-04-24 17:59:49 +000012872if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012873 ac_cv_mixed_endian_double=no
12874else
Matthias Kloseb9621712010-04-24 17:59:49 +000012875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012876/* end confdefs.h. */
12877
12878#include <string.h>
12879int main() {
12880 double x = 9006104071832581.0;
12881 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12882 return 0;
12883 else
12884 return 1;
12885}
12886
12887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012888if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012889 ac_cv_mixed_endian_double=yes
12890else
Matthias Kloseb9621712010-04-24 17:59:49 +000012891 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12894 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012895fi
12896
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012897fi
12898
Matthias Kloseb9621712010-04-24 17:59:49 +000012899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12900$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012901if test "$ac_cv_mixed_endian_double" = yes
12902then
12903
Matthias Kloseb9621712010-04-24 17:59:49 +000012904$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012905
12906fi
12907
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012908# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012909# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012910# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012911# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012912# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012913# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012914
12915# This inline assembler syntax may also work for suncc and icc,
12916# so we try it on all platforms.
12917
Matthias Kloseb9621712010-04-24 17:59:49 +000012918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12919$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012921/* end confdefs.h. */
12922
12923int
12924main ()
12925{
12926
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012927 unsigned short cw;
12928 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12929 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012930
12931 ;
12932 return 0;
12933}
12934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012935if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012936 have_gcc_asm_for_x87=yes
12937else
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012939fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12942$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012943if test "$have_gcc_asm_for_x87" = yes
12944then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012945
Matthias Kloseb9621712010-04-24 17:59:49 +000012946$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012947
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012948fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012949
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012950# Detect whether system arithmetic is subject to x87-style double
12951# rounding issues. The result of this test has little meaning on non
12952# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12953# mode is round-to-nearest and double rounding issues are present, and
12954# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12956$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012957# $BASECFLAGS may affect the result
12958ac_save_cc="$CC"
12959CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012960if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012961 ac_cv_x87_double_rounding=no
12962else
Matthias Kloseb9621712010-04-24 17:59:49 +000012963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012964/* end confdefs.h. */
12965
12966#include <stdlib.h>
12967#include <math.h>
12968int main() {
12969 volatile double x, y, z;
12970 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12971 x = 0.99999999999999989; /* 1-2**-53 */
12972 y = 1./x;
12973 if (y != 1.)
12974 exit(0);
12975 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12976 x = 1e16;
12977 y = 2.99999;
12978 z = x + y;
12979 if (z != 1e16+4.)
12980 exit(0);
12981 /* both tests show evidence of double rounding */
12982 exit(1);
12983}
12984
12985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012986if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012987 ac_cv_x87_double_rounding=no
12988else
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012991rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12992 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012993fi
12994
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012995CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12997$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012998if test "$ac_cv_x87_double_rounding" = yes
12999then
13000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013002
13003fi
13004
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013005# ************************************
13006# * Check for mathematical functions *
13007# ************************************
13008
13009LIBS_SAVE=$LIBS
13010LIBS="$LIBS $LIBM"
13011
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013012for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13013do :
13014 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13015ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013016if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013017 cat >>confdefs.h <<_ACEOF
13018#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13019_ACEOF
13020
13021fi
13022done
13023
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013024for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013025do :
13026 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13027ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013028if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013029 cat >>confdefs.h <<_ACEOF
13030#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13031_ACEOF
13032
13033fi
13034done
13035
13036ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13037"
Victor Stinnere0be4232011-10-25 13:06:09 +020013038if test "x$ac_cv_have_decl_isinf" = 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_ISINF $ac_have_decl
13046_ACEOF
13047ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13048"
Victor Stinnere0be4232011-10-25 13:06:09 +020013049if test "x$ac_cv_have_decl_isnan" = 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_ISNAN $ac_have_decl
13057_ACEOF
13058ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13059"
Victor Stinnere0be4232011-10-25 13:06:09 +020013060if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013061 ac_have_decl=1
13062else
13063 ac_have_decl=0
13064fi
13065
13066cat >>confdefs.h <<_ACEOF
13067#define HAVE_DECL_ISFINITE $ac_have_decl
13068_ACEOF
13069
13070
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013071# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13072# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13074$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013075if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013077else
13078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013080 ac_cv_tanh_preserves_zero_sign=no
13081else
Matthias Kloseb9621712010-04-24 17:59:49 +000013082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013083/* end confdefs.h. */
13084
13085#include <math.h>
13086#include <stdlib.h>
13087int main() {
13088 /* return 0 if either negative zeros don't exist
13089 on this platform or if negative zeros exist
13090 and tanh(-0.) == -0. */
13091 if (atan2(0., -1.) == atan2(-0., -1.) ||
13092 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13093 else exit(1);
13094}
13095
13096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013097if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013098 ac_cv_tanh_preserves_zero_sign=yes
13099else
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13103 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013104fi
13105
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013106fi
13107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13109$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013110if test "$ac_cv_tanh_preserves_zero_sign" = yes
13111then
13112
Matthias Kloseb9621712010-04-24 17:59:49 +000013113$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013114
13115fi
13116
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013117if test "$ac_cv_func_log1p" = yes
13118then
13119 # On some versions of AIX, log1p(-0.) returns 0. instead of
13120 # -0. See issue #9920.
13121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13122$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013123 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013124 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013125else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013126
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013127 if test "$cross_compiling" = yes; then :
13128 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013129else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13131/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013132
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013133 #include <math.h>
13134 #include <stdlib.h>
13135 int main() {
13136 /* Fail if the signs of log1p(-0.) and -0. can be
13137 distinguished. */
13138 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13139 return 0;
13140 else
13141 return 1;
13142 }
13143
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013144_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013145if ac_fn_c_try_run "$LINENO"; then :
13146 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013147else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013148 ac_cv_log1p_drops_zero_sign=yes
13149fi
13150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13151 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013152fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013153
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013154fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013155
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13157$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13158fi
13159if test "$ac_cv_log1p_drops_zero_sign" = yes
13160then
13161
13162$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13163
13164fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013165
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013166LIBS=$LIBS_SAVE
13167
Mark Dickinsona614f042009-11-28 12:48:43 +000013168# For multiprocessing module, check that sem_open
13169# actually works. For FreeBSD versions <= 7.2,
13170# the kernel module that provides POSIX semaphores
13171# isn't loaded by default, so an attempt to call
13172# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13174$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013175if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013177else
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013179 ac_cv_posix_semaphores_enabled=yes
13180else
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013182/* end confdefs.h. */
13183
13184#include <unistd.h>
13185#include <fcntl.h>
13186#include <stdio.h>
13187#include <semaphore.h>
13188#include <sys/stat.h>
13189
13190int main(void) {
13191 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13192 if (a == SEM_FAILED) {
13193 perror("sem_open");
13194 return 1;
13195 }
13196 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013197 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013198 return 0;
13199}
13200
13201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013202if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013203 ac_cv_posix_semaphores_enabled=yes
13204else
Matthias Kloseb9621712010-04-24 17:59:49 +000013205 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13208 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013209fi
13210
13211
Mark Dickinsona614f042009-11-28 12:48:43 +000013212fi
13213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13215$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013216if test $ac_cv_posix_semaphores_enabled = no
13217then
13218
Matthias Kloseb9621712010-04-24 17:59:49 +000013219$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013220
13221fi
13222
Mark Dickinson10683072009-04-18 21:18:19 +000013223# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13225$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013226if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013227 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013228else
Matthias Kloseb9621712010-04-24 17:59:49 +000013229 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013230 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013231else
Matthias Kloseb9621712010-04-24 17:59:49 +000013232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013233/* end confdefs.h. */
13234
13235#include <unistd.h>
13236#include <fcntl.h>
13237#include <stdio.h>
13238#include <semaphore.h>
13239#include <sys/stat.h>
13240
13241int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013242 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013243 int count;
13244 int res;
13245 if(a==SEM_FAILED){
13246 perror("sem_open");
13247 return 1;
13248
13249 }
13250 res = sem_getvalue(a, &count);
13251 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013252 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013253 return res==-1 ? 1 : 0;
13254}
13255
Mark Dickinson10683072009-04-18 21:18:19 +000013256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013257if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013258 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013259else
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013264fi
13265
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013267fi
13268
Matthias Kloseb9621712010-04-24 17:59:49 +000013269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13270$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013271if test $ac_cv_broken_sem_getvalue = yes
13272then
13273
Matthias Kloseb9621712010-04-24 17:59:49 +000013274$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013275
13276fi
13277
Mark Dickinsonbd792642009-03-18 20:06:12 +000013278# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13280$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013281# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013282if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013283 enableval=$enable_big_digits; case $enable_big_digits in
13284yes)
13285 enable_big_digits=30 ;;
13286no)
13287 enable_big_digits=15 ;;
1328815|30)
13289 ;;
13290*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013291 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 +000013292esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13294$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013295
13296cat >>confdefs.h <<_ACEOF
13297#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13298_ACEOF
13299
13300
13301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13303$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013304fi
13305
13306
Guido van Rossumef2255b2000-03-10 22:30:29 +000013307# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013308ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013309if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013310
13311
Matthias Kloseb9621712010-04-24 17:59:49 +000013312$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013313
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013314 wchar_h="yes"
13315
Guido van Rossumef2255b2000-03-10 22:30:29 +000013316else
Martin v. Löwis11437992002-04-12 09:54:03 +000013317 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013318
13319fi
13320
Michael W. Hudson54241132001-12-07 15:38:26 +000013321
Martin v. Löwis11437992002-04-12 09:54:03 +000013322
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013323# determine wchar_t size
13324if test "$wchar_h" = yes
13325then
Matthias Kloseb9621712010-04-24 17:59:49 +000013326 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013327# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13328# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13329# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13331$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013332if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013334else
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13336"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013337
Martin v. Löwis11437992002-04-12 09:54:03 +000013338else
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 if test "$ac_cv_type_wchar_t" = yes; then
13340 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13341$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013342as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013343See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013344 else
13345 ac_cv_sizeof_wchar_t=0
13346 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013348
Martin v. Löwis11437992002-04-12 09:54:03 +000013349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13351$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352
13353
13354
Martin v. Löwis11437992002-04-12 09:54:03 +000013355cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013356#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013357_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013358
Michael W. Hudson54241132001-12-07 15:38:26 +000013359
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013360fi
13361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13363$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013364have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013365cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013366/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013367
13368#include <tcl.h>
13369#if TCL_UTF_MAX != 6
13370# error "NOT UCS4_TCL"
13371#endif
13372int
13373main ()
13374{
13375
13376 ;
13377 return 0;
13378}
13379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013381
13382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013384
13385 have_ucs4_tcl=yes
13386
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13390$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013391
Skip Montanaro6dead952003-09-25 14:50:04 +000013392# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013393if test "$wchar_h" = yes
13394then
13395 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13397$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013398 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013400else
13401
Matthias Kloseb9621712010-04-24 17:59:49 +000013402 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013403 ac_cv_wchar_t_signed=yes
13404else
Matthias Kloseb9621712010-04-24 17:59:49 +000013405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013406/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013407
13408 #include <wchar.h>
13409 int main()
13410 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013411 /* Success: exit code 0 */
13412 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013413 }
13414
13415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013416if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013417 ac_cv_wchar_t_signed=yes
13418else
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13422 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013423fi
13424
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013425fi
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13428$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013429fi
13430
Georg Brandl52d168a2008-01-07 18:10:24 +000013431# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013432if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013433 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013434then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013435 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013436
Matthias Kloseb9621712010-04-24 17:59:49 +000013437$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013438
Georg Brandl52d168a2008-01-07 18:10:24 +000013439else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013440 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013441fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13443$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013444
13445# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13447$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013448if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013450else
Matthias Kloseb9621712010-04-24 17:59:49 +000013451 ac_cv_c_bigendian=unknown
13452 # See if we're dealing with a universal compiler.
13453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13454/* end confdefs.h. */
13455#ifndef __APPLE_CC__
13456 not a universal capable compiler
13457 #endif
13458 typedef int dummy;
13459
Skip Montanaro6dead952003-09-25 14:50:04 +000013460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013461if ac_fn_c_try_compile "$LINENO"; then :
13462
13463 # Check for potential -arch flags. It is not universal unless
13464 # there are at least two -arch flags with different values.
13465 ac_arch=
13466 ac_prev=
13467 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13468 if test -n "$ac_prev"; then
13469 case $ac_word in
13470 i?86 | x86_64 | ppc | ppc64)
13471 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13472 ac_arch=$ac_word
13473 else
13474 ac_cv_c_bigendian=universal
13475 break
13476 fi
13477 ;;
13478 esac
13479 ac_prev=
13480 elif test "x$ac_word" = "x-arch"; then
13481 ac_prev=arch
13482 fi
13483 done
13484fi
13485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13486 if test $ac_cv_c_bigendian = unknown; then
13487 # See if sys/param.h defines the BYTE_ORDER macro.
13488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013489/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013490#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013492
Martin v. Löwis11437992002-04-12 09:54:03 +000013493int
13494main ()
13495{
Matthias Kloseb9621712010-04-24 17:59:49 +000013496#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13497 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13498 && LITTLE_ENDIAN)
13499 bogus endian macros
13500 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013501
13502 ;
13503 return 0;
13504}
13505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013506if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013507 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013509/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013510#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013512
Martin v. Löwis11437992002-04-12 09:54:03 +000013513int
13514main ()
13515{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013516#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 not big endian
13518 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013519
13520 ;
13521 return 0;
13522}
13523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013524if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013525 ac_cv_c_bigendian=yes
13526else
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013530fi
13531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13532 fi
13533 if test $ac_cv_c_bigendian = unknown; then
13534 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013536/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013537#include <limits.h>
13538
Martin v. Löwis11437992002-04-12 09:54:03 +000013539int
13540main ()
13541{
Matthias Kloseb9621712010-04-24 17:59:49 +000013542#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13543 bogus endian macros
13544 #endif
13545
Martin v. Löwis11437992002-04-12 09:54:03 +000013546 ;
13547 return 0;
13548}
13549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013550if ac_fn_c_try_compile "$LINENO"; then :
13551 # It does; now see whether it defined to _BIG_ENDIAN or not.
13552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13553/* end confdefs.h. */
13554#include <limits.h>
13555
13556int
13557main ()
13558{
13559#ifndef _BIG_ENDIAN
13560 not big endian
13561 #endif
13562
13563 ;
13564 return 0;
13565}
13566_ACEOF
13567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013568 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013569else
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013571fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13573fi
13574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13575 fi
13576 if test $ac_cv_c_bigendian = unknown; then
13577 # Compile a test program.
13578 if test "$cross_compiling" = yes; then :
13579 # Try to guess by grepping values from an object file.
13580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13581/* end confdefs.h. */
13582short int ascii_mm[] =
13583 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13584 short int ascii_ii[] =
13585 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13586 int use_ascii (int i) {
13587 return ascii_mm[i] + ascii_ii[i];
13588 }
13589 short int ebcdic_ii[] =
13590 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13591 short int ebcdic_mm[] =
13592 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13593 int use_ebcdic (int i) {
13594 return ebcdic_mm[i] + ebcdic_ii[i];
13595 }
13596 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598int
13599main ()
13600{
13601return use_ascii (foo) == use_ebcdic (foo);
13602 ;
13603 return 0;
13604}
13605_ACEOF
13606if ac_fn_c_try_compile "$LINENO"; then :
13607 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13608 ac_cv_c_bigendian=yes
13609 fi
13610 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13611 if test "$ac_cv_c_bigendian" = unknown; then
13612 ac_cv_c_bigendian=no
13613 else
13614 # finding both strings is unlikely to happen, but who knows?
13615 ac_cv_c_bigendian=unknown
13616 fi
13617 fi
13618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013620else
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013622/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013623$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013624int
13625main ()
13626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 /* Are we little or big endian? From Harbison&Steele. */
13629 union
13630 {
13631 long int l;
13632 char c[sizeof (long int)];
13633 } u;
13634 u.l = 1;
13635 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013636
13637 ;
13638 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013639}
Martin v. Löwis11437992002-04-12 09:54:03 +000013640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013641if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013642 ac_cv_c_bigendian=no
13643else
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13653$as_echo "$ac_cv_c_bigendian" >&6; }
13654 case $ac_cv_c_bigendian in #(
13655 yes)
13656 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13657;; #(
13658 no)
13659 ;; #(
13660 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664 ;; #(
13665 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013666 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013667 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013669
Michael W. Hudson54241132001-12-07 15:38:26 +000013670
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013671# ABI version string for Python extension modules. This appears between the
13672# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13673# from the following attributes which affect the ABI of this Python build (in
13674# this order):
13675#
13676# * The Python implementation (always 'cpython-' for us)
13677# * The major and minor version numbers
13678# * --with-pydebug (adds a 'd')
13679# * --with-pymalloc (adds a 'm')
13680# * --with-wide-unicode (adds a 'u')
13681#
13682# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013683# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13684# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013685
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13687$as_echo_n "checking ABIFLAGS... " >&6; }
13688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13689$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13691$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013692SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13694$as_echo "$SOABI" >&6; }
13695
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13697$as_echo_n "checking LDVERSION... " >&6; }
13698LDVERSION='$(VERSION)$(ABIFLAGS)'
13699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13700$as_echo "$LDVERSION" >&6; }
13701
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013702# SO is the extension of shared libraries `(including the dot!)
13703# -- usually .so, .sl on HP-UX, .dll on Cygwin
13704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13705$as_echo_n "checking SO... " >&6; }
13706if test -z "$SO"
13707then
13708 case $ac_sys_system in
13709 hp*|HP*)
13710 case `uname -m` in
13711 ia64) SO=.so;;
13712 *) SO=.sl;;
13713 esac
13714 ;;
13715 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013716 Linux*|GNU*)
13717 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013718 *) SO=.so;;
13719 esac
13720else
13721 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013722 echo
13723 echo '====================================================================='
13724 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013725 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013726 echo '+ Do you really mean to change the extension for shared libraries? +'
13727 echo '+ Continuing in 10 seconds to let you to ponder. +'
13728 echo '+ +'
13729 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013730 sleep 10
13731fi
13732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13733$as_echo "$SO" >&6; }
13734
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013735# Check whether right shifting a negative integer extends the sign bit
13736# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13738$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013739if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013741else
Martin v. Löwis11437992002-04-12 09:54:03 +000013742
Matthias Kloseb9621712010-04-24 17:59:49 +000013743if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013744 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013745else
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013747/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013748
13749int main()
13750{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013751 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013752}
13753
Martin v. Löwis11437992002-04-12 09:54:03 +000013754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013755if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013756 ac_cv_rshift_extends_sign=yes
13757else
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013762fi
13763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764fi
13765
Matthias Kloseb9621712010-04-24 17:59:49 +000013766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13767$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013768if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013769then
Martin v. Löwis11437992002-04-12 09:54:03 +000013770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013772
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013773fi
13774
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013775# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13777$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013778if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013779 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013780else
Martin v. Löwis11437992002-04-12 09:54:03 +000013781
Matthias Kloseb9621712010-04-24 17:59:49 +000013782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013783/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013784#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013785int
13786main ()
13787{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013788
13789 FILE *f = fopen("/dev/null", "r");
13790 flockfile(f);
13791 getc_unlocked(f);
13792 funlockfile(f);
13793
Martin v. Löwis11437992002-04-12 09:54:03 +000013794 ;
13795 return 0;
13796}
13797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013798if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013799 ac_cv_have_getc_unlocked=yes
13800else
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 ac_cv_have_getc_unlocked=no
13802fi
13803rm -f core conftest.err conftest.$ac_objext \
13804 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013806
Matthias Kloseb9621712010-04-24 17:59:49 +000013807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13808$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013809if test "$ac_cv_have_getc_unlocked" = yes
13810then
Martin v. Löwis11437992002-04-12 09:54:03 +000013811
Matthias Kloseb9621712010-04-24 17:59:49 +000013812$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013813
13814fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013815
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013816# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013817# save the value of LIBS so we don't actually link Python with readline
13818LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013819
Gregory P. Smith18820942008-09-07 06:24:49 +000013820# On some systems we need to link readline to a termcap compatible
13821# library. NOTE: Keep the precedence of listed libraries synchronised
13822# with setup.py.
13823py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13825$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013826for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013827 if test -z "$py_libtermcap"; then
13828 READLINE_LIBS="-lreadline"
13829 else
13830 READLINE_LIBS="-lreadline -l$py_libtermcap"
13831 fi
13832 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013834/* end confdefs.h. */
13835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836/* Override any GCC internal prototype to avoid an error.
13837 Use char because int might match the return type of a GCC
13838 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013839#ifdef __cplusplus
13840extern "C"
13841#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013842char readline ();
13843int
13844main ()
13845{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013846return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013847 ;
13848 return 0;
13849}
13850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013851if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013852 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013854rm -f core conftest.err conftest.$ac_objext \
13855 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013856 if test $py_cv_lib_readline = yes; then
13857 break
13858 fi
13859done
13860# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13861#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013862if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13864$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013865else
Matthias Kloseb9621712010-04-24 17:59:49 +000013866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13867$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013870
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013871fi
13872
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013873# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13875$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013876if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013878else
13879 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013880LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013882/* end confdefs.h. */
13883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884/* Override any GCC internal prototype to avoid an error.
13885 Use char because int might match the return type of a GCC
13886 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013887#ifdef __cplusplus
13888extern "C"
13889#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013890char rl_callback_handler_install ();
13891int
13892main ()
13893{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013894return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013895 ;
13896 return 0;
13897}
13898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013899if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013900 ac_cv_lib_readline_rl_callback_handler_install=yes
13901else
Matthias Kloseb9621712010-04-24 17:59:49 +000013902 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013904rm -f core conftest.err conftest.$ac_objext \
13905 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013906LIBS=$ac_check_lib_save_LIBS
13907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13909$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013910if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013911
Matthias Kloseb9621712010-04-24 17:59:49 +000013912$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013913
13914fi
13915
13916
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013917# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013919/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013920#include <readline/readline.h>
13921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013922if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013923 have_readline=yes
13924else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013925 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013926
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013927fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013928rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013929if test $have_readline = yes
13930then
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013932/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013933#include <readline/readline.h>
13934
13935_ACEOF
13936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013940
13941fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013942rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013945/* end confdefs.h. */
13946#include <readline/readline.h>
13947
13948_ACEOF
13949if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013951
Matthias Kloseb9621712010-04-24 17:59:49 +000013952$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013953
13954fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013955rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013956
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013957fi
13958
Martin v. Löwis0daad592001-09-30 21:09:59 +000013959# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13961$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013962if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013964else
Martin v. Löwis11437992002-04-12 09:54:03 +000013965 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013966LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013970/* Override any GCC internal prototype to avoid an error.
13971 Use char because int might match the return type of a GCC
13972 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013973#ifdef __cplusplus
13974extern "C"
13975#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013976char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013977int
13978main ()
13979{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013981 ;
13982 return 0;
13983}
13984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013985if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013986 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013987else
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013990rm -f core conftest.err conftest.$ac_objext \
13991 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013992LIBS=$ac_check_lib_save_LIBS
13993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13995$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013996if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013997
Matthias Kloseb9621712010-04-24 17:59:49 +000013998$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013999
Martin v. Löwis0daad592001-09-30 21:09:59 +000014000fi
14001
Michael W. Hudson54241132001-12-07 15:38:26 +000014002
Thomas Wouters89d996e2007-09-08 17:39:28 +000014003# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14005$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014006if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014007 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014008else
14009 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014010LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014012/* end confdefs.h. */
14013
14014/* Override any GCC internal prototype to avoid an error.
14015 Use char because int might match the return type of a GCC
14016 builtin and then its argument prototype would still apply. */
14017#ifdef __cplusplus
14018extern "C"
14019#endif
14020char rl_completion_display_matches_hook ();
14021int
14022main ()
14023{
14024return rl_completion_display_matches_hook ();
14025 ;
14026 return 0;
14027}
14028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014029if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014030 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14031else
Matthias Kloseb9621712010-04-24 17:59:49 +000014032 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014034rm -f core conftest.err conftest.$ac_objext \
14035 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014036LIBS=$ac_check_lib_save_LIBS
14037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14039$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014040if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014041
Matthias Kloseb9621712010-04-24 17:59:49 +000014042$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014043
14044fi
14045
14046
Martin v. Löwis0daad592001-09-30 21:09:59 +000014047# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14049$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014050if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014051 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014052else
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014054LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014058/* Override any GCC internal prototype to avoid an error.
14059 Use char because int might match the return type of a GCC
14060 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014061#ifdef __cplusplus
14062extern "C"
14063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014064char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014065int
14066main ()
14067{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014068return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014069 ;
14070 return 0;
14071}
14072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014073if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014074 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014075else
Matthias Kloseb9621712010-04-24 17:59:49 +000014076 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014078rm -f core conftest.err conftest.$ac_objext \
14079 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014080LIBS=$ac_check_lib_save_LIBS
14081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14083$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014084if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014085
Matthias Kloseb9621712010-04-24 17:59:49 +000014086$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014087
Guido van Rossum353ae582001-07-10 16:45:32 +000014088fi
14089
Jack Jansendd19cf82001-12-06 22:36:17 +000014090
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014091# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014093/* end confdefs.h. */
14094#include <readline/readline.h>
14095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014096if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014097 have_readline=yes
14098else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014099 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014100
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014101fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014102rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014103if test $have_readline = yes
14104then
Matthias Kloseb9621712010-04-24 17:59:49 +000014105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014106/* end confdefs.h. */
14107#include <readline/readline.h>
14108
14109_ACEOF
14110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014112
Matthias Kloseb9621712010-04-24 17:59:49 +000014113$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014114
14115fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014116rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014117
14118fi
14119
Martin v. Löwis82bca632006-02-10 20:49:30 +000014120# End of readline checks: restore LIBS
14121LIBS=$LIBS_no_readline
14122
Matthias Kloseb9621712010-04-24 17:59:49 +000014123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14124$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014125if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014126 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014127else
Martin v. Löwis11437992002-04-12 09:54:03 +000014128
Matthias Kloseb9621712010-04-24 17:59:49 +000014129if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014130 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014131else
Matthias Kloseb9621712010-04-24 17:59:49 +000014132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014133/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014134
14135int main()
14136{
14137 int val1 = nice(1);
14138 if (val1 != -1 && val1 == nice(2))
14139 exit(0);
14140 exit(1);
14141}
14142
Martin v. Löwis11437992002-04-12 09:54:03 +000014143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014144if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014145 ac_cv_broken_nice=yes
14146else
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14150 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014151fi
14152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014153fi
14154
Matthias Kloseb9621712010-04-24 17:59:49 +000014155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14156$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014157if test "$ac_cv_broken_nice" = yes
14158then
Martin v. Löwis11437992002-04-12 09:54:03 +000014159
Matthias Kloseb9621712010-04-24 17:59:49 +000014160$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014161
14162fi
14163
Matthias Kloseb9621712010-04-24 17:59:49 +000014164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14165$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014166if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014168else
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014170 ac_cv_broken_poll=no
14171else
Matthias Kloseb9621712010-04-24 17:59:49 +000014172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014173/* end confdefs.h. */
14174
14175#include <poll.h>
14176
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014177int main()
14178{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014179 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014180 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014181
14182 close (42);
14183
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014185 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014186 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014187 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014188 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014189 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014190 return 1;
14191}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014192
14193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014194if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014195 ac_cv_broken_poll=yes
14196else
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14200 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014203fi
14204
Matthias Kloseb9621712010-04-24 17:59:49 +000014205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14206$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014207if test "$ac_cv_broken_poll" = yes
14208then
14209
Matthias Kloseb9621712010-04-24 17:59:49 +000014210$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014211
14212fi
14213
Brett Cannon43802422005-02-10 20:48:03 +000014214# 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 +000014215# (which is not required by ISO C or UNIX spec) and/or if we support
14216# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014217ac_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 +000014218#include <$ac_cv_struct_tm>
14219
Matthias Kloseb9621712010-04-24 17:59:49 +000014220"
Victor Stinnere0be4232011-10-25 13:06:09 +020014221if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014222
14223cat >>confdefs.h <<_ACEOF
14224#define HAVE_STRUCT_TM_TM_ZONE 1
14225_ACEOF
14226
14227
14228fi
14229
14230if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14231
Matthias Kloseb9621712010-04-24 17:59:49 +000014232$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014233
14234else
Matthias Kloseb9621712010-04-24 17:59:49 +000014235 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14236"
Victor Stinnere0be4232011-10-25 13:06:09 +020014237if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239else
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241fi
14242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014244#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245_ACEOF
14246
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14248$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014249if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251else
Matthias Kloseb9621712010-04-24 17:59:49 +000014252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014253/* end confdefs.h. */
14254#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255#if !HAVE_DECL_TZNAME
14256extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014257#endif
14258
14259int
14260main ()
14261{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014262return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014263 ;
14264 return 0;
14265}
14266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014267if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014268 ac_cv_var_tzname=yes
14269else
Matthias Kloseb9621712010-04-24 17:59:49 +000014270 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014272rm -f core conftest.err conftest.$ac_objext \
14273 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14276$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014277 if test $ac_cv_var_tzname = yes; then
14278
Matthias Kloseb9621712010-04-24 17:59:49 +000014279$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014280
14281 fi
14282fi
14283
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014284
Martin v. Löwis1d459062005-03-14 21:23:33 +000014285# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14287$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014288if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014290else
14291
Matthias Kloseb9621712010-04-24 17:59:49 +000014292if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014293 ac_cv_working_tzset=no
14294else
Matthias Kloseb9621712010-04-24 17:59:49 +000014295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014296/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014297
14298#include <stdlib.h>
14299#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014300#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014301
14302#if HAVE_TZNAME
14303extern char *tzname[];
14304#endif
14305
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014306int main()
14307{
Brett Cannon18367812003-09-19 00:59:16 +000014308 /* Note that we need to ensure that not only does tzset(3)
14309 do 'something' with localtime, but it works as documented
14310 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014311 This includes making sure that tzname is set properly if
14312 tm->tm_zone does not exist since it is the alternative way
14313 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014314
14315 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014316 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014317 */
14318
Martin v. Löwis1d459062005-03-14 21:23:33 +000014319 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014320 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14321
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014322 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014323 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014324 if (localtime(&groundhogday)->tm_hour != 0)
14325 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014326#if HAVE_TZNAME
14327 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14328 if (strcmp(tzname[0], "UTC") ||
14329 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14330 exit(1);
14331#endif
Brett Cannon18367812003-09-19 00:59:16 +000014332
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014333 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014334 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014335 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014336 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014337#if HAVE_TZNAME
14338 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14339 exit(1);
14340#endif
Brett Cannon18367812003-09-19 00:59:16 +000014341
14342 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14343 tzset();
14344 if (localtime(&groundhogday)->tm_hour != 11)
14345 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014346#if HAVE_TZNAME
14347 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14348 exit(1);
14349#endif
14350
14351#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014352 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14353 exit(1);
14354 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14355 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014356#endif
Brett Cannon18367812003-09-19 00:59:16 +000014357
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014358 exit(0);
14359}
14360
14361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014362if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014363 ac_cv_working_tzset=yes
14364else
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14368 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014369fi
14370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371fi
14372
Matthias Kloseb9621712010-04-24 17:59:49 +000014373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14374$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014375if test "$ac_cv_working_tzset" = yes
14376then
14377
Matthias Kloseb9621712010-04-24 17:59:49 +000014378$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014379
14380fi
14381
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014382# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14384$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014385if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014387else
Matthias Kloseb9621712010-04-24 17:59:49 +000014388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014389/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014390#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014391int
14392main ()
14393{
14394
14395struct stat st;
14396st.st_mtim.tv_nsec = 1;
14397
14398 ;
14399 return 0;
14400}
14401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014403 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014404else
Matthias Kloseb9621712010-04-24 17:59:49 +000014405 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14408fi
14409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14411$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014412if test "$ac_cv_stat_tv_nsec" = yes
14413then
14414
Matthias Kloseb9621712010-04-24 17:59:49 +000014415$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014416
14417fi
14418
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014419# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14421$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014422if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014424else
Matthias Kloseb9621712010-04-24 17:59:49 +000014425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014426/* end confdefs.h. */
14427#include <sys/stat.h>
14428int
14429main ()
14430{
14431
14432struct stat st;
14433st.st_mtimespec.tv_nsec = 1;
14434
14435 ;
14436 return 0;
14437}
14438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014440 ac_cv_stat_tv_nsec2=yes
14441else
Matthias Kloseb9621712010-04-24 17:59:49 +000014442 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14445fi
14446
Matthias Kloseb9621712010-04-24 17:59:49 +000014447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14448$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014449if test "$ac_cv_stat_tv_nsec2" = yes
14450then
14451
Matthias Kloseb9621712010-04-24 17:59:49 +000014452$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014453
14454fi
14455
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014456ac_save_cppflags="$CPPFLAGS"
14457CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014458# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14460$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014461if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014463else
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014465/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014466#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014467int
14468main ()
14469{
Jack Jansen666b1e72001-10-31 12:11:48 +000014470
14471 int rtn;
14472 rtn = mvwdelch(0,0,0);
14473
Martin v. Löwis11437992002-04-12 09:54:03 +000014474 ;
14475 return 0;
14476}
14477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014478if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014479 ac_cv_mvwdelch_is_expression=yes
14480else
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14484fi
14485
Matthias Kloseb9621712010-04-24 17:59:49 +000014486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14487$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014488
14489if test "$ac_cv_mvwdelch_is_expression" = yes
14490then
Martin v. Löwis11437992002-04-12 09:54:03 +000014491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014493
14494fi
14495
Matthias Kloseb9621712010-04-24 17:59:49 +000014496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14497$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014498if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014500else
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014502/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014503#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014504int
14505main ()
14506{
Jack Jansen666b1e72001-10-31 12:11:48 +000014507
14508 WINDOW *w;
14509 w->_flags = 0;
14510
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 ;
14512 return 0;
14513}
14514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014515if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014516 ac_cv_window_has_flags=yes
14517else
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14521fi
14522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14524$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014525
Jack Jansen666b1e72001-10-31 12:11:48 +000014526
14527if test "$ac_cv_window_has_flags" = yes
14528then
Martin v. Löwis11437992002-04-12 09:54:03 +000014529
Matthias Kloseb9621712010-04-24 17:59:49 +000014530$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014531
14532fi
14533
Matthias Kloseb9621712010-04-24 17:59:49 +000014534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14535$as_echo_n "checking for is_term_resized... " >&6; }
14536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014537/* end confdefs.h. */
14538#include <curses.h>
14539int
14540main ()
14541{
14542void *x=is_term_resized
14543 ;
14544 return 0;
14545}
14546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014547if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014548
Matthias Kloseb9621712010-04-24 17:59:49 +000014549$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014550
Matthias Kloseb159a552010-04-25 21:00:44 +000014551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014552$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014553else
Matthias Kloseb9621712010-04-24 17:59:49 +000014554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14555$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014556
14557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14559
Matthias Kloseb9621712010-04-24 17:59:49 +000014560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14561$as_echo_n "checking for resize_term... " >&6; }
14562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014563/* end confdefs.h. */
14564#include <curses.h>
14565int
14566main ()
14567{
14568void *x=resize_term
14569 ;
14570 return 0;
14571}
14572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014573if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014574
Matthias Kloseb9621712010-04-24 17:59:49 +000014575$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014576
Matthias Kloseb159a552010-04-25 21:00:44 +000014577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014578$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014579else
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14581$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014582
14583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14587$as_echo_n "checking for resizeterm... " >&6; }
14588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014589/* end confdefs.h. */
14590#include <curses.h>
14591int
14592main ()
14593{
14594void *x=resizeterm
14595 ;
14596 return 0;
14597}
14598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014599if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014600
Matthias Kloseb9621712010-04-24 17:59:49 +000014601$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014602
Matthias Kloseb159a552010-04-25 21:00:44 +000014603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014604$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014605else
Matthias Kloseb9621712010-04-24 17:59:49 +000014606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14607$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014608
14609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014611# last curses configure check
14612CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14615$as_echo "$as_me: checking for device files" >&6;}
14616
14617if test "x$cross_compiling" = xyes; then
14618 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14620$as_echo_n "checking for /dev/ptmx... " >&6; }
14621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14622$as_echo "not set" >&6; }
14623 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14624 fi
14625 if test "${ac_cv_file__dev_ptc+set}" != set; then
14626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14627$as_echo_n "checking for /dev/ptc... " >&6; }
14628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14629$as_echo "not set" >&6; }
14630 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14631 fi
14632fi
14633
Matthias Kloseb9621712010-04-24 17:59:49 +000014634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14635$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014636if ${ac_cv_file__dev_ptmx+:} false; then :
14637 $as_echo_n "(cached) " >&6
14638else
14639 test "$cross_compiling" = yes &&
14640 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14641if test -r "/dev/ptmx"; then
14642 ac_cv_file__dev_ptmx=yes
14643else
14644 ac_cv_file__dev_ptmx=no
14645fi
14646fi
14647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14648$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14649if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014650
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014651fi
14652
14653if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014654
Matthias Kloseb9621712010-04-24 17:59:49 +000014655$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014656
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14659$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014660if ${ac_cv_file__dev_ptc+:} false; then :
14661 $as_echo_n "(cached) " >&6
14662else
14663 test "$cross_compiling" = yes &&
14664 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14665if test -r "/dev/ptc"; then
14666 ac_cv_file__dev_ptc=yes
14667else
14668 ac_cv_file__dev_ptc=no
14669fi
14670fi
14671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14672$as_echo "$ac_cv_file__dev_ptc" >&6; }
14673if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014674
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014675fi
14676
14677if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014678
Matthias Kloseb9621712010-04-24 17:59:49 +000014679$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014680
Neal Norwitz865400f2003-03-21 01:42:58 +000014681fi
14682
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014683if test "$have_long_long" = yes
14684then
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14686$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014687 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014688 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014689else
Matthias Kloseb9621712010-04-24 17:59:49 +000014690 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014691 ac_cv_have_long_long_format="cross -- assuming no"
14692 if test x$GCC = xyes; then
14693 save_CFLAGS=$CFLAGS
14694 CFLAGS="$CFLAGS -Werror -Wformat"
14695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14696/* end confdefs.h. */
14697
14698 #include <stdio.h>
14699 #include <stddef.h>
14700
14701int
14702main ()
14703{
14704
14705 char *buffer;
14706 sprintf(buffer, "%lld", (long long)123);
14707 sprintf(buffer, "%lld", (long long)-123);
14708 sprintf(buffer, "%llu", (unsigned long long)123);
14709
14710 ;
14711 return 0;
14712}
14713_ACEOF
14714if ac_fn_c_try_compile "$LINENO"; then :
14715 ac_cv_have_long_long_format=yes
14716
14717fi
14718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14719 CFLAGS=$save_CFLAGS
14720 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014721else
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014723/* end confdefs.h. */
14724
14725 #include <stdio.h>
14726 #include <stddef.h>
14727 #include <string.h>
14728
14729 #ifdef HAVE_SYS_TYPES_H
14730 #include <sys/types.h>
14731 #endif
14732
14733 int main()
14734 {
14735 char buffer[256];
14736
14737 if (sprintf(buffer, "%lld", (long long)123) < 0)
14738 return 1;
14739 if (strcmp(buffer, "123"))
14740 return 1;
14741
14742 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14743 return 1;
14744 if (strcmp(buffer, "-123"))
14745 return 1;
14746
14747 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14748 return 1;
14749 if (strcmp(buffer, "123"))
14750 return 1;
14751
14752 return 0;
14753 }
14754
14755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014756if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014757 ac_cv_have_long_long_format=yes
14758else
Matthias Kloseb9621712010-04-24 17:59:49 +000014759 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14762 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014763fi
14764
14765
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014766fi
14767
Matthias Kloseb9621712010-04-24 17:59:49 +000014768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14769$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014770fi
14771
Mark Dickinson89d7d412009-12-31 20:50:59 +000014772if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014773then
14774
Matthias Kloseb9621712010-04-24 17:59:49 +000014775$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014776
14777fi
14778
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014779if test $ac_sys_system = Darwin
14780then
14781 LIBS="$LIBS -framework CoreFoundation"
14782fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014783
Matthias Kloseb9621712010-04-24 17:59:49 +000014784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14785$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014786if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014788else
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014790 ac_cv_have_size_t_format="cross -- assuming yes"
14791
Thomas Wouters477c8d52006-05-27 19:21:47 +000014792else
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014794/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014795
Thomas Wouters477c8d52006-05-27 19:21:47 +000014796#include <stdio.h>
14797#include <stddef.h>
14798#include <string.h>
14799
Christian Heimes2c181612007-12-17 20:04:13 +000014800#ifdef HAVE_SYS_TYPES_H
14801#include <sys/types.h>
14802#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014803
14804#ifdef HAVE_SSIZE_T
14805typedef ssize_t Py_ssize_t;
14806#elif SIZEOF_VOID_P == SIZEOF_LONG
14807typedef long Py_ssize_t;
14808#else
14809typedef int Py_ssize_t;
14810#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014811
Christian Heimes2c181612007-12-17 20:04:13 +000014812int main()
14813{
14814 char buffer[256];
14815
Thomas Wouters477c8d52006-05-27 19:21:47 +000014816 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14817 return 1;
14818
Thomas Wouters89f507f2006-12-13 04:49:30 +000014819 if (strcmp(buffer, "123"))
14820 return 1;
14821
14822 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14823 return 1;
14824
14825 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014826 return 1;
14827
14828 return 0;
14829}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014830
Thomas Wouters477c8d52006-05-27 19:21:47 +000014831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014832if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014833 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014834else
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14838 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014839fi
14840
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14843$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014844if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014847
14848fi
14849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014851#ifdef HAVE_SYS_TYPES_H
14852#include <sys/types.h>
14853#endif
14854#ifdef HAVE_SYS_SOCKET_H
14855#include <sys/socket.h>
14856#endif
14857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858"
Victor Stinnere0be4232011-10-25 13:06:09 +020014859if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014860
Martin v. Löwis11437992002-04-12 09:54:03 +000014861else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014862
Matthias Kloseb9621712010-04-24 17:59:49 +000014863$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014864
14865fi
14866
Michael W. Hudson54241132001-12-07 15:38:26 +000014867
Matthias Kloseb9621712010-04-24 17:59:49 +000014868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14869$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014870if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014872else
Matthias Kloseb9621712010-04-24 17:59:49 +000014873 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014874 ac_cv_broken_mbstowcs=no
14875else
Matthias Kloseb9621712010-04-24 17:59:49 +000014876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014877/* end confdefs.h. */
14878
Stefan Krah19c21392012-11-22 23:47:32 +010014879#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014880#include<stdlib.h>
14881int main() {
14882 size_t len = -1;
14883 const char *str = "text";
14884 len = mbstowcs(NULL, str, 0);
14885 return (len != 4);
14886}
14887
14888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014889if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014890 ac_cv_broken_mbstowcs=no
14891else
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014896fi
14897
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014898fi
14899
Matthias Kloseb9621712010-04-24 17:59:49 +000014900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14901$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014902if test "$ac_cv_broken_mbstowcs" = yes
14903then
14904
Matthias Kloseb9621712010-04-24 17:59:49 +000014905$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014906
14907fi
14908
Antoine Pitroub52ec782009-01-25 16:34:23 +000014909# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14911$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014912
14913# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014914if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014915 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014916if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014917then
14918
Matthias Kloseb9621712010-04-24 17:59:49 +000014919$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014920
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14922$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014923fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014924if test "$withval" = no
14925then
14926
14927$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14928
Matthias Kloseb9621712010-04-24 17:59:49 +000014929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14930$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014931fi
14932
Antoine Pitrou042b1282010-08-13 21:15:58 +000014933else
14934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14935$as_echo "no value specified" >&6; }
14936fi
14937
Antoine Pitroub52ec782009-01-25 16:34:23 +000014938
Matthias Kloseb17289e2012-03-15 19:51:34 +010014939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14940$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14941if ${ac_cv_computed_gotos+:} false; then :
14942 $as_echo_n "(cached) " >&6
14943else
14944 if test "$cross_compiling" = yes; then :
14945 if test "${with_computed_gotos+set}" = set; then
14946 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14947 else
14948 ac_cv_computed_gotos=no
14949 fi
14950else
14951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14952/* end confdefs.h. */
14953
14954int main(int argc, char **argv)
14955{
14956 static void *targets[1] = { &&LABEL1 };
14957 goto LABEL2;
14958LABEL1:
14959 return 0;
14960LABEL2:
14961 goto *targets[0];
14962 return 1;
14963}
14964
14965_ACEOF
14966if ac_fn_c_try_run "$LINENO"; then :
14967 ac_cv_computed_gotos=yes
14968else
14969 ac_cv_computed_gotos=no
14970fi
14971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14972 conftest.$ac_objext conftest.beam conftest.$ac_ext
14973fi
14974
14975fi
14976
14977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14978$as_echo "$ac_cv_computed_gotos" >&6; }
14979case "$ac_cv_computed_gotos" in yes*)
14980
14981$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14982
14983esac
14984
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014985case $ac_sys_system in
14986AIX*)
14987
14988$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14989 ;;
14990esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014991
Michael W. Hudson54241132001-12-07 15:38:26 +000014992
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014993
14994
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014995for h in `(cd $srcdir;echo Python/thread_*.h)`
14996do
14997 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14998done
14999
Michael W. Hudson54241132001-12-07 15:38:26 +000015000
Neal Norwitzd24499d2005-12-18 21:36:39 +000015001SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15003$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015004for dir in $SRCDIRS; do
15005 if test ! -d $dir; then
15006 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015007 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015008done
Matthias Kloseb9621712010-04-24 17:59:49 +000015009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15010$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015011
Stefan Krah1919b7e2012-03-21 18:25:23 +010015012# Availability of -O2:
15013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15014$as_echo_n "checking for -O2... " >&6; }
15015saved_cflags="$CFLAGS"
15016CFLAGS="-O2"
15017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15018/* end confdefs.h. */
15019
15020int
15021main ()
15022{
15023
15024
15025 ;
15026 return 0;
15027}
15028_ACEOF
15029if ac_fn_c_try_compile "$LINENO"; then :
15030 have_O2=yes
15031else
15032 have_O2=no
15033fi
15034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15036$as_echo "$have_O2" >&6; }
15037CFLAGS="$saved_cflags"
15038
15039# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15040# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15042$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15043saved_cflags="$CFLAGS"
15044CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15045if test "$have_O2" = no; then
15046 CFLAGS=""
15047fi
15048if test "$cross_compiling" = yes; then :
15049 have_glibc_memmove_bug=undefined
15050else
15051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15052/* end confdefs.h. */
15053
15054#include <stdio.h>
15055#include <stdlib.h>
15056#include <string.h>
15057void foo(void *p, void *q) { memmove(p, q, 19); }
15058int main() {
15059 char a[32] = "123456789000000000";
15060 foo(&a[9], a);
15061 if (strcmp(a, "123456789123456789000000000") != 0)
15062 return 1;
15063 foo(a, &a[9]);
15064 if (strcmp(a, "123456789000000000") != 0)
15065 return 1;
15066 return 0;
15067}
15068
15069_ACEOF
15070if ac_fn_c_try_run "$LINENO"; then :
15071 have_glibc_memmove_bug=no
15072else
15073 have_glibc_memmove_bug=yes
15074fi
15075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15076 conftest.$ac_objext conftest.beam conftest.$ac_ext
15077fi
15078
15079CFLAGS="$saved_cflags"
15080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15081$as_echo "$have_glibc_memmove_bug" >&6; }
15082if test "$have_glibc_memmove_bug" = yes; then
15083
15084$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15085
15086fi
15087
15088if test "$have_gcc_asm_for_x87" = yes; then
15089 # Some versions of gcc miscompile inline asm:
15090 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15091 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15092 case $CC in
15093 *gcc*)
15094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15095$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15096 saved_cflags="$CFLAGS"
15097 CFLAGS="-O2"
15098 if test "$cross_compiling" = yes; then :
15099 have_ipa_pure_const_bug=undefined
15100else
15101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15102/* end confdefs.h. */
15103
15104 __attribute__((noinline)) int
15105 foo(int *p) {
15106 int r;
15107 asm ( "movl \$6, (%1)\n\t"
15108 "xorl %0, %0\n\t"
15109 : "=r" (r) : "r" (p) : "memory"
15110 );
15111 return r;
15112 }
15113 int main() {
15114 int p = 8;
15115 if ((foo(&p) ? : p) != 6)
15116 return 1;
15117 return 0;
15118 }
15119
15120_ACEOF
15121if ac_fn_c_try_run "$LINENO"; then :
15122 have_ipa_pure_const_bug=no
15123else
15124 have_ipa_pure_const_bug=yes
15125fi
15126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15127 conftest.$ac_objext conftest.beam conftest.$ac_ext
15128fi
15129
15130 CFLAGS="$saved_cflags"
15131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15132$as_echo "$have_ipa_pure_const_bug" >&6; }
15133 if test "$have_ipa_pure_const_bug" = yes; then
15134
15135$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15136
15137 fi
15138 ;;
15139 esac
15140fi
15141
Guido van Rossum627b2d71993-12-24 10:39:16 +000015142# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015143ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015144
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015145ac_config_files="$ac_config_files Modules/ld_so_aix"
15146
Martin v. Löwis11437992002-04-12 09:54:03 +000015147cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015148# This file is a shell script that caches the results of configure
15149# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015150# scripts and configure runs, see configure's option --config-cache.
15151# It is not useful on other systems. If it contains results you don't
15152# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015153#
Martin v. Löwis11437992002-04-12 09:54:03 +000015154# config.status only pays attention to the cache file if you give it
15155# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015156#
Skip Montanaro6dead952003-09-25 14:50:04 +000015157# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015158# loading this file, other *unset* `ac_cv_foo' will be assigned the
15159# following values.
15160
15161_ACEOF
15162
Guido van Rossumf78abae1997-01-21 22:02:36 +000015163# The following way of writing the cache mishandles newlines in values,
15164# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015166# Ultrix sh set writes to stderr and can't be redirected directly,
15167# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168(
15169 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15170 eval ac_val=\$$ac_var
15171 case $ac_val in #(
15172 *${as_nl}*)
15173 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015174 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15175$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176 esac
15177 case $ac_var in #(
15178 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15180 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181 esac ;;
15182 esac
15183 done
15184
Martin v. Löwis11437992002-04-12 09:54:03 +000015185 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015186 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15187 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015188 # `set' does not quote correctly, so add quotes: double-quote
15189 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015191 "s/'/'\\\\''/g;
15192 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015194 *)
15195 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015198 esac |
15199 sort
15200) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15206 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015207 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15208 :end' >>confcache
15209if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15210 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015211 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15213$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015214 if test ! -f "$cache_file" || test -h "$cache_file"; then
15215 cat confcache >"$cache_file"
15216 else
15217 case $cache_file in #(
15218 */* | ?:*)
15219 mv -f confcache "$cache_file"$$ &&
15220 mv -f "$cache_file"$$ "$cache_file" ;; #(
15221 *)
15222 mv -f confcache "$cache_file" ;;
15223 esac
15224 fi
15225 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015226 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015227 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15228$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015229 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015230fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015231rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015232
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015233test "x$prefix" = xNONE && prefix=$ac_default_prefix
15234# Let make expand exec_prefix.
15235test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015236
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015237DEFS=-DHAVE_CONFIG_H
15238
Skip Montanaro6dead952003-09-25 14:50:04 +000015239ac_libobjs=
15240ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015241U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015242for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15243 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015244 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015246 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15247 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015248 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15249 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015250done
15251LIBOBJS=$ac_libobjs
15252
15253LTLIBOBJS=$ac_ltlibobjs
15254
15255
Martin v. Löwis11437992002-04-12 09:54:03 +000015256
Matthias Kloseb9621712010-04-24 17:59:49 +000015257
Victor Stinnere0be4232011-10-25 13:06:09 +020015258: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015259ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015260ac_clean_files_save=$ac_clean_files
15261ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015262{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15263$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15264as_write_fail=0
15265cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015266#! $SHELL
15267# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015268# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015269# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015270# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015271
Martin v. Löwis11437992002-04-12 09:54:03 +000015272debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015273ac_cs_recheck=false
15274ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015275
Matthias Kloseb9621712010-04-24 17:59:49 +000015276SHELL=\${CONFIG_SHELL-$SHELL}
15277export SHELL
15278_ASEOF
15279cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15280## -------------------- ##
15281## M4sh Initialization. ##
15282## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015284# Be more Bourne compatible
15285DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015286if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 emulate sh
15288 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015289 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015290 # is contrary to our usage. Disable this feature.
15291 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015293else
Matthias Kloseb9621712010-04-24 17:59:49 +000015294 case `(set -o) 2>/dev/null` in #(
15295 *posix*) :
15296 set -o posix ;; #(
15297 *) :
15298 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015300fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015301
15302
Matthias Kloseb9621712010-04-24 17:59:49 +000015303as_nl='
15304'
15305export as_nl
15306# Printing a long string crashes Solaris 7 /usr/bin/printf.
15307as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15308as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15309as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15310# Prefer a ksh shell builtin over an external printf program on Solaris,
15311# but without wasting forks for bash or zsh.
15312if test -z "$BASH_VERSION$ZSH_VERSION" \
15313 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15314 as_echo='print -r --'
15315 as_echo_n='print -rn --'
15316elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15317 as_echo='printf %s\n'
15318 as_echo_n='printf %s'
15319else
15320 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15321 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15322 as_echo_n='/usr/ucb/echo -n'
15323 else
15324 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15325 as_echo_n_body='eval
15326 arg=$1;
15327 case $arg in #(
15328 *"$as_nl"*)
15329 expr "X$arg" : "X\\(.*\\)$as_nl";
15330 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15331 esac;
15332 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15333 '
15334 export as_echo_n_body
15335 as_echo_n='sh -c $as_echo_n_body as_echo'
15336 fi
15337 export as_echo_body
15338 as_echo='sh -c $as_echo_body as_echo'
15339fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015340
15341# The user is always right.
15342if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015343 PATH_SEPARATOR=:
15344 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15345 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15346 PATH_SEPARATOR=';'
15347 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015350
15351# IFS
15352# We need space, tab and new line, in precisely that order. Quoting is
15353# there to prevent editors from complaining about space-tab.
15354# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15355# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356IFS=" "" $as_nl"
15357
15358# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015359as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015360case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015361 *[\\/]* ) as_myself=$0 ;;
15362 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015363for as_dir in $PATH
15364do
15365 IFS=$as_save_IFS
15366 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15368 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371 ;;
15372esac
15373# We did not find ourselves, most probably we were run as `sh COMMAND'
15374# in which case we are not to be found in the path.
15375if test "x$as_myself" = x; then
15376 as_myself=$0
15377fi
15378if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015379 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15380 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015381fi
15382
Matthias Kloseb9621712010-04-24 17:59:49 +000015383# Unset variables that we do not need and which cause bugs (e.g. in
15384# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15385# suppresses any "Segmentation fault" message there. '((' could
15386# trigger a bug in pdksh 5.2.14.
15387for as_var in BASH_ENV ENV MAIL MAILPATH
15388do eval test x\${$as_var+set} = xset \
15389 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015390done
15391PS1='$ '
15392PS2='> '
15393PS4='+ '
15394
15395# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015396LC_ALL=C
15397export LC_ALL
15398LANGUAGE=C
15399export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400
Matthias Kloseb9621712010-04-24 17:59:49 +000015401# CDPATH.
15402(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15403
15404
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015405# as_fn_error STATUS ERROR [LINENO LOG_FD]
15406# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015407# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15408# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015409# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015410as_fn_error ()
15411{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015412 as_status=$1; test $as_status -eq 0 && as_status=1
15413 if test "$4"; then
15414 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15415 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015416 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015417 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015418 as_fn_exit $as_status
15419} # as_fn_error
15420
15421
15422# as_fn_set_status STATUS
15423# -----------------------
15424# Set $? to STATUS, without forking.
15425as_fn_set_status ()
15426{
15427 return $1
15428} # as_fn_set_status
15429
15430# as_fn_exit STATUS
15431# -----------------
15432# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15433as_fn_exit ()
15434{
15435 set +e
15436 as_fn_set_status $1
15437 exit $1
15438} # as_fn_exit
15439
15440# as_fn_unset VAR
15441# ---------------
15442# Portably unset VAR.
15443as_fn_unset ()
15444{
15445 { eval $1=; unset $1;}
15446}
15447as_unset=as_fn_unset
15448# as_fn_append VAR VALUE
15449# ----------------------
15450# Append the text in VALUE to the end of the definition contained in VAR. Take
15451# advantage of any shell optimizations that allow amortized linear growth over
15452# repeated appends, instead of the typical quadratic growth present in naive
15453# implementations.
15454if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15455 eval 'as_fn_append ()
15456 {
15457 eval $1+=\$2
15458 }'
15459else
15460 as_fn_append ()
15461 {
15462 eval $1=\$$1\$2
15463 }
15464fi # as_fn_append
15465
15466# as_fn_arith ARG...
15467# ------------------
15468# Perform arithmetic evaluation on the ARGs, and store the result in the
15469# global $as_val. Take advantage of shells that can avoid forks. The arguments
15470# must be portable across $(()) and expr.
15471if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15472 eval 'as_fn_arith ()
15473 {
15474 as_val=$(( $* ))
15475 }'
15476else
15477 as_fn_arith ()
15478 {
15479 as_val=`expr "$@" || test $? -eq 1`
15480 }
15481fi # as_fn_arith
15482
15483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015484if expr a : '\(a\)' >/dev/null 2>&1 &&
15485 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15486 as_expr=expr
15487else
15488 as_expr=false
15489fi
15490
15491if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15492 as_basename=basename
15493else
15494 as_basename=false
15495fi
15496
Matthias Kloseb9621712010-04-24 17:59:49 +000015497if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15498 as_dirname=dirname
15499else
15500 as_dirname=false
15501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015503as_me=`$as_basename -- "$0" ||
15504$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15505 X"$0" : 'X\(//\)$' \| \
15506 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015507$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015508 sed '/^.*\/\([^/][^/]*\)\/*$/{
15509 s//\1/
15510 q
15511 }
15512 /^X\/\(\/\/\)$/{
15513 s//\1/
15514 q
15515 }
15516 /^X\/\(\/\).*/{
15517 s//\1/
15518 q
15519 }
15520 s/.*/./; q'`
15521
Matthias Kloseb9621712010-04-24 17:59:49 +000015522# Avoid depending upon Character Ranges.
15523as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15524as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15525as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15526as_cr_digits='0123456789'
15527as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015528
15529ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015530case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015531-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015534 xy) ECHO_C='\c';;
15535 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15536 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537 esac;;
15538*)
15539 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015540esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015541
Martin v. Löwis11437992002-04-12 09:54:03 +000015542rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015543if test -d conf$$.dir; then
15544 rm -f conf$$.dir/conf$$.file
15545else
15546 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015547 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015549if (echo >conf$$.file) 2>/dev/null; then
15550 if ln -s conf$$.file conf$$ 2>/dev/null; then
15551 as_ln_s='ln -s'
15552 # ... but there are two gotchas:
15553 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15554 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015555 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015557 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015558 elif ln conf$$.file conf$$ 2>/dev/null; then
15559 as_ln_s=ln
15560 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015561 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015562 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015563else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015564 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015566rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15567rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015568
Matthias Kloseb9621712010-04-24 17:59:49 +000015569
15570# as_fn_mkdir_p
15571# -------------
15572# Create "$as_dir" as a directory, including parents if necessary.
15573as_fn_mkdir_p ()
15574{
15575
15576 case $as_dir in #(
15577 -*) as_dir=./$as_dir;;
15578 esac
15579 test -d "$as_dir" || eval $as_mkdir_p || {
15580 as_dirs=
15581 while :; do
15582 case $as_dir in #(
15583 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15584 *) as_qdir=$as_dir;;
15585 esac
15586 as_dirs="'$as_qdir' $as_dirs"
15587 as_dir=`$as_dirname -- "$as_dir" ||
15588$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15589 X"$as_dir" : 'X\(//\)[^/]' \| \
15590 X"$as_dir" : 'X\(//\)$' \| \
15591 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15592$as_echo X"$as_dir" |
15593 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15594 s//\1/
15595 q
15596 }
15597 /^X\(\/\/\)[^/].*/{
15598 s//\1/
15599 q
15600 }
15601 /^X\(\/\/\)$/{
15602 s//\1/
15603 q
15604 }
15605 /^X\(\/\).*/{
15606 s//\1/
15607 q
15608 }
15609 s/.*/./; q'`
15610 test -d "$as_dir" && break
15611 done
15612 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015613 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015614
15615
15616} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015617if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015618 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015619else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015620 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015621 as_mkdir_p=false
15622fi
15623
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015624
15625# as_fn_executable_p FILE
15626# -----------------------
15627# Test if FILE is an executable regular file.
15628as_fn_executable_p ()
15629{
15630 test -f "$1" && test -x "$1"
15631} # as_fn_executable_p
15632as_test_x='test -x'
15633as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015634
15635# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015636as_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 +000015637
15638# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015639as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015640
15641
Martin v. Löwis11437992002-04-12 09:54:03 +000015642exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015643## ----------------------------------- ##
15644## Main body of $CONFIG_STATUS script. ##
15645## ----------------------------------- ##
15646_ASEOF
15647test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015648
Matthias Kloseb9621712010-04-24 17:59:49 +000015649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15650# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015651# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652# values after options handling.
15653ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015654This file was extended by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015655generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015656
15657 CONFIG_FILES = $CONFIG_FILES
15658 CONFIG_HEADERS = $CONFIG_HEADERS
15659 CONFIG_LINKS = $CONFIG_LINKS
15660 CONFIG_COMMANDS = $CONFIG_COMMANDS
15661 $ $0 $@
15662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015663on `(hostname || uname -n) 2>/dev/null | sed 1q`
15664"
15665
Martin v. Löwis11437992002-04-12 09:54:03 +000015666_ACEOF
15667
Matthias Kloseb9621712010-04-24 17:59:49 +000015668case $ac_config_files in *"
15669"*) set x $ac_config_files; shift; ac_config_files=$*;;
15670esac
15671
15672case $ac_config_headers in *"
15673"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15674esac
15675
15676
15677cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015678# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015679config_files="$ac_config_files"
15680config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015682_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015683
Matthias Kloseb9621712010-04-24 17:59:49 +000015684cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015685ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015686\`$as_me' instantiates files and other configuration actions
15687from templates according to the current configuration. Unless the files
15688and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015689
Matthias Kloseb9621712010-04-24 17:59:49 +000015690Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015691
15692 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015693 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015694 --config print configuration, then exit
15695 -q, --quiet, --silent
15696 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015697 -d, --debug don't remove temporary files
15698 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015699 --file=FILE[:TEMPLATE]
15700 instantiate the configuration file FILE
15701 --header=FILE[:TEMPLATE]
15702 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015703
15704Configuration files:
15705$config_files
15706
15707Configuration headers:
15708$config_headers
15709
Matthias Kloseb9621712010-04-24 17:59:49 +000015710Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015713cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15714ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015715ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015716python config.status 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015717configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015718 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015719
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015720Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015721This config.status script is free software; the Free Software Foundation
15722gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015723
15724ac_pwd='$ac_pwd'
15725srcdir='$srcdir'
15726INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015727MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015728test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015729_ACEOF
15730
Matthias Kloseb9621712010-04-24 17:59:49 +000015731cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15732# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015733ac_need_defaults=:
15734while test $# != 0
15735do
15736 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015737 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15739 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015740 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015741 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015742 --*=)
15743 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15744 ac_optarg=
15745 ac_shift=:
15746 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015747 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015748 ac_option=$1
15749 ac_optarg=$2
15750 ac_shift=shift
15751 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015752 esac
15753
Skip Montanaro6dead952003-09-25 14:50:04 +000015754 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015755 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015756 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15757 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015758 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015759 $as_echo "$ac_cs_version"; exit ;;
15760 --config | --confi | --conf | --con | --co | --c )
15761 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 debug=: ;;
15764 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015765 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015766 case $ac_optarg in
15767 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015768 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 esac
15770 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015771 ac_need_defaults=false;;
15772 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015773 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015774 case $ac_optarg in
15775 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15776 esac
15777 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015778 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015779 --he | --h)
15780 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015781 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015782Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015783 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015784 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015785 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15786 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15787 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015788
15789 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015790 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015791Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015792
Matthias Kloseb9621712010-04-24 17:59:49 +000015793 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015794 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015795
15796 esac
15797 shift
15798done
15799
Skip Montanaro6dead952003-09-25 14:50:04 +000015800ac_configure_extra_args=
15801
15802if $ac_cs_silent; then
15803 exec 6>/dev/null
15804 ac_configure_extra_args="$ac_configure_extra_args --silent"
15805fi
15806
15807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015808cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015809if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015810 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015811 shift
15812 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15813 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015815 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015816fi
15817
Martin v. Löwis11437992002-04-12 09:54:03 +000015818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015819cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015820exec 5>>config.log
15821{
15822 echo
15823 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15824## Running $as_me. ##
15825_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015826 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015830cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015831_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015832
Matthias Kloseb9621712010-04-24 17:59:49 +000015833cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015834
15835# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015836for ac_config_target in $ac_config_targets
15837do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015838 case $ac_config_target in
15839 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15840 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15841 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015842 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15843 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15845 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015846 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015847 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015848
Victor Stinnere0be4232011-10-25 13:06:09 +020015849 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015850 esac
15851done
15852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015853
Martin v. Löwis11437992002-04-12 09:54:03 +000015854# If the user did not use the arguments to specify the items to instantiate,
15855# then the envvar interface is used. Set only those that are not.
15856# We use the long form for the default assignment because of an extremely
15857# bizarre bug on SunOS 4.1.3.
15858if $ac_need_defaults; then
15859 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15860 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15861fi
15862
Skip Montanaro6dead952003-09-25 14:50:04 +000015863# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015865# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015866# Hook for its removal unless debugging.
15867# Note that there is a small window in which the directory will not be cleaned:
15868# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015869$debug ||
15870{
Victor Stinnere0be4232011-10-25 13:06:09 +020015871 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015872 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015873 : "${ac_tmp:=$tmp}"
15874 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015875' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015876 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015877}
Martin v. Löwis11437992002-04-12 09:54:03 +000015878# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015879
Martin v. Löwis11437992002-04-12 09:54:03 +000015880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015881 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015882 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015883} ||
15884{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015885 tmp=./conf$$-$RANDOM
15886 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015887} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015888ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015889
Matthias Kloseb9621712010-04-24 17:59:49 +000015890# Set up the scripts for CONFIG_FILES section.
15891# No need to generate them if there are no CONFIG_FILES.
15892# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015893if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015894
Matthias Kloseb9621712010-04-24 17:59:49 +000015895
15896ac_cr=`echo X | tr X '\015'`
15897# On cygwin, bash can eat \r inside `` if the user requested igncr.
15898# But we know of no other shell where ac_cr would be empty at this
15899# point, so we can use a bashism as a fallback.
15900if test "x$ac_cr" = x; then
15901 eval ac_cr=\$\'\\r\'
15902fi
15903ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15904if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015905 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015906else
15907 ac_cs_awk_cr=$ac_cr
15908fi
15909
Victor Stinnere0be4232011-10-25 13:06:09 +020015910echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015911_ACEOF
15912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015913
Matthias Kloseb9621712010-04-24 17:59:49 +000015914{
15915 echo "cat >conf$$subs.awk <<_ACEOF" &&
15916 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15917 echo "_ACEOF"
15918} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015919 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15920ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015921ac_delim='%!_!# '
15922for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015923 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015924 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015925
Matthias Kloseb9621712010-04-24 17:59:49 +000015926 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15927 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015928 break
15929 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015930 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015931 else
15932 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015933 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015934done
Matthias Kloseb9621712010-04-24 17:59:49 +000015935rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015936
Matthias Kloseb9621712010-04-24 17:59:49 +000015937cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015938cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015940sed -n '
15941h
15942s/^/S["/; s/!.*/"]=/
15943p
15944g
15945s/^[^!]*!//
15946:repl
15947t repl
15948s/'"$ac_delim"'$//
15949t delim
15950:nl
15951h
15952s/\(.\{148\}\)..*/\1/
15953t more1
15954s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15955p
15956n
15957b repl
15958:more1
15959s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15960p
15961g
15962s/.\{148\}//
15963t nl
15964:delim
15965h
15966s/\(.\{148\}\)..*/\1/
15967t more2
15968s/["\\]/\\&/g; s/^/"/; s/$/"/
15969p
15970b
15971:more2
15972s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15973p
15974g
15975s/.\{148\}//
15976t delim
15977' <conf$$subs.awk | sed '
15978/^[^""]/{
15979 N
15980 s/\n//
15981}
15982' >>$CONFIG_STATUS || ac_write_fail=1
15983rm -f conf$$subs.awk
15984cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15985_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015986cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015987 for (key in S) S_is_set[key] = 1
15988 FS = ""
15989
15990}
15991{
15992 line = $ 0
15993 nfields = split(line, field, "@")
15994 substed = 0
15995 len = length(field[1])
15996 for (i = 2; i < nfields; i++) {
15997 key = field[i]
15998 keylen = length(key)
15999 if (S_is_set[key]) {
16000 value = S[key]
16001 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16002 len += length(value) + length(field[++i])
16003 substed = 1
16004 } else
16005 len += 1 + keylen
16006 }
16007
16008 print line
16009}
16010
16011_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016013cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16014if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16015 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16016else
16017 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016018fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016019 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016020_ACEOF
16021
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016022# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16023# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016024# trailing colons and then remove the whole line if VPATH becomes empty
16025# (actually we leave an empty line to preserve line numbers).
16026if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016027 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16028h
16029s///
16030s/^/:/
16031s/[ ]*$/:/
16032s/:\$(srcdir):/:/g
16033s/:\${srcdir}:/:/g
16034s/:@srcdir@:/:/g
16035s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016036s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016037x
16038s/\(=[ ]*\).*/\1/
16039G
16040s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016041s/^[^=]*=[ ]*$//
16042}'
16043fi
16044
Matthias Kloseb9621712010-04-24 17:59:49 +000016045cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016046fi # test -n "$CONFIG_FILES"
16047
Matthias Kloseb9621712010-04-24 17:59:49 +000016048# Set up the scripts for CONFIG_HEADERS section.
16049# No need to generate them if there are no CONFIG_HEADERS.
16050# This happens for instance with `./config.status Makefile'.
16051if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016052cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016053BEGIN {
16054_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016055
Matthias Kloseb9621712010-04-24 17:59:49 +000016056# Transform confdefs.h into an awk script `defines.awk', embedded as
16057# here-document in config.status, that substitutes the proper values into
16058# config.h.in to produce config.h.
16059
16060# Create a delimiter string that does not exist in confdefs.h, to ease
16061# handling of long lines.
16062ac_delim='%!_!# '
16063for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016064 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16065 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016066 break
16067 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016068 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016069 else
16070 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16071 fi
16072done
16073
16074# For the awk script, D is an array of macro values keyed by name,
16075# likewise P contains macro parameters if any. Preserve backslash
16076# newline sequences.
16077
16078ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16079sed -n '
16080s/.\{148\}/&'"$ac_delim"'/g
16081t rset
16082:rset
16083s/^[ ]*#[ ]*define[ ][ ]*/ /
16084t def
16085d
16086:def
16087s/\\$//
16088t bsnl
16089s/["\\]/\\&/g
16090s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16091D["\1"]=" \3"/p
16092s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16093d
16094:bsnl
16095s/["\\]/\\&/g
16096s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16097D["\1"]=" \3\\\\\\n"\\/p
16098t cont
16099s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16100t cont
16101d
16102:cont
16103n
16104s/.\{148\}/&'"$ac_delim"'/g
16105t clear
16106:clear
16107s/\\$//
16108t bsnlc
16109s/["\\]/\\&/g; s/^/"/; s/$/"/p
16110d
16111:bsnlc
16112s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16113b cont
16114' <confdefs.h | sed '
16115s/'"$ac_delim"'/"\\\
16116"/g' >>$CONFIG_STATUS || ac_write_fail=1
16117
16118cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16119 for (key in D) D_is_set[key] = 1
16120 FS = ""
16121}
16122/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16123 line = \$ 0
16124 split(line, arg, " ")
16125 if (arg[1] == "#") {
16126 defundef = arg[2]
16127 mac1 = arg[3]
16128 } else {
16129 defundef = substr(arg[1], 2)
16130 mac1 = arg[2]
16131 }
16132 split(mac1, mac2, "(") #)
16133 macro = mac2[1]
16134 prefix = substr(line, 1, index(line, defundef) - 1)
16135 if (D_is_set[macro]) {
16136 # Preserve the white space surrounding the "#".
16137 print prefix "define", macro P[macro] D[macro]
16138 next
16139 } else {
16140 # Replace #undef with comments. This is necessary, for example,
16141 # in the case of _POSIX_SOURCE, which is predefined and required
16142 # on some systems where configure will not decide to define it.
16143 if (defundef == "undef") {
16144 print "/*", prefix defundef, macro, "*/"
16145 next
16146 }
16147 }
16148}
16149{ print }
16150_ACAWK
16151_ACEOF
16152cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016153 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016154fi # test -n "$CONFIG_HEADERS"
16155
16156
16157eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16158shift
16159for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016160do
16161 case $ac_tag in
16162 :[FHLC]) ac_mode=$ac_tag; continue;;
16163 esac
16164 case $ac_mode$ac_tag in
16165 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016166 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016167 :[FH]-) ac_tag=-:-;;
16168 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16169 esac
16170 ac_save_IFS=$IFS
16171 IFS=:
16172 set x $ac_tag
16173 IFS=$ac_save_IFS
16174 shift
16175 ac_file=$1
16176 shift
16177
16178 case $ac_mode in
16179 :L) ac_source=$1;;
16180 :[FH])
16181 ac_file_inputs=
16182 for ac_f
16183 do
16184 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016185 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016186 *) # Look for the file first in the build tree, then in the source tree
16187 # (if the path is not absolute). The absolute path cannot be DOS-style,
16188 # because $ac_f cannot contain `:'.
16189 test -f "$ac_f" ||
16190 case $ac_f in
16191 [\\/$]*) false;;
16192 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16193 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016194 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016195 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016196 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16197 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016198 done
16199
16200 # Let's still pretend it is `configure' which instantiates (i.e., don't
16201 # use $as_me), people would be surprised to read:
16202 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016203 configure_input='Generated from '`
16204 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16205 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016206 if test x"$ac_file" != x-; then
16207 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016208 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16209$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016210 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016211 # Neutralize special characters interpreted by sed in replacement strings.
16212 case $configure_input in #(
16213 *\&* | *\|* | *\\* )
16214 ac_sed_conf_input=`$as_echo "$configure_input" |
16215 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16216 *) ac_sed_conf_input=$configure_input;;
16217 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218
16219 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016220 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16221 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222 esac
16223 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016224 esac
16225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016226 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016227$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016228 X"$ac_file" : 'X\(//\)[^/]' \| \
16229 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016231$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016232 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16233 s//\1/
16234 q
16235 }
16236 /^X\(\/\/\)[^/].*/{
16237 s//\1/
16238 q
16239 }
16240 /^X\(\/\/\)$/{
16241 s//\1/
16242 q
16243 }
16244 /^X\(\/\).*/{
16245 s//\1/
16246 q
16247 }
16248 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016249 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016250 ac_builddir=.
16251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252case "$ac_dir" in
16253.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16254*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016255 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016257 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016258 case $ac_top_builddir_sub in
16259 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16260 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16261 esac ;;
16262esac
16263ac_abs_top_builddir=$ac_pwd
16264ac_abs_builddir=$ac_pwd$ac_dir_suffix
16265# for backward compatibility:
16266ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016267
16268case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016270 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271 ac_top_srcdir=$ac_top_builddir_sub
16272 ac_abs_top_srcdir=$ac_pwd ;;
16273 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016274 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275 ac_top_srcdir=$srcdir
16276 ac_abs_top_srcdir=$srcdir ;;
16277 *) # Relative name.
16278 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16279 ac_top_srcdir=$ac_top_build_prefix$srcdir
16280 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016281esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016283
Martin v. Löwis11437992002-04-12 09:54:03 +000016284
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285 case $ac_mode in
16286 :F)
16287 #
16288 # CONFIG_FILE
16289 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016290
16291 case $INSTALL in
16292 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016294 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016295 ac_MKDIR_P=$MKDIR_P
16296 case $MKDIR_P in
16297 [\\/$]* | ?:[\\/]* ) ;;
16298 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16299 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016300_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301
Matthias Kloseb9621712010-04-24 17:59:49 +000016302cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016303# If the template does not know about datarootdir, expand it.
16304# FIXME: This hack should be removed a few years after 2.60.
16305ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016306ac_sed_dataroot='
16307/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308 p
16309 q
16310}
16311/@datadir@/p
16312/@docdir@/p
16313/@infodir@/p
16314/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016315/@mandir@/p'
16316case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016317*datarootdir*) ac_datarootdir_seen=yes;;
16318*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016319 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16320$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016322cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016323 ac_datarootdir_hack='
16324 s&@datadir@&$datadir&g
16325 s&@docdir@&$docdir&g
16326 s&@infodir@&$infodir&g
16327 s&@localedir@&$localedir&g
16328 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016329 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016330esac
16331_ACEOF
16332
16333# Neutralize VPATH when `$srcdir' = `.'.
16334# Shell code in configure.ac might set extrasub.
16335# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016336cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16337ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016338$extrasub
16339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016340cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016341:t
16342/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016343s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016345s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016346s&@srcdir@&$ac_srcdir&;t t
16347s&@abs_srcdir@&$ac_abs_srcdir&;t t
16348s&@top_srcdir@&$ac_top_srcdir&;t t
16349s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16350s&@builddir@&$ac_builddir&;t t
16351s&@abs_builddir@&$ac_abs_builddir&;t t
16352s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16353s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016354s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016356"
Victor Stinnere0be4232011-10-25 13:06:09 +020016357eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16358 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016360test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016361 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16362 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16363 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016364 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016365which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016366$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016367which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016368
Victor Stinnere0be4232011-10-25 13:06:09 +020016369 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016370 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016371 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16372 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016373 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016374 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016375 ;;
16376 :H)
16377 #
16378 # CONFIG_HEADER
16379 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016380 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016381 {
16382 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016383 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16384 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016385 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016386 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016387 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16388$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016390 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016391 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016392 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016393 fi
16394 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016395 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016396 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016397 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016400
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016401
16402 esac
16403
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016404
16405 case $ac_file$ac_mode in
16406 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16407
16408 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016409done # for ac_tag
16410
Guido van Rossum627b2d71993-12-24 10:39:16 +000016411
Matthias Kloseb9621712010-04-24 17:59:49 +000016412as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016413_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016414ac_clean_files=$ac_clean_files_save
16415
Matthias Kloseb9621712010-04-24 17:59:49 +000016416test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016417 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016418
Martin v. Löwis11437992002-04-12 09:54:03 +000016419
16420# configure is writing to config.log, and then calls config.status.
16421# config.status does its own redirection, appending to config.log.
16422# Unfortunately, on DOS this fails, as config.log is still kept open
16423# by configure, so config.status won't be able to write to it; its
16424# output is simply discarded. So we exec the FD to /dev/null,
16425# effectively closing config.log, so it can be properly (re)opened and
16426# appended to by config.status. When coming back to configure, we
16427# need to make the FD available again.
16428if test "$no_create" != yes; then
16429 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016430 ac_config_status_args=
16431 test "$silent" = yes &&
16432 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016434 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016435 exec 5>>config.log
16436 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16437 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016438 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016439fi
16440if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16441 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16442$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016443fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016444
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016445
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016446echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016447if test ! -f Modules/Setup
16448then
16449 cp $srcdir/Modules/Setup.dist Modules/Setup
16450fi
16451
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016452echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016453if test ! -f Modules/Setup.local
16454then
16455 echo "# Edit this file for local setup changes" >Modules/Setup.local
16456fi
16457
16458echo "creating Makefile"
16459$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16460 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016461 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016462mv config.c Modules