blob: c13aae069399fef2553da1d10f81059b21283887 [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.
Ned Deilycbfb9a52012-06-23 16:02:19 -07003# 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#
Ned Deilycbfb9a52012-06-23 16:02:19 -07008# 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
Ned Deilycbfb9a52012-06-23 16:02:19 -0700137# 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
Ned Deilycbfb9a52012-06-23 16:02:19 -0700195test 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 :
Ned Deilycbfb9a52012-06-23 16:02:19 -0700241 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
Ned Deilycbfb9a52012-06-23 16:02:19 -0700362
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
Ned Deilycbfb9a52012-06-23 16:02:19 -0700491 # 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.
Ned Deilycbfb9a52012-06-23 16:02:19 -0700529 # 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 ||
Ned Deilycbfb9a52012-06-23 16:02:19 -0700531 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
Ned Deilycbfb9a52012-06-23 16:02:19 -0700535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ned Deilycbfb9a52012-06-23 16:02:19 -0700538 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
Ned Deilycbfb9a52012-06-23 16:02:19 -0700550as_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
Benjamin Peterson87cdb812011-05-31 18:26:08 -0500667HAS_PYTHON
668DISABLE_ASDLGEN
Matthias Kloseb9621712010-04-24 17:59:49 +0000669ARFLAGS
670AR
671RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000672USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000673GNULD
674LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000675LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000676RUNSHARED
677INSTSONAME
678LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000679PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000680BLDLIBRARY
681DLLLIBRARY
682LDLIBRARY
683LIBRARY
684BUILDEXEEXT
685EGREP
686GREP
687CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200688NO_AS_NEEDED
Matthias Kloseb9621712010-04-24 17:59:49 +0000689MAINCC
690CXX
691OBJEXT
692EXEEXT
693ac_ct_CC
694CPPFLAGS
695LDFLAGS
696CFLAGS
697CC
698EXPORT_MACOSX_DEPLOYMENT_TARGET
699CONFIGURE_MACOSX_DEPLOYMENT_TARGET
700SGI_ABI
701MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000702FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000703FRAMEWORKUNIXTOOLSPREFIX
704FRAMEWORKALTINSTALLLAST
705FRAMEWORKALTINSTALLFIRST
706FRAMEWORKINSTALLLAST
707FRAMEWORKINSTALLFIRST
708PYTHONFRAMEWORKINSTALLDIR
709PYTHONFRAMEWORKPREFIX
710PYTHONFRAMEWORKDIR
711PYTHONFRAMEWORKIDENTIFIER
712PYTHONFRAMEWORK
713LIPO_32BIT_FLAGS
714ARCH_RUN_32BIT
715UNIVERSALSDK
716CONFIG_ARGS
717SOVERSION
718VERSION
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100719host_os
720host_vendor
721host_cpu
722host
723build_os
724build_vendor
725build_cpu
726build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500727HAS_HG
728HGBRANCH
729HGTAG
730HGVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000731target_alias
732host_alias
733build_alias
734LIBS
735ECHO_T
736ECHO_N
737ECHO_C
738DEFS
739mandir
740localedir
741libdir
742psdir
743pdfdir
744dvidir
745htmldir
746infodir
747docdir
748oldincludedir
749includedir
750localstatedir
751sharedstatedir
752sysconfdir
753datadir
754datarootdir
755libexecdir
756sbindir
757bindir
758program_transform_name
759prefix
760exec_prefix
761PACKAGE_URL
762PACKAGE_BUGREPORT
763PACKAGE_STRING
764PACKAGE_VERSION
765PACKAGE_TARNAME
766PACKAGE_NAME
767PATH_SEPARATOR
768SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000769ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000770ac_user_opts='
771enable_option_checking
772enable_universalsdk
773with_universal_archs
774with_framework_name
775enable_framework
776with_gcc
777with_cxx_main
778with_suffix
779enable_shared
780enable_profiling
781with_pydebug
782with_libs
783with_system_expat
784with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100785with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000786enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000787with_dbmliborder
788with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000789with_threads
790with_thread
791enable_ipv6
792with_doc_strings
793with_tsc
794with_pymalloc
795with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000796with_fpectl
797with_libm
798with_libc
799enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000800with_computed_gotos
801'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000802 ac_precious_vars='build_alias
803host_alias
804target_alias
805CC
806CFLAGS
807LDFLAGS
808LIBS
809CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200810CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811
Guido van Rossum627b2d71993-12-24 10:39:16 +0000812
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000814ac_init_help=
815ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000816ac_unrecognized_opts=
817ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818# The variables have the same names as the options, with
819# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000820cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000821exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000823no_recursion=
824prefix=NONE
825program_prefix=NONE
826program_suffix=NONE
827program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832x_includes=NONE
833x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000834
835# Installation directory options.
836# These are left unexpanded so users can "make install exec_prefix=/foo"
837# and all the variables that are supposed to be based on exec_prefix
838# by default will actually change.
839# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841bindir='${exec_prefix}/bin'
842sbindir='${exec_prefix}/sbin'
843libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844datarootdir='${prefix}/share'
845datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000846sysconfdir='${prefix}/etc'
847sharedstatedir='${prefix}/com'
848localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000849includedir='${prefix}/include'
850oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
852infodir='${datarootdir}/info'
853htmldir='${docdir}'
854dvidir='${docdir}'
855pdfdir='${docdir}'
856psdir='${docdir}'
857libdir='${exec_prefix}/lib'
858localedir='${datarootdir}/locale'
859mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000864do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865 # If the previous option needs an argument, assign it.
866 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868 ac_prev=
869 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000870 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200873 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
874 *=) ac_optarg= ;;
875 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878 # Accept the important Cygnus configure options, so we can diagnose typos.
879
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 case $ac_dashdash$ac_option in
881 --)
882 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884 -bindir | --bindir | --bindi | --bind | --bin | --bi)
885 ac_prev=bindir ;;
886 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888
889 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000892 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 -cache-file | --cache-file | --cache-fil | --cache-fi \
895 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
896 ac_prev=cache_file ;;
897 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
898 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 cache_file=$ac_optarg ;;
900
901 --config-cache | -C)
902 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
910 | --dataroo | --dataro | --datar)
911 ac_prev=datarootdir ;;
912 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
913 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
914 datarootdir=$ac_optarg ;;
915
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000917 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000919 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200920 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000921 ac_useropt_orig=$ac_useropt
922 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
923 case $ac_user_opts in
924 *"
925"enable_$ac_useropt"
926"*) ;;
927 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
928 ac_unrecognized_sep=', ';;
929 esac
930 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931
932 -docdir | --docdir | --docdi | --doc | --do)
933 ac_prev=docdir ;;
934 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
935 docdir=$ac_optarg ;;
936
937 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
938 ac_prev=dvidir ;;
939 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
940 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
942 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000943 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000945 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200946 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000947 ac_useropt_orig=$ac_useropt
948 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
949 case $ac_user_opts in
950 *"
951"enable_$ac_useropt"
952"*) ;;
953 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
954 ac_unrecognized_sep=', ';;
955 esac
956 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
959 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
960 | --exec | --exe | --ex)
961 ac_prev=exec_prefix ;;
962 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
963 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
964 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000965 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966
967 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000968 # Obsolete; use --with-gas.
969 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 -help | --help | --hel | --he | -h)
972 ac_init_help=long ;;
973 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
974 ac_init_help=recursive ;;
975 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
976 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000983 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
984 ac_prev=htmldir ;;
985 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
986 | --ht=*)
987 htmldir=$ac_optarg ;;
988
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989 -includedir | --includedir | --includedi | --included | --include \
990 | --includ | --inclu | --incl | --inc)
991 ac_prev=includedir ;;
992 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
993 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000995
996 -infodir | --infodir | --infodi | --infod | --info | --inf)
997 ac_prev=infodir ;;
998 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001000
1001 -libdir | --libdir | --libdi | --libd)
1002 ac_prev=libdir ;;
1003 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
1006 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1007 | --libexe | --libex | --libe)
1008 ac_prev=libexecdir ;;
1009 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1010 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001013 -localedir | --localedir | --localedi | --localed | --locale)
1014 ac_prev=localedir ;;
1015 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1016 localedir=$ac_optarg ;;
1017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001019 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 ac_prev=localstatedir ;;
1021 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001022 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024
1025 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1026 ac_prev=mandir ;;
1027 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001031 # Obsolete; use --without-fp.
1032 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
1034 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001036 no_create=yes ;;
1037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1039 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1040 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1043 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1044 | --oldin | --oldi | --old | --ol | --o)
1045 ac_prev=oldincludedir ;;
1046 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1047 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1048 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1052 ac_prev=prefix ;;
1053 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
1056 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1057 | --program-pre | --program-pr | --program-p)
1058 ac_prev=program_prefix ;;
1059 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1060 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1064 | --program-suf | --program-su | --program-s)
1065 ac_prev=program_suffix ;;
1066 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1067 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
1070 -program-transform-name | --program-transform-name \
1071 | --program-transform-nam | --program-transform-na \
1072 | --program-transform-n | --program-transform- \
1073 | --program-transform | --program-transfor \
1074 | --program-transfo | --program-transf \
1075 | --program-trans | --program-tran \
1076 | --progr-tra | --program-tr | --program-t)
1077 ac_prev=program_transform_name ;;
1078 -program-transform-name=* | --program-transform-name=* \
1079 | --program-transform-nam=* | --program-transform-na=* \
1080 | --program-transform-n=* | --program-transform-=* \
1081 | --program-transform=* | --program-transfor=* \
1082 | --program-transfo=* | --program-transf=* \
1083 | --program-trans=* | --program-tran=* \
1084 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001087 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1088 ac_prev=pdfdir ;;
1089 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1090 pdfdir=$ac_optarg ;;
1091
1092 -psdir | --psdir | --psdi | --psd | --ps)
1093 ac_prev=psdir ;;
1094 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1095 psdir=$ac_optarg ;;
1096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1098 | -silent | --silent | --silen | --sile | --sil)
1099 silent=yes ;;
1100
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1102 ac_prev=sbindir ;;
1103 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1104 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001106
1107 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1108 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1109 | --sharedst | --shareds | --shared | --share | --shar \
1110 | --sha | --sh)
1111 ac_prev=sharedstatedir ;;
1112 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1113 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1114 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1115 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001118 -site | --site | --sit)
1119 ac_prev=site ;;
1120 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1124 ac_prev=srcdir ;;
1125 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001128 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1129 | --syscon | --sysco | --sysc | --sys | --sy)
1130 ac_prev=sysconfdir ;;
1131 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1132 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001134
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139
1140 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1141 verbose=yes ;;
1142
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 -version | --version | --versio | --versi | --vers | -V)
1144 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
1146 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001147 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001149 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001150 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001151 ac_useropt_orig=$ac_useropt
1152 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1153 case $ac_user_opts in
1154 *"
1155"with_$ac_useropt"
1156"*) ;;
1157 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1158 ac_unrecognized_sep=', ';;
1159 esac
1160 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001166 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 ac_useropt_orig=$ac_useropt
1168 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1169 case $ac_user_opts in
1170 *"
1171"with_$ac_useropt"
1172"*) ;;
1173 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1174 ac_unrecognized_sep=', ';;
1175 esac
1176 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 --x)
1179 # Obsolete; use --with-x.
1180 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
1182 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1183 | --x-incl | --x-inc | --x-in | --x-i)
1184 ac_prev=x_includes ;;
1185 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1186 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1190 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1191 ac_prev=x_libraries ;;
1192 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1193 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001196 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1197Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198 ;;
1199
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 *=*)
1201 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1202 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 case $ac_envvar in #(
1204 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001207 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 export $ac_envvar ;;
1209
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001210 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001215 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216 ;;
1217
1218 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001219done
1220
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224fi
1225
Matthias Kloseb9621712010-04-24 17:59:49 +00001226if test -n "$ac_unrecognized_opts"; then
1227 case $enable_option_checking in
1228 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001229 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001230 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1231 esac
1232fi
1233
1234# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1236 datadir sysconfdir sharedstatedir localstatedir includedir \
1237 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1238 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001240 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001241 # Remove trailing slashes.
1242 case $ac_val in
1243 */ )
1244 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1245 eval $ac_var=\$ac_val;;
1246 esac
1247 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249 [\\/$]* | ?:[\\/]* ) continue;;
1250 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001252 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001253done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001254
Martin v. Löwis11437992002-04-12 09:54:03 +00001255# There might be people who depend on the old broken behavior: `$host'
1256# used to hold the argument of --host etc.
1257# FIXME: To remove some day.
1258build=$build_alias
1259host=$host_alias
1260target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261
Martin v. Löwis11437992002-04-12 09:54:03 +00001262# FIXME: To remove some day.
1263if test "x$host_alias" != x; then
1264 if test "x$build_alias" = x; then
1265 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 elif test "x$build_alias" != "x$host_alias"; then
1267 cross_compiling=yes
1268 fi
1269fi
1270
1271ac_tool_prefix=
1272test -n "$host_alias" && ac_tool_prefix=$host_alias-
1273
1274test "$silent" = yes && exec 6>/dev/null
1275
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277ac_pwd=`pwd` && test -n "$ac_pwd" &&
1278ac_ls_di=`ls -di .` &&
1279ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283
1284
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285# Find the source files, if location was not specified.
1286if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001287 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 ac_confdir=`$as_dirname -- "$as_myself" ||
1290$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1291 X"$as_myself" : 'X\(//\)[^/]' \| \
1292 X"$as_myself" : 'X\(//\)$' \| \
1293 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1294$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\/\)[^/].*/{
1300 s//\1/
1301 q
1302 }
1303 /^X\(\/\/\)$/{
1304 s//\1/
1305 q
1306 }
1307 /^X\(\/\).*/{
1308 s//\1/
1309 q
1310 }
1311 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001312 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314 srcdir=..
1315 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316else
1317 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001319if test ! -r "$srcdir/$ac_unique_file"; then
1320 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001321 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1324ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001325 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326 pwd)`
1327# When building in place, set srcdir=.
1328if test "$ac_abs_confdir" = "$ac_pwd"; then
1329 srcdir=.
1330fi
1331# Remove unnecessary trailing slashes from srcdir.
1332# Double slashes in file names in object file debugging info
1333# mess up M-x gdb in Emacs.
1334case $srcdir in
1335*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1336esac
1337for ac_var in $ac_precious_vars; do
1338 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1339 eval ac_env_${ac_var}_value=\$${ac_var}
1340 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1341 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1342done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001343
Martin v. Löwis11437992002-04-12 09:54:03 +00001344#
1345# Report the --help message.
1346#
1347if test "$ac_init_help" = "long"; then
1348 # Omit some internal or obsolete options to make the list less imposing.
1349 # This message is too long to be a string in the A/UX 3.1 sh.
1350 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001351\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001352
1353Usage: $0 [OPTION]... [VAR=VALUE]...
1354
1355To assign environment variables (e.g., CC, CFLAGS...), specify them as
1356VAR=VALUE. See below for descriptions of some of the useful variables.
1357
1358Defaults for the options are specified in brackets.
1359
1360Configuration:
1361 -h, --help display this help and exit
1362 --help=short display options specific to this package
1363 --help=recursive display the short help of all the included packages
1364 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001365 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001366 --cache-file=FILE cache test results in FILE [disabled]
1367 -C, --config-cache alias for \`--cache-file=config.cache'
1368 -n, --no-create do not create output files
1369 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1370
Martin v. Löwis11437992002-04-12 09:54:03 +00001371Installation directories:
1372 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001373 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001375 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001376
1377By default, \`make install' will install all the files in
1378\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1379an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1380for instance \`--prefix=\$HOME'.
1381
1382For better control, use the options below.
1383
1384Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001385 --bindir=DIR user executables [EPREFIX/bin]
1386 --sbindir=DIR system admin executables [EPREFIX/sbin]
1387 --libexecdir=DIR program executables [EPREFIX/libexec]
1388 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1389 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1390 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1391 --libdir=DIR object code libraries [EPREFIX/lib]
1392 --includedir=DIR C header files [PREFIX/include]
1393 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1394 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1395 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1396 --infodir=DIR info documentation [DATAROOTDIR/info]
1397 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1398 --mandir=DIR man documentation [DATAROOTDIR/man]
1399 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1400 --htmldir=DIR html documentation [DOCDIR]
1401 --dvidir=DIR dvi documentation [DOCDIR]
1402 --pdfdir=DIR pdf documentation [DOCDIR]
1403 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001404_ACEOF
1405
1406 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001407
1408System types:
1409 --build=BUILD configure for building on BUILD [guessed]
1410 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001411_ACEOF
1412fi
1413
1414if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001415 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001416 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001417 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 cat <<\_ACEOF
1419
1420Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1423 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001424 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001425 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --enable-framework[=INSTALLDIR]
1427 Build (MacOSX|Darwin) framework
1428 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001429 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001430 --enable-loadable-sqlite-extensions
1431 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001432 --enable-ipv6 Enable ipv6 (with ipv4) support
1433 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001434 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001436
1437Optional Packages:
1438 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1439 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001440 --with-universal-archs=ARCH
1441 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001442 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001443 --with-framework-name=FRAMEWORK
1444 specify an alternate name of the framework built
1445 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001447 --with-cxx-main=<compiler>
1448 compile main() and link python executable with C++
1449 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001450 --with-suffix=.exe set executable suffix
1451 --with-pydebug build with Py_DEBUG defined
1452 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001453 --with-system-expat build pyexpat module using an installed expat
1454 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001455 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001456 --with-system-libmpdec build _decimal module using an installed libmpdec
1457 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001458 --with-dbmliborder=db1:db2:...
1459 order to check db backends for dbm. Valid value is a
1460 colon separated string with the backend names
1461 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --with(out)-threads[=DIRECTORY]
1464 disable/enable thread support
1465 --with(out)-thread[=DIRECTORY]
1466 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001468 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001469 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001470 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --with-fpectl enable SIGFPE catching
1472 --with-libm=STRING math library
1473 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001474 --with(out)-computed-gotos
1475 Use computed gotos in evaluation loop (enabled by
1476 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001477
1478Some influential environment variables:
1479 CC C compiler command
1480 CFLAGS C compiler flags
1481 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1482 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001483 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001484 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001485 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 CPP C preprocessor
1487
1488Use these variables to override the choices made by `configure' or to help
1489it to find libraries and programs with nonstandard names/locations.
1490
Georg Brandle2e15612009-05-20 18:25:10 +00001491Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001492_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001494fi
1495
1496if test "$ac_init_help" = "recursive"; then
1497 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001499 test -d "$ac_dir" ||
1500 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1501 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001502 ac_builddir=.
1503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504case "$ac_dir" in
1505.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1506*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001507 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001508 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001509 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001510 case $ac_top_builddir_sub in
1511 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1512 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1513 esac ;;
1514esac
1515ac_abs_top_builddir=$ac_pwd
1516ac_abs_builddir=$ac_pwd$ac_dir_suffix
1517# for backward compatibility:
1518ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001519
1520case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001522 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523 ac_top_srcdir=$ac_top_builddir_sub
1524 ac_abs_top_srcdir=$ac_pwd ;;
1525 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001527 ac_top_srcdir=$srcdir
1528 ac_abs_top_srcdir=$srcdir ;;
1529 *) # Relative name.
1530 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1531 ac_top_srcdir=$ac_top_build_prefix$srcdir
1532 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001533esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001535
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001536 cd "$ac_dir" || { ac_status=$?; continue; }
1537 # Check for guested configure.
1538 if test -f "$ac_srcdir/configure.gnu"; then
1539 echo &&
1540 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1541 elif test -f "$ac_srcdir/configure"; then
1542 echo &&
1543 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001545 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001546 fi || ac_status=$?
1547 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 done
1549fi
1550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001552if $ac_init_version; then
1553 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001554python configure 3.3
Ned Deilycbfb9a52012-06-23 16:02:19 -07001555generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001556
Ned Deilycbfb9a52012-06-23 16:02:19 -07001557Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001558This configure script is free software; the Free Software Foundation
1559gives unlimited permission to copy, distribute and modify it.
1560_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001563
1564## ------------------------ ##
1565## Autoconf initialization. ##
1566## ------------------------ ##
1567
1568# ac_fn_c_try_compile LINENO
1569# --------------------------
1570# Try to compile conftest.$ac_ext, and return whether this succeeded.
1571ac_fn_c_try_compile ()
1572{
1573 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1574 rm -f conftest.$ac_objext
1575 if { { ac_try="$ac_compile"
1576case "(($ac_try" in
1577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1578 *) ac_try_echo=$ac_try;;
1579esac
1580eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1581$as_echo "$ac_try_echo"; } >&5
1582 (eval "$ac_compile") 2>conftest.err
1583 ac_status=$?
1584 if test -s conftest.err; then
1585 grep -v '^ *+' conftest.err >conftest.er1
1586 cat conftest.er1 >&5
1587 mv -f conftest.er1 conftest.err
1588 fi
1589 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1590 test $ac_status = 0; } && {
1591 test -z "$ac_c_werror_flag" ||
1592 test ! -s conftest.err
1593 } && test -s conftest.$ac_objext; then :
1594 ac_retval=0
1595else
1596 $as_echo "$as_me: failed program was:" >&5
1597sed 's/^/| /' conftest.$ac_ext >&5
1598
1599 ac_retval=1
1600fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001601 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001602 as_fn_set_status $ac_retval
1603
1604} # ac_fn_c_try_compile
1605
Matthias Kloseb9621712010-04-24 17:59:49 +00001606# ac_fn_c_try_link LINENO
1607# -----------------------
1608# Try to link conftest.$ac_ext, and return whether this succeeded.
1609ac_fn_c_try_link ()
1610{
1611 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1612 rm -f conftest.$ac_objext conftest$ac_exeext
1613 if { { ac_try="$ac_link"
1614case "(($ac_try" in
1615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1616 *) ac_try_echo=$ac_try;;
1617esac
1618eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1619$as_echo "$ac_try_echo"; } >&5
1620 (eval "$ac_link") 2>conftest.err
1621 ac_status=$?
1622 if test -s conftest.err; then
1623 grep -v '^ *+' conftest.err >conftest.er1
1624 cat conftest.er1 >&5
1625 mv -f conftest.er1 conftest.err
1626 fi
1627 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1628 test $ac_status = 0; } && {
1629 test -z "$ac_c_werror_flag" ||
1630 test ! -s conftest.err
1631 } && test -s conftest$ac_exeext && {
1632 test "$cross_compiling" = yes ||
Ned Deilycbfb9a52012-06-23 16:02:19 -07001633 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001634 }; then :
1635 ac_retval=0
1636else
1637 $as_echo "$as_me: failed program was:" >&5
1638sed 's/^/| /' conftest.$ac_ext >&5
1639
1640 ac_retval=1
1641fi
1642 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1643 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1644 # interfere with the next link command; also delete a directory that is
1645 # left behind by Apple's compiler. We do this before executing the actions.
1646 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001647 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001648 as_fn_set_status $ac_retval
1649
1650} # ac_fn_c_try_link
1651
Matthias Kloseb9621712010-04-24 17:59:49 +00001652# ac_fn_c_try_cpp LINENO
1653# ----------------------
1654# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1655ac_fn_c_try_cpp ()
1656{
1657 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1658 if { { ac_try="$ac_cpp conftest.$ac_ext"
1659case "(($ac_try" in
1660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1661 *) ac_try_echo=$ac_try;;
1662esac
1663eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1664$as_echo "$ac_try_echo"; } >&5
1665 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1666 ac_status=$?
1667 if test -s conftest.err; then
1668 grep -v '^ *+' conftest.err >conftest.er1
1669 cat conftest.er1 >&5
1670 mv -f conftest.er1 conftest.err
1671 fi
1672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001673 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001674 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1675 test ! -s conftest.err
1676 }; then :
1677 ac_retval=0
1678else
1679 $as_echo "$as_me: failed program was:" >&5
1680sed 's/^/| /' conftest.$ac_ext >&5
1681
1682 ac_retval=1
1683fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001684 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001685 as_fn_set_status $ac_retval
1686
1687} # ac_fn_c_try_cpp
1688
1689# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1690# -------------------------------------------------------
1691# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1692# the include files in INCLUDES and setting the cache variable VAR
1693# accordingly.
1694ac_fn_c_check_header_mongrel ()
1695{
1696 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001697 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1699$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001700if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001701 $as_echo_n "(cached) " >&6
1702fi
1703eval ac_res=\$$3
1704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1705$as_echo "$ac_res" >&6; }
1706else
1707 # Is the header compilable?
1708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1709$as_echo_n "checking $2 usability... " >&6; }
1710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1711/* end confdefs.h. */
1712$4
1713#include <$2>
1714_ACEOF
1715if ac_fn_c_try_compile "$LINENO"; then :
1716 ac_header_compiler=yes
1717else
1718 ac_header_compiler=no
1719fi
1720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1722$as_echo "$ac_header_compiler" >&6; }
1723
1724# Is the header present?
1725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1726$as_echo_n "checking $2 presence... " >&6; }
1727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1728/* end confdefs.h. */
1729#include <$2>
1730_ACEOF
1731if ac_fn_c_try_cpp "$LINENO"; then :
1732 ac_header_preproc=yes
1733else
1734 ac_header_preproc=no
1735fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001736rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1738$as_echo "$ac_header_preproc" >&6; }
1739
1740# So? What about this header?
1741case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1742 yes:no: )
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1744$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1746$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1747 ;;
1748 no:yes:* )
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1750$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1752$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1754$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1756$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1758$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001759( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001760## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001761## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001762 ) | sed "s/^/$as_me: WARNING: /" >&2
1763 ;;
1764esac
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1766$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001767if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 $as_echo_n "(cached) " >&6
1769else
1770 eval "$3=\$ac_header_compiler"
1771fi
1772eval ac_res=\$$3
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1774$as_echo "$ac_res" >&6; }
1775fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001776 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001777
1778} # ac_fn_c_check_header_mongrel
1779
1780# ac_fn_c_try_run LINENO
1781# ----------------------
1782# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1783# that executables *can* be run.
1784ac_fn_c_try_run ()
1785{
1786 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1787 if { { ac_try="$ac_link"
1788case "(($ac_try" in
1789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1790 *) ac_try_echo=$ac_try;;
1791esac
1792eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1793$as_echo "$ac_try_echo"; } >&5
1794 (eval "$ac_link") 2>&5
1795 ac_status=$?
1796 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1797 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1798 { { case "(($ac_try" in
1799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1800 *) ac_try_echo=$ac_try;;
1801esac
1802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1803$as_echo "$ac_try_echo"; } >&5
1804 (eval "$ac_try") 2>&5
1805 ac_status=$?
1806 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1807 test $ac_status = 0; }; }; then :
1808 ac_retval=0
1809else
1810 $as_echo "$as_me: program exited with status $ac_status" >&5
1811 $as_echo "$as_me: failed program was:" >&5
1812sed 's/^/| /' conftest.$ac_ext >&5
1813
1814 ac_retval=$ac_status
1815fi
1816 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001818 as_fn_set_status $ac_retval
1819
1820} # ac_fn_c_try_run
1821
1822# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1823# -------------------------------------------------------
1824# Tests whether HEADER exists and can be compiled using the include files in
1825# INCLUDES, setting the cache variable VAR accordingly.
1826ac_fn_c_check_header_compile ()
1827{
1828 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1830$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001831if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 $as_echo_n "(cached) " >&6
1833else
1834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1835/* end confdefs.h. */
1836$4
1837#include <$2>
1838_ACEOF
1839if ac_fn_c_try_compile "$LINENO"; then :
1840 eval "$3=yes"
1841else
1842 eval "$3=no"
1843fi
1844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1845fi
1846eval ac_res=\$$3
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1848$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001849 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001850
1851} # ac_fn_c_check_header_compile
1852
Matthias Kloseb9621712010-04-24 17:59:49 +00001853# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1854# -------------------------------------------
1855# Tests whether TYPE exists after having included INCLUDES, setting cache
1856# variable VAR accordingly.
1857ac_fn_c_check_type ()
1858{
1859 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1861$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001862if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001863 $as_echo_n "(cached) " >&6
1864else
1865 eval "$3=no"
1866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1867/* end confdefs.h. */
1868$4
1869int
1870main ()
1871{
1872if (sizeof ($2))
1873 return 0;
1874 ;
1875 return 0;
1876}
1877_ACEOF
1878if ac_fn_c_try_compile "$LINENO"; then :
1879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1880/* end confdefs.h. */
1881$4
1882int
1883main ()
1884{
1885if (sizeof (($2)))
1886 return 0;
1887 ;
1888 return 0;
1889}
1890_ACEOF
1891if ac_fn_c_try_compile "$LINENO"; then :
1892
1893else
1894 eval "$3=yes"
1895fi
1896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1897fi
1898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1899fi
1900eval ac_res=\$$3
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1902$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001903 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001904
1905} # ac_fn_c_check_type
1906
1907# ac_fn_c_find_uintX_t LINENO BITS VAR
1908# ------------------------------------
1909# Finds an unsigned integer type with width BITS, setting cache variable VAR
1910# accordingly.
1911ac_fn_c_find_uintX_t ()
1912{
1913 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1915$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001916if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001917 $as_echo_n "(cached) " >&6
1918else
1919 eval "$3=no"
1920 # Order is important - never check a type that is potentially smaller
1921 # than half of the expected target width.
1922 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1923 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$ac_includes_default
1927int
1928main ()
1929{
1930static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ned Deilycbfb9a52012-06-23 16:02:19 -07001931test_array [0] = 0;
1932return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001933
1934 ;
1935 return 0;
1936}
1937_ACEOF
1938if ac_fn_c_try_compile "$LINENO"; then :
1939 case $ac_type in #(
1940 uint$2_t) :
1941 eval "$3=yes" ;; #(
1942 *) :
1943 eval "$3=\$ac_type" ;;
1944esac
1945fi
1946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001947 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001948
1949else
1950 break
1951fi
1952 done
1953fi
1954eval ac_res=\$$3
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1956$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001957 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001958
1959} # ac_fn_c_find_uintX_t
1960
1961# ac_fn_c_find_intX_t LINENO BITS VAR
1962# -----------------------------------
1963# Finds a signed integer type with width BITS, setting cache variable VAR
1964# accordingly.
1965ac_fn_c_find_intX_t ()
1966{
1967 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1969$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001970if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001971 $as_echo_n "(cached) " >&6
1972else
1973 eval "$3=no"
1974 # Order is important - never check a type that is potentially smaller
1975 # than half of the expected target width.
1976 for ac_type in int$2_t 'int' 'long int' \
1977 'long long int' 'short int' 'signed char'; do
1978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1979/* end confdefs.h. */
1980$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001981 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001982int
1983main ()
1984{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001985static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ned Deilycbfb9a52012-06-23 16:02:19 -07001986test_array [0] = 0;
1987return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989 ;
1990 return 0;
1991}
1992_ACEOF
1993if ac_fn_c_try_compile "$LINENO"; then :
1994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001997 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001998int
1999main ()
2000{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002001static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002002 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ned Deilycbfb9a52012-06-23 16:02:19 -07002003test_array [0] = 0;
2004return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011
2012else
2013 case $ac_type in #(
2014 int$2_t) :
2015 eval "$3=yes" ;; #(
2016 *) :
2017 eval "$3=\$ac_type" ;;
2018esac
2019fi
2020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2021fi
2022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002023 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002024
2025else
2026 break
2027fi
2028 done
2029fi
2030eval ac_res=\$$3
2031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2032$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002033 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035} # ac_fn_c_find_intX_t
2036
2037# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2038# --------------------------------------------
2039# Tries to find the compile-time value of EXPR in a program that includes
2040# INCLUDES, setting VAR accordingly. Returns whether the value could be
2041# computed
2042ac_fn_c_compute_int ()
2043{
2044 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2045 if test "$cross_compiling" = yes; then
2046 # Depending upon the size, compute the lo and hi bounds.
2047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
2051main ()
2052{
2053static int test_array [1 - 2 * !(($2) >= 0)];
Ned Deilycbfb9a52012-06-23 16:02:19 -07002054test_array [0] = 0;
2055return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_lo=0 ac_mid=0
2063 while :; do
2064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2065/* end confdefs.h. */
2066$4
2067int
2068main ()
2069{
2070static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ned Deilycbfb9a52012-06-23 16:02:19 -07002071test_array [0] = 0;
2072return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002073
2074 ;
2075 return 0;
2076}
2077_ACEOF
2078if ac_fn_c_try_compile "$LINENO"; then :
2079 ac_hi=$ac_mid; break
2080else
2081 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2082 if test $ac_lo -le $ac_mid; then
2083 ac_lo= ac_hi=
2084 break
2085 fi
2086 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089 done
2090else
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) < 0)];
Ned Deilycbfb9a52012-06-23 16:02:19 -07002098test_array [0] = 0;
2099return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_hi=-1 ac_mid=-1
2107 while :; do
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109/* end confdefs.h. */
2110$4
2111int
2112main ()
2113{
2114static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ned Deilycbfb9a52012-06-23 16:02:19 -07002115test_array [0] = 0;
2116return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002117
2118 ;
2119 return 0;
2120}
2121_ACEOF
2122if ac_fn_c_try_compile "$LINENO"; then :
2123 ac_lo=$ac_mid; break
2124else
2125 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2126 if test $ac_mid -le $ac_hi; then
2127 ac_lo= ac_hi=
2128 break
2129 fi
2130 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2131fi
2132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133 done
2134else
2135 ac_lo= ac_hi=
2136fi
2137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2138fi
2139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2140# Binary search between lo and hi bounds.
2141while test "x$ac_lo" != "x$ac_hi"; do
2142 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2144/* end confdefs.h. */
2145$4
2146int
2147main ()
2148{
2149static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ned Deilycbfb9a52012-06-23 16:02:19 -07002150test_array [0] = 0;
2151return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002152
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_compile "$LINENO"; then :
2158 ac_hi=$ac_mid
2159else
2160 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2161fi
2162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163done
2164case $ac_lo in #((
2165?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2166'') ac_retval=1 ;;
2167esac
2168 else
2169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2170/* end confdefs.h. */
2171$4
2172static long int longval () { return $2; }
2173static unsigned long int ulongval () { return $2; }
2174#include <stdio.h>
2175#include <stdlib.h>
2176int
2177main ()
2178{
2179
2180 FILE *f = fopen ("conftest.val", "w");
2181 if (! f)
2182 return 1;
2183 if (($2) < 0)
2184 {
2185 long int i = longval ();
2186 if (i != ($2))
2187 return 1;
2188 fprintf (f, "%ld", i);
2189 }
2190 else
2191 {
2192 unsigned long int i = ulongval ();
2193 if (i != ($2))
2194 return 1;
2195 fprintf (f, "%lu", i);
2196 }
2197 /* Do not output a trailing newline, as this causes \r\n confusion
2198 on some platforms. */
2199 return ferror (f) || fclose (f) != 0;
2200
2201 ;
2202 return 0;
2203}
2204_ACEOF
2205if ac_fn_c_try_run "$LINENO"; then :
2206 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2207else
2208 ac_retval=1
2209fi
2210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2211 conftest.$ac_objext conftest.beam conftest.$ac_ext
2212rm -f conftest.val
2213
2214 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002215 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002216 as_fn_set_status $ac_retval
2217
2218} # ac_fn_c_compute_int
2219
2220# ac_fn_c_check_func LINENO FUNC VAR
2221# ----------------------------------
2222# Tests whether FUNC exists, setting the cache variable VAR accordingly
2223ac_fn_c_check_func ()
2224{
2225 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2227$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002228if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002229 $as_echo_n "(cached) " >&6
2230else
2231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232/* end confdefs.h. */
2233/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2234 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2235#define $2 innocuous_$2
2236
2237/* System header to define __stub macros and hopefully few prototypes,
2238 which can conflict with char $2 (); below.
2239 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2240 <limits.h> exists even on freestanding compilers. */
2241
2242#ifdef __STDC__
2243# include <limits.h>
2244#else
2245# include <assert.h>
2246#endif
2247
2248#undef $2
2249
2250/* Override any GCC internal prototype to avoid an error.
2251 Use char because int might match the return type of a GCC
2252 builtin and then its argument prototype would still apply. */
2253#ifdef __cplusplus
2254extern "C"
2255#endif
2256char $2 ();
2257/* The GNU C library defines this for functions which it implements
2258 to always fail with ENOSYS. Some functions are actually named
2259 something starting with __ and the normal name is an alias. */
2260#if defined __stub_$2 || defined __stub___$2
2261choke me
2262#endif
2263
2264int
2265main ()
2266{
2267return $2 ();
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_link "$LINENO"; then :
2273 eval "$3=yes"
2274else
2275 eval "$3=no"
2276fi
2277rm -f core conftest.err conftest.$ac_objext \
2278 conftest$ac_exeext conftest.$ac_ext
2279fi
2280eval ac_res=\$$3
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2282$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002283 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002284
2285} # ac_fn_c_check_func
2286
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002287# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2288# ---------------------------------------------
2289# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2290# accordingly.
2291ac_fn_c_check_decl ()
2292{
2293 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294 as_decl_name=`echo $2|sed 's/ *(.*//'`
2295 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2297$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2298if eval \${$3+:} false; then :
2299 $as_echo_n "(cached) " >&6
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303$4
2304int
2305main ()
2306{
2307#ifndef $as_decl_name
2308#ifdef __cplusplus
2309 (void) $as_decl_use;
2310#else
2311 (void) $as_decl_name;
2312#endif
2313#endif
2314
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$3=yes"
2321else
2322 eval "$3=no"
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326eval ac_res=\$$3
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2328$as_echo "$ac_res" >&6; }
2329 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2330
2331} # ac_fn_c_check_decl
2332
Matthias Kloseb9621712010-04-24 17:59:49 +00002333# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2334# ----------------------------------------------------
2335# Tries to find if the field MEMBER exists in type AGGR, after including
2336# INCLUDES, setting cache variable VAR accordingly.
2337ac_fn_c_check_member ()
2338{
2339 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2341$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002342if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002343 $as_echo_n "(cached) " >&6
2344else
2345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2346/* end confdefs.h. */
2347$5
2348int
2349main ()
2350{
2351static $2 ac_aggr;
2352if (ac_aggr.$3)
2353return 0;
2354 ;
2355 return 0;
2356}
2357_ACEOF
2358if ac_fn_c_try_compile "$LINENO"; then :
2359 eval "$4=yes"
2360else
2361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2362/* end confdefs.h. */
2363$5
2364int
2365main ()
2366{
2367static $2 ac_aggr;
2368if (sizeof ac_aggr.$3)
2369return 0;
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374if ac_fn_c_try_compile "$LINENO"; then :
2375 eval "$4=yes"
2376else
2377 eval "$4=no"
2378fi
2379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2380fi
2381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2382fi
2383eval ac_res=\$$4
2384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2385$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002386 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002387
2388} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002389cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002390This file contains any messages produced by compilers while
2391running configure, to aid debugging if configure makes a mistake.
2392
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002393It was created by python $as_me 3.3, which was
Ned Deilycbfb9a52012-06-23 16:02:19 -07002394generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002395
2396 $ $0 $@
2397
2398_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002400{
2401cat <<_ASUNAME
2402## --------- ##
2403## Platform. ##
2404## --------- ##
2405
2406hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2407uname -m = `(uname -m) 2>/dev/null || echo unknown`
2408uname -r = `(uname -r) 2>/dev/null || echo unknown`
2409uname -s = `(uname -s) 2>/dev/null || echo unknown`
2410uname -v = `(uname -v) 2>/dev/null || echo unknown`
2411
2412/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2413/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2414
2415/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2416/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2417/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002418/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002419/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2420/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2421/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2422
2423_ASUNAME
2424
2425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2426for as_dir in $PATH
2427do
2428 IFS=$as_save_IFS
2429 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002430 $as_echo "PATH: $as_dir"
2431 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002432IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002433
2434} >&5
2435
2436cat >&5 <<_ACEOF
2437
2438
2439## ----------- ##
2440## Core tests. ##
2441## ----------- ##
2442
2443_ACEOF
2444
2445
2446# Keep a trace of the command line.
2447# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002448# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002449# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002450# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002451ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002452ac_configure_args0=
2453ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002454ac_must_keep_next=false
2455for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002456do
Skip Montanaro6dead952003-09-25 14:50:04 +00002457 for ac_arg
2458 do
2459 case $ac_arg in
2460 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2461 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2462 | -silent | --silent | --silen | --sile | --sil)
2463 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002466 esac
2467 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002468 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002469 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002471 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002472 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002473 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002474 case $ac_arg in
2475 *=* | --config-cache | -C | -disable-* | --disable-* \
2476 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2477 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2478 | -with-* | --with-* | -without-* | --without-* | --x)
2479 case "$ac_configure_args0 " in
2480 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2481 esac
2482 ;;
2483 -* ) ac_must_keep_next=true ;;
2484 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002486 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 ;;
2488 esac
2489 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002490done
Matthias Kloseb9621712010-04-24 17:59:49 +00002491{ ac_configure_args0=; unset ac_configure_args0;}
2492{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002493
2494# When interrupted or exit'd, cleanup temporary files, and complete
2495# config.log. We remove comments because anyway the quotes in there
2496# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497# WARNING: Use '\'' to represent an apostrophe within the trap.
2498# 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 +00002499trap 'exit_status=$?
2500 # Save into config.log some information that might help in debugging.
2501 {
2502 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002503
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002505## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 echo
2508 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509(
2510 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2511 eval ac_val=\$$ac_var
2512 case $ac_val in #(
2513 *${as_nl}*)
2514 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2516$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 esac
2518 case $ac_var in #(
2519 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2521 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 esac ;;
2523 esac
2524 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2527 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 "s/'\''/'\''\\\\'\'''\''/g;
2530 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2531 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002532 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002534 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535 esac |
2536 sort
2537)
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002539
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002540 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002541## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002542## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 echo
2544 for ac_var in $ac_subst_vars
2545 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 eval ac_val=\$$ac_var
2547 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002549 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002550 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002551 done | sort
2552 echo
2553
2554 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002555 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002557## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002558 echo
2559 for ac_var in $ac_subst_files
2560 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561 eval ac_val=\$$ac_var
2562 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002563 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002565 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002566 done | sort
2567 echo
2568 fi
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002571 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002572## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 echo
2577 fi
2578 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 $as_echo "$as_me: caught signal $ac_signal"
2580 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002581 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 rm -f core *.core core.conftest.* &&
2583 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002586for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002588done
2589ac_signal=0
2590
2591# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002593
Matthias Kloseb9621712010-04-24 17:59:49 +00002594$as_echo "/* confdefs.h */" > confdefs.h
2595
Martin v. Löwis11437992002-04-12 09:54:03 +00002596# Predefined preprocessor variables.
2597
2598cat >>confdefs.h <<_ACEOF
2599#define PACKAGE_NAME "$PACKAGE_NAME"
2600_ACEOF
2601
Martin v. Löwis11437992002-04-12 09:54:03 +00002602cat >>confdefs.h <<_ACEOF
2603#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2604_ACEOF
2605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606cat >>confdefs.h <<_ACEOF
2607#define PACKAGE_VERSION "$PACKAGE_VERSION"
2608_ACEOF
2609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_STRING "$PACKAGE_STRING"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2616_ACEOF
2617
Matthias Kloseb9621712010-04-24 17:59:49 +00002618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_URL "$PACKAGE_URL"
2620_ACEOF
2621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622
2623# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002624# Prefer an explicitly selected file to automatically selected ones.
2625ac_site_file1=NONE
2626ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002628 # We do not want a PATH search for config.site.
2629 case $CONFIG_SITE in #((
2630 -*) ac_site_file1=./$CONFIG_SITE;;
2631 */*) ac_site_file1=$CONFIG_SITE;;
2632 *) ac_site_file1=./$CONFIG_SITE;;
2633 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 ac_site_file1=$prefix/share/config.site
2636 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637else
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 ac_site_file1=$ac_default_prefix/share/config.site
2639 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002641for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642do
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 test "x$ac_site_file" = xNONE && continue
2644 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2646$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002648 . "$ac_site_file" \
2649 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2651as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002652See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002653 fi
2654done
2655
2656if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 # Some versions of bash will fail to source /dev/null (special files
2658 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2659 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2661$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002662 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2664 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 esac
2666 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002667else
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2669$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 >$cache_file
2671fi
2672
2673# Check that the precious variables saved in the cache have kept the same
2674# value.
2675ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002676for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2678 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2680 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 case $ac_old_set,$ac_new_set in
2682 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2684$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 +00002685 ac_cache_corrupted=: ;;
2686 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002687 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2688$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 ac_cache_corrupted=: ;;
2690 ,);;
2691 *)
2692 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002693 # differences in whitespace do not lead to failure.
2694 ac_old_val_w=`echo x $ac_old_val`
2695 ac_new_val_w=`echo x $ac_new_val`
2696 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2697 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2698$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2699 ac_cache_corrupted=:
2700 else
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2702$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2703 eval $ac_var=\$ac_old_val
2704 fi
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2706$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2708$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 fi;;
2710 esac
2711 # Pass precious variables to config.status.
2712 if test "$ac_new_set" = set; then
2713 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 *) ac_arg=$ac_var=$ac_new_val ;;
2716 esac
2717 case " $ac_configure_args " in
2718 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002719 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 esac
2721 fi
2722done
2723if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002724 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2727$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002728 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002730## -------------------- ##
2731## Main body of script. ##
2732## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733
Guido van Rossum7f43da71994-08-01 12:15:30 +00002734ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002735ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2738ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002739
Guido van Rossum627b2d71993-12-24 10:39:16 +00002740
Michael W. Hudson54241132001-12-07 15:38:26 +00002741
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742
2743
2744
2745
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002746if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747then
2748# Extract the first word of "hg", so it can be a program name with args.
2749set dummy hg; ac_word=$2
2750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2751$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002752if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002753 $as_echo_n "(cached) " >&6
2754else
2755 if test -n "$HAS_HG"; then
2756 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2757else
2758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2759for as_dir in $PATH
2760do
2761 IFS=$as_save_IFS
2762 test -z "$as_dir" && as_dir=.
2763 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07002764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765 ac_cv_prog_HAS_HG="found"
2766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2767 break 2
2768 fi
2769done
2770 done
2771IFS=$as_save_IFS
2772
2773 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2774fi
2775fi
2776HAS_HG=$ac_cv_prog_HAS_HG
2777if test -n "$HAS_HG"; then
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2779$as_echo "$HAS_HG" >&6; }
2780else
2781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2782$as_echo "no" >&6; }
2783fi
2784
2785
2786else
2787HAS_HG=no-repository
2788fi
2789if test $HAS_HG = found
2790then
2791 HGVERSION="hg id -i \$(srcdir)"
2792 HGTAG="hg id -t \$(srcdir)"
2793 HGBRANCH="hg id -b \$(srcdir)"
2794else
2795 HGVERSION=""
2796 HGTAG=""
2797 HGBRANCH=""
2798fi
2799
2800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002801ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002802
2803
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002804ac_aux_dir=
2805for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2806 if test -f "$ac_dir/install-sh"; then
2807 ac_aux_dir=$ac_dir
2808 ac_install_sh="$ac_aux_dir/install-sh -c"
2809 break
2810 elif test -f "$ac_dir/install.sh"; then
2811 ac_aux_dir=$ac_dir
2812 ac_install_sh="$ac_aux_dir/install.sh -c"
2813 break
2814 elif test -f "$ac_dir/shtool"; then
2815 ac_aux_dir=$ac_dir
2816 ac_install_sh="$ac_aux_dir/shtool install -c"
2817 break
2818 fi
2819done
2820if test -z "$ac_aux_dir"; then
2821 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2822fi
2823
2824# These three variables are undocumented and unsupported,
2825# and are intended to be withdrawn in a future Autoconf release.
2826# They can cause serious problems if a builder's source tree is in a directory
2827# whose full name contains unusual characters.
2828ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2829ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2830ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2831
2832
2833# Make sure we can run config.sub.
2834$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2835 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2836
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2838$as_echo_n "checking build system type... " >&6; }
2839if ${ac_cv_build+:} false; then :
2840 $as_echo_n "(cached) " >&6
2841else
2842 ac_build_alias=$build_alias
2843test "x$ac_build_alias" = x &&
2844 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2845test "x$ac_build_alias" = x &&
2846 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2847ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2848 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2849
2850fi
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2852$as_echo "$ac_cv_build" >&6; }
2853case $ac_cv_build in
2854*-*-*) ;;
2855*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2856esac
2857build=$ac_cv_build
2858ac_save_IFS=$IFS; IFS='-'
2859set x $ac_cv_build
2860shift
2861build_cpu=$1
2862build_vendor=$2
2863shift; shift
2864# Remember, the first character of IFS is used to create $*,
2865# except with old shells:
2866build_os=$*
2867IFS=$ac_save_IFS
2868case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2869
2870
2871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2872$as_echo_n "checking host system type... " >&6; }
2873if ${ac_cv_host+:} false; then :
2874 $as_echo_n "(cached) " >&6
2875else
2876 if test "x$host_alias" = x; then
2877 ac_cv_host=$ac_cv_build
2878else
2879 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2880 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2881fi
2882
2883fi
2884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2885$as_echo "$ac_cv_host" >&6; }
2886case $ac_cv_host in
2887*-*-*) ;;
2888*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2889esac
2890host=$ac_cv_host
2891ac_save_IFS=$IFS; IFS='-'
2892set x $ac_cv_host
2893shift
2894host_cpu=$1
2895host_vendor=$2
2896shift; shift
2897# Remember, the first character of IFS is used to create $*,
2898# except with old shells:
2899host_os=$*
2900IFS=$ac_save_IFS
2901case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2902
2903
2904
Martin v. Löwis11437992002-04-12 09:54:03 +00002905
Benjamin Petersond23f8222009-04-05 19:13:16 +00002906if test "$prefix" != "/"; then
2907 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2908fi
2909
2910
Martin v. Löwis11437992002-04-12 09:54:03 +00002911
2912
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002913# We don't use PACKAGE_ variables, and they cause conflicts
2914# with other autoconf-based packages that include Python.h
2915grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2916rm confdefs.h
2917mv confdefs.h.new confdefs.h
2918
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002919
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002920VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002921
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002922# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002923
2924SOVERSION=1.0
2925
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002926# The later defininition of _XOPEN_SOURCE disables certain features
2927# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2928
Matthias Kloseb9621712010-04-24 17:59:49 +00002929$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002930
2931
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002932# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2933# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2934# them.
2935
Matthias Kloseb9621712010-04-24 17:59:49 +00002936$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002937
2938
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002939# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2940# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2941# them.
2942
Matthias Kloseb9621712010-04-24 17:59:49 +00002943$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002944
2945
Martin v. Löwisd6320502004-08-12 13:45:08 +00002946# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2947# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2948
Matthias Kloseb9621712010-04-24 17:59:49 +00002949$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002950
2951
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002952# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2953# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2954# them.
2955
Matthias Kloseb9621712010-04-24 17:59:49 +00002956$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002957
2958
2959
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002960define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002961
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002962# Arguments passed to configure.
2963
2964CONFIG_ARGS="$ac_configure_args"
2965
Matthias Kloseb9621712010-04-24 17:59:49 +00002966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2967$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002968# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00002969if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002970 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002971 case $enableval in
2972 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07002973 # Locate the best usable SDK, see Mac/README.txt for more
2974 # information
2975 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
2976 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002977 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07002978 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2979 if test ! -d "${enableval}"
2980 then
2981 enableval=/
2982 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002983 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002984 ;;
2985 esac
2986 case $enableval in
2987 no)
2988 UNIVERSALSDK=
2989 enable_universalsdk=
2990 ;;
2991 *)
2992 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002993 if test ! -d "${UNIVERSALSDK}"
2994 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002995 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00002996 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002997 ;;
2998 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002999
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003000
Thomas Wouters477c8d52006-05-27 19:21:47 +00003001else
3002
3003 UNIVERSALSDK=
3004 enable_universalsdk=
3005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003006fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003007
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003008if test -n "${UNIVERSALSDK}"
3009then
Matthias Kloseb9621712010-04-24 17:59:49 +00003010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3011$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003012else
Matthias Kloseb9621712010-04-24 17:59:49 +00003013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3014$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003017
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003018
3019
Ned Deilycbfb9a52012-06-23 16:02:19 -07003020# For backward compatibility reasons we prefer to select '32-bit' if available,
3021# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003022UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023if test "`uname -s`" = "Darwin"
3024then
3025 if test -n "${UNIVERSALSDK}"
3026 then
3027 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3028 then
3029 UNIVERSAL_ARCHS="intel"
3030 fi
3031 fi
3032fi
3033
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3036$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003037
3038# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003039if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003040 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3042$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003043 UNIVERSAL_ARCHS="$withval"
3044
3045else
3046
Ned Deilycbfb9a52012-06-23 16:02:19 -07003047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3048$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003049
3050fi
3051
3052
3053
3054
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003055
3056# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003057if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003058 withval=$with_framework_name;
3059 PYTHONFRAMEWORK=${withval}
3060 PYTHONFRAMEWORKDIR=${withval}.framework
3061 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3062
3063else
3064
3065 PYTHONFRAMEWORK=Python
3066 PYTHONFRAMEWORKDIR=Python.framework
3067 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3068
3069fi
3070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003071# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003072if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003073 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003074 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003075 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003076 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003077 esac
3078 case $enableval in
3079 no)
3080 PYTHONFRAMEWORK=
3081 PYTHONFRAMEWORKDIR=no-framework
3082 PYTHONFRAMEWORKPREFIX=
3083 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003084 FRAMEWORKINSTALLFIRST=
3085 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003086 FRAMEWORKALTINSTALLFIRST=
3087 FRAMEWORKALTINSTALLLAST=
3088 if test "x${prefix}" = "xNONE"; then
3089 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3090 else
3091 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3092 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003093 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003094 ;;
3095 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003096 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003097 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003098 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003099 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003100 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3101 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003102 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003103
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003104 if test "x${prefix}" = "xNONE" ; then
3105 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003106
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003107 else
3108 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3109 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003110
3111 case "${enableval}" in
3112 /System*)
3113 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3114 if test "${prefix}" = "NONE" ; then
3115 # See below
3116 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3117 fi
3118 ;;
3119
3120 /Library*)
3121 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3122 ;;
3123
3124 */Library/Frameworks)
3125 MDIR="`dirname "${enableval}"`"
3126 MDIR="`dirname "${MDIR}"`"
3127 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3128
3129 if test "${prefix}" = "NONE"; then
3130 # User hasn't specified the
3131 # --prefix option, but wants to install
3132 # the framework in a non-default location,
3133 # ensure that the compatibility links get
3134 # installed relative to that prefix as well
3135 # instead of in /usr/local.
3136 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3137 fi
3138 ;;
3139
3140 *)
3141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3142 ;;
3143 esac
3144
Jack Jansen127e56e2001-09-11 14:41:54 +00003145 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003146
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003147 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003148 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003151 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003152
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003153 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3154
3155 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3156
Jack Jansene578a632001-08-15 01:27:14 +00003157 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003158
Guido van Rossum563e7081996-09-10 18:20:48 +00003159else
Martin v. Löwis11437992002-04-12 09:54:03 +00003160
Jack Jansene578a632001-08-15 01:27:14 +00003161 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003162 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003163 PYTHONFRAMEWORKPREFIX=
3164 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003165 FRAMEWORKINSTALLFIRST=
3166 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003167 FRAMEWORKALTINSTALLFIRST=
3168 FRAMEWORKALTINSTALLLAST=
3169 if test "x${prefix}" = "xNONE" ; then
3170 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3171 else
3172 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3173 fi
Jack Jansene578a632001-08-15 01:27:14 +00003174 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003175
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177fi
3178
Thomas Wouters477c8d52006-05-27 19:21:47 +00003179
3180
Michael W. Hudson54241132001-12-07 15:38:26 +00003181
3182
3183
3184
Jack Jansene578a632001-08-15 01:27:14 +00003185
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003186
3187
3188
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003189
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003190
Jack Jansene578a632001-08-15 01:27:14 +00003191##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003192## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003193## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003194##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003195# Set name for machine-dependent library files
3196
Matthias Kloseb9621712010-04-24 17:59:49 +00003197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3198$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003199if test -z "$MACHDEP"
3200then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003201 # avoid using uname for cross builds
3202 if test "$cross_compiling" = yes; then
3203 # ac_sys_system and ac_sys_release are only used for setting
3204 # `define_xopen_source' in the case statement below. For the
3205 # current supported cross builds, this macro is not adjusted.
3206 case "$host" in
3207 *-*-linux*)
3208 ac_sys_system=Linux
3209 ;;
3210 *-*-cygwin*)
3211 ac_sys_system=Cygwin
3212 ;;
3213 *)
3214 # for now, limit cross builds to known configurations
3215 MACHDEP="unknown"
3216 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3217 esac
3218 ac_sys_release=
3219 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003220 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003221 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003222 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003223 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003224 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003225 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003226 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003227 fi
3228 ac_md_system=`echo $ac_sys_system |
3229 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3230 ac_md_release=`echo $ac_sys_release |
3231 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3232 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003233
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003234 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003235 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003236 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003237 darwin*) MACHDEP="darwin";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003238 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003239 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003240 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241fi
Guido van Rossum91922671997-10-09 20:24:13 +00003242
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003243# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3244# disable features if it is defined, without any means to access these
3245# features as extensions. For these systems, we skip the definition of
3246# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3247# some feature, make sure there is no alternative way to access this
3248# feature. Also, when using wildcards, make sure you have verified the
3249# need for not defining _XOPEN_SOURCE on all systems matching the
3250# wildcard, and that the wildcard does not include future systems
3251# (which may remove their limitations).
3252case $ac_sys_system/$ac_sys_release in
3253 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3254 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003255 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003256 # In addition, Stefan Krah confirms that issue #1244610 exists through
3257 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003258 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003259 define_xopen_source=no
3260 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3261 # also defined. This can be overridden by defining _BSD_SOURCE
3262 # As this has a different meaning on Linux, only define it on OpenBSD
3263
Matthias Kloseb9621712010-04-24 17:59:49 +00003264$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003265
3266 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003267 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003268 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3269 # also defined. This can be overridden by defining _BSD_SOURCE
3270 # As this has a different meaning on Linux, only define it on OpenBSD
3271
Matthias Kloseb9621712010-04-24 17:59:49 +00003272$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003273
3274 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003275 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3276 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3277 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003278 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 +00003279 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003280 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3281 # request to enable features supported by the standard as a request
3282 # to disable features not supported by the standard. The best way
3283 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3284 # entirely and define __EXTENSIONS__ instead.
3285 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003286 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003287 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3288 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003289 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003290 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003291 define_xopen_source=no;;
3292 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003293 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003294 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003295 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003296 # On FreeBSD 4, the math functions C89 does not cover are never defined
3297 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3298 FreeBSD/4.*)
3299 define_xopen_source=no;;
3300 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3301 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3302 # identifies itself as Darwin/7.*
3303 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3304 # disables platform specific features beyond repair.
3305 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3306 # has no effect, don't bother defining them
3307 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003308 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003309 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003310 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003311 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3312 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3313 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003314 AIX/4)
3315 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003316 AIX/5)
3317 if test `uname -r` -eq 1; then
3318 define_xopen_source=no
3319 fi
3320 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003321 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3322 # defining NI_NUMERICHOST.
3323 QNX/6.3.2)
3324 define_xopen_source=no
3325 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003326
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003327esac
3328
3329if test $define_xopen_source = yes
3330then
Victor Stinner14d098d2011-09-07 22:29:43 +02003331 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003332
Victor Stinner14d098d2011-09-07 22:29:43 +02003333$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003334
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003335
3336 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3337 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3338 # several APIs are not declared. Since this is also needed in some
3339 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003342
3343
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003344
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003345$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003346
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003347fi
3348
Guido van Rossum91922671997-10-09 20:24:13 +00003349#
3350# SGI compilers allow the specification of the both the ABI and the
3351# ISA on the command line. Depending on the values of these switches,
3352# different and often incompatable code will be generated.
3353#
3354# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3355# thus supply support for various ABI/ISA combinations. The MACHDEP
3356# variable is also adjusted.
3357#
3358
3359if test ! -z "$SGI_ABI"
3360then
3361 CC="cc $SGI_ABI"
3362 LDFLAGS="$SGI_ABI $LDFLAGS"
3363 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3366$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003367
Jack Jansen6b08a402004-06-03 12:41:45 +00003368# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3369# it may influence the way we can build extensions, so distutils
3370# needs to check it
3371
Thomas Wouters477c8d52006-05-27 19:21:47 +00003372
Jack Jansen6b08a402004-06-03 12:41:45 +00003373CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003374EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003375
Guido van Rossum627b2d71993-12-24 10:39:16 +00003376# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003377
3378# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3379# for debug/optimization stuff. BASECFLAGS is for flags that are required
3380# just to get things to compile and link. Users are free to override OPT
3381# when running configure or make. The build should not break if they do.
3382# BASECFLAGS should generally not be messed with, however.
3383
3384# XXX shouldn't some/most/all of this code be merged with the stuff later
3385# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3387$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003389# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003390if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003391 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003392 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003393 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003394 without_gcc=yes;;
3395 yes) CC=gcc
3396 without_gcc=no;;
3397 *) CC=$withval
3398 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003399 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003400else
Martin v. Löwis11437992002-04-12 09:54:03 +00003401
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003402 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003403 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003404 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003405 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003406 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003407fi
3408
Matthias Kloseb9621712010-04-24 17:59:49 +00003409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3410$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003411
Guido van Rossum8b131c51995-03-09 14:10:13 +00003412# If the user switches compilers, we can't believe the cache
3413if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3414then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003415 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003416(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003417fi
3418
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003419# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3420# when the compiler supports them, but we don't always want -O2, and
3421# we set -g later.
3422if test -z "$CFLAGS"; then
3423 CFLAGS=
3424fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003425
3426if test "$ac_sys_system" = "Darwin"
3427then
3428 # Compiler selection on MacOSX is more complicated than
3429 # AC_PROG_CC can handle, see Mac/README.txt for more
3430 # information
3431 if test -z "${CC}"
3432 then
3433 found_gcc=
3434 found_clang=
3435 as_save_IFS=$IFS; IFS=:
3436 for as_dir in $PATH
3437 do
3438 IFS=$as_save_IFS
3439 if test -x $as_dir/gcc; then
3440 if test -z "${found_gcc}"; then
3441 found_gcc=$as_dir/gcc
3442 fi
3443 fi
3444 if test -x $as_dir/clang; then
3445 if test -z "${found_clang}"; then
3446 found_clang=$as_dir/clang
3447 fi
3448 fi
3449 done
3450 IFS=$as_save_IFS
3451
3452 if test -n "$found_gcc" -a -n "$found_clang"
3453 then
3454 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3455 then
3456 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3457$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3458 CC="$found_clang"
3459 CXX="$found_clang++"
3460 fi
3461
3462
3463 elif test -z "$found_gcc" -a -n "$found_clang"
3464 then
3465 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3466$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3467 CC="$found_clang"
3468 CXX="$found_clang++"
3469
3470 elif test -z "$found_gcc" -a -z "$found_clang"
3471 then
3472 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3473 if test -n "${found_clang}"
3474 then
3475 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3476$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3477 CC="${found_clang}"
3478 CXX="`/usr/bin/xcrun -find clang++`"
3479
3480 # else: use default behaviour
3481 fi
3482 fi
3483 fi
3484fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003485ac_ext=c
3486ac_cpp='$CPP $CPPFLAGS'
3487ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3488ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3489ac_compiler_gnu=$ac_cv_c_compiler_gnu
3490if test -n "$ac_tool_prefix"; then
3491 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3492set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3494$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003495if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003496 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003497else
3498 if test -n "$CC"; then
3499 ac_cv_prog_CC="$CC" # Let the user override the test.
3500else
Martin v. Löwis11437992002-04-12 09:54:03 +00003501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3502for as_dir in $PATH
3503do
3504 IFS=$as_save_IFS
3505 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003506 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07003507 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003508 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003509 $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 +00003510 break 2
3511 fi
3512done
Matthias Kloseb9621712010-04-24 17:59:49 +00003513 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003514IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003515
Jack Jansendd19cf82001-12-06 22:36:17 +00003516fi
3517fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003518CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003519if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3521$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003522else
Matthias Kloseb9621712010-04-24 17:59:49 +00003523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3524$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003525fi
3526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003527
Martin v. Löwis11437992002-04-12 09:54:03 +00003528fi
3529if test -z "$ac_cv_prog_CC"; then
3530 ac_ct_CC=$CC
3531 # Extract the first word of "gcc", so it can be a program name with args.
3532set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3534$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003535if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003536 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003537else
3538 if test -n "$ac_ct_CC"; then
3539 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3540else
3541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3542for as_dir in $PATH
3543do
3544 IFS=$as_save_IFS
3545 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07003547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 $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 +00003550 break 2
3551 fi
3552done
Matthias Kloseb9621712010-04-24 17:59:49 +00003553 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003554IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003555
3556fi
3557fi
3558ac_ct_CC=$ac_cv_prog_ac_ct_CC
3559if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3561$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003562else
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3564$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003565fi
3566
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003567 if test "x$ac_ct_CC" = x; then
3568 CC=""
3569 else
3570 case $cross_compiling:$ac_tool_warned in
3571yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574ac_tool_warned=yes ;;
3575esac
3576 CC=$ac_ct_CC
3577 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003578else
3579 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003580fi
3581
Jack Jansendd19cf82001-12-06 22:36:17 +00003582if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583 if test -n "$ac_tool_prefix"; then
3584 # 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 +00003585set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3587$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003588if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003590else
3591 if test -n "$CC"; then
3592 ac_cv_prog_CC="$CC" # Let the user override the test.
3593else
Martin v. Löwis11437992002-04-12 09:54:03 +00003594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3595for as_dir in $PATH
3596do
3597 IFS=$as_save_IFS
3598 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07003600 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003601 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003602 $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 +00003603 break 2
3604 fi
3605done
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003608
3609fi
3610fi
3611CC=$ac_cv_prog_CC
3612if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3614$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003615else
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3617$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003618fi
3619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003622fi
3623if test -z "$CC"; then
3624 # Extract the first word of "cc", so it can be a program name with args.
3625set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3627$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003628if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003630else
3631 if test -n "$CC"; then
3632 ac_cv_prog_CC="$CC" # Let the user override the test.
3633else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003634 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3636for as_dir in $PATH
3637do
3638 IFS=$as_save_IFS
3639 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07003641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3643 ac_prog_rejected=yes
3644 continue
3645 fi
3646 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 $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 +00003648 break 2
3649 fi
3650done
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003653
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003654if test $ac_prog_rejected = yes; then
3655 # We found a bogon in the path, so make sure we never use it.
3656 set dummy $ac_cv_prog_CC
3657 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003659 # We chose a different compiler from the bogus one.
3660 # However, it has the same basename, so the bogon will be chosen
3661 # first if we set CC to just the basename; use the full file name.
3662 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003663 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003664 fi
3665fi
3666fi
3667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003668CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003669if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3671$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003672else
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3674$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003675fi
3676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003677
Martin v. Löwis11437992002-04-12 09:54:03 +00003678fi
3679if test -z "$CC"; then
3680 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 do
3683 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3684set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3686$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003687if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003689else
3690 if test -n "$CC"; then
3691 ac_cv_prog_CC="$CC" # Let the user override the test.
3692else
Martin v. Löwis11437992002-04-12 09:54:03 +00003693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3694for as_dir in $PATH
3695do
3696 IFS=$as_save_IFS
3697 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07003699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 $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 +00003702 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003703 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003704done
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003707
3708fi
3709fi
3710CC=$ac_cv_prog_CC
3711if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3713$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003714else
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3716$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003717fi
3718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 test -n "$CC" && break
3721 done
3722fi
3723if test -z "$CC"; then
3724 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003726do
3727 # Extract the first word of "$ac_prog", so it can be a program name with args.
3728set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3730$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003731if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
3734 if test -n "$ac_ct_CC"; then
3735 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3736else
3737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3738for as_dir in $PATH
3739do
3740 IFS=$as_save_IFS
3741 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07003743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $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 +00003746 break 2
3747 fi
3748done
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003751
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
3753fi
3754ac_ct_CC=$ac_cv_prog_ac_ct_CC
3755if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3757$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3760$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003761fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 test -n "$ac_ct_CC" && break
3765done
Michael W. Hudson54241132001-12-07 15:38:26 +00003766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767 if test "x$ac_ct_CC" = x; then
3768 CC=""
3769 else
3770 case $cross_compiling:$ac_tool_warned in
3771yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774ac_tool_warned=yes ;;
3775esac
3776 CC=$ac_ct_CC
3777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003778fi
3779
3780fi
3781
3782
Matthias Kloseb9621712010-04-24 17:59:49 +00003783test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003785as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003786See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003787
3788# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003789$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3790set X $ac_compile
3791ac_compiler=$2
3792for ac_option in --version -v -V -qversion; do
3793 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794case "(($ac_try" in
3795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3796 *) ac_try_echo=$ac_try;;
3797esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003798eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3799$as_echo "$ac_try_echo"; } >&5
3800 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 if test -s conftest.err; then
3803 sed '10a\
3804... rest of stderr output deleted ...
3805 10q' conftest.err >conftest.er1
3806 cat conftest.er1 >&5
3807 fi
3808 rm -f conftest.er1 conftest.err
3809 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3810 test $ac_status = 0; }
3811done
Martin v. Löwis11437992002-04-12 09:54:03 +00003812
Matthias Kloseb9621712010-04-24 17:59:49 +00003813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003814/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003815
Martin v. Löwis11437992002-04-12 09:54:03 +00003816int
3817main ()
3818{
3819
3820 ;
3821 return 0;
3822}
3823_ACEOF
3824ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003825ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003826# Try to create an executable without -o first, disregard a.out.
3827# It will help us diagnose broken compilers, and finding out an intuition
3828# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3830$as_echo_n "checking whether the C compiler works... " >&6; }
3831ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3832
3833# The possible output files:
3834ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836ac_rmfiles=
3837for ac_file in $ac_files
3838do
3839 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3842 esac
3843done
3844rm -f $ac_rmfiles
3845
Matthias Kloseb9621712010-04-24 17:59:49 +00003846if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847case "(($ac_try" in
3848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3849 *) ac_try_echo=$ac_try;;
3850esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3852$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3856 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3858# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3859# in a Makefile. We should not override ac_cv_exeext if it was cached,
3860# so that the user can short-circuit this test for compilers unknown to
3861# Autoconf.
3862for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003863do
3864 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003865 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003867 ;;
3868 [ab].out )
3869 # We found the default executable, but exeext='' is most
3870 # certainly right.
3871 break;;
3872 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874 then :; else
3875 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3876 fi
3877 # We set ac_cv_exeext here because the later test for it is not
3878 # safe: cross compilers may not add the suffix if given an `-o'
3879 # argument, so we may need to know it at that point already.
3880 # Even if this section looks crufty: it has the advantage of
3881 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003882 break;;
3883 * )
3884 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 esac
3886done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887test "$ac_cv_exeext" = no && ac_cv_exeext=
3888
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003889else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 ac_file=''
3891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003892if test -z "$ac_file"; then :
3893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3894$as_echo "no" >&6; }
3895$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003896sed 's/^/| /' conftest.$ac_ext >&5
3897
Matthias Kloseb9621712010-04-24 17:59:49 +00003898{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003900as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003901See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003902else
3903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3904$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3907$as_echo_n "checking for C compiler default output file name... " >&6; }
3908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3909$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003910ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003911
Matthias Kloseb9621712010-04-24 17:59:49 +00003912rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003913ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3915$as_echo_n "checking for suffix of executables... " >&6; }
3916if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917case "(($ac_try" in
3918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3919 *) ac_try_echo=$ac_try;;
3920esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003921eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3922$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003924 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003925 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3926 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003927 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3928# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3929# work properly (i.e., refer to `conftest.exe'), while it won't with
3930# `rm'.
3931for ac_file in conftest.exe conftest conftest.*; do
3932 test -f "$ac_file" || continue
3933 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003935 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3936 break;;
3937 * ) break;;
3938 esac
3939done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003940else
Matthias Kloseb9621712010-04-24 17:59:49 +00003941 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003943as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003944See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003946rm -f conftest conftest$ac_cv_exeext
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3948$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003949
3950rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003951EXEEXT=$ac_cv_exeext
3952ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3954/* end confdefs.h. */
3955#include <stdio.h>
3956int
3957main ()
3958{
3959FILE *f = fopen ("conftest.out", "w");
3960 return ferror (f) || fclose (f) != 0;
3961
3962 ;
3963 return 0;
3964}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00003966ac_clean_files="$ac_clean_files conftest.out"
3967# Check that the compiler produces executables we can run. If not, either
3968# the compiler is broken, or we cross compile.
3969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3970$as_echo_n "checking whether we are cross compiling... " >&6; }
3971if test "$cross_compiling" != yes; then
3972 { { ac_try="$ac_link"
3973case "(($ac_try" in
3974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3975 *) ac_try_echo=$ac_try;;
3976esac
3977eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3978$as_echo "$ac_try_echo"; } >&5
3979 (eval "$ac_link") 2>&5
3980 ac_status=$?
3981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3982 test $ac_status = 0; }
3983 if { ac_try='./conftest$ac_cv_exeext'
3984 { { case "(($ac_try" in
3985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3986 *) ac_try_echo=$ac_try;;
3987esac
3988eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3989$as_echo "$ac_try_echo"; } >&5
3990 (eval "$ac_try") 2>&5
3991 ac_status=$?
3992 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3993 test $ac_status = 0; }; }; then
3994 cross_compiling=no
3995 else
3996 if test "$cross_compiling" = maybe; then
3997 cross_compiling=yes
3998 else
3999 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004001as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004002If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004003See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004004 fi
4005 fi
4006fi
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4008$as_echo "$cross_compiling" >&6; }
4009
4010rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4011ac_clean_files=$ac_clean_files_save
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4013$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004014if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 $as_echo_n "(cached) " >&6
4016else
4017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018/* end confdefs.h. */
4019
4020int
4021main ()
4022{
4023
4024 ;
4025 return 0;
4026}
4027_ACEOF
4028rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004029if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004030case "(($ac_try" in
4031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4032 *) ac_try_echo=$ac_try;;
4033esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004034eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4035$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004037 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4039 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004040 for ac_file in conftest.o conftest.obj conftest.*; do
4041 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004044 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4045 break;;
4046 esac
4047done
4048else
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004050sed 's/^/| /' conftest.$ac_ext >&5
4051
Matthias Kloseb9621712010-04-24 17:59:49 +00004052{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4053$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004054as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004055See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004056fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004057rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4060$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004061OBJEXT=$ac_cv_objext
4062ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4064$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004065if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004067else
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004070
Martin v. Löwis11437992002-04-12 09:54:03 +00004071int
4072main ()
4073{
4074#ifndef __GNUC__
4075 choke me
4076#endif
4077
4078 ;
4079 return 0;
4080}
4081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004083 ac_compiler_gnu=yes
4084else
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004088ac_cv_c_compiler_gnu=$ac_compiler_gnu
4089
4090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4092$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4093if test $ac_compiler_gnu = yes; then
4094 GCC=yes
4095else
4096 GCC=
4097fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004098ac_test_CFLAGS=${CFLAGS+set}
4099ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4101$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004102if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004104else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004105 ac_save_c_werror_flag=$ac_c_werror_flag
4106 ac_c_werror_flag=yes
4107 ac_cv_prog_cc_g=no
4108 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004111
Martin v. Löwis11437992002-04-12 09:54:03 +00004112int
4113main ()
4114{
4115
4116 ;
4117 return 0;
4118}
4119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004120if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004121 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004122else
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 CFLAGS=""
4124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125/* end confdefs.h. */
4126
4127int
4128main ()
4129{
4130
4131 ;
4132 return 0;
4133}
4134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004135if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136
Matthias Kloseb9621712010-04-24 17:59:49 +00004137else
4138 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004139 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141/* end confdefs.h. */
4142
4143int
4144main ()
4145{
4146
4147 ;
4148 return 0;
4149}
4150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004151if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4159 ac_c_werror_flag=$ac_save_c_werror_flag
4160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4162$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004163if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004164 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004165elif test $ac_cv_prog_cc_g = yes; then
4166 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004167 CFLAGS="-g -O2"
4168 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004169 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004170 fi
4171else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004172 if test "$GCC" = yes; then
4173 CFLAGS="-O2"
4174 else
4175 CFLAGS=
4176 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4179$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004180if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004182else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004184ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004186/* end confdefs.h. */
4187#include <stdarg.h>
4188#include <stdio.h>
Ned Deilycbfb9a52012-06-23 16:02:19 -07004189struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004190/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4191struct buf { int x; };
4192FILE * (*rcsopen) (struct buf *, struct stat *, int);
4193static char *e (p, i)
4194 char **p;
4195 int i;
4196{
4197 return p[i];
4198}
4199static char *f (char * (*g) (char **, int), char **p, ...)
4200{
4201 char *s;
4202 va_list v;
4203 va_start (v,p);
4204 s = g (p, va_arg (v,int));
4205 va_end (v);
4206 return s;
4207}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004208
4209/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4210 function prototypes and stuff, but not '\xHH' hex character constants.
4211 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004213 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4214 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004216int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004218/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4219 inside strings and character constants. */
4220#define FOO(x) 'x'
4221int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4222
Skip Montanaro6dead952003-09-25 14:50:04 +00004223int test (int i, double x);
4224struct s1 {int (*f) (int a);};
4225struct s2 {int (*f) (double a);};
4226int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4227int argc;
4228char **argv;
4229int
4230main ()
4231{
4232return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4233 ;
4234 return 0;
4235}
4236_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4238 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004239do
4240 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004242 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244rm -f core conftest.err conftest.$ac_objext
4245 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004246done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004247rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004248CC=$ac_save_CC
4249
4250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251# AC_CACHE_VAL
4252case "x$ac_cv_prog_cc_c89" in
4253 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4255$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4258$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004259 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4262$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004263esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004264if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004265
Matthias Kloseb9621712010-04-24 17:59:49 +00004266fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004267
Martin v. Löwis11437992002-04-12 09:54:03 +00004268ac_ext=c
4269ac_cpp='$CPP $CPPFLAGS'
4270ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4271ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4272ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004274
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004275
4276
Matthias Kloseb9621712010-04-24 17:59:49 +00004277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4278$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004279
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004281if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004282 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004283
4284 case $withval in
4285 no) with_cxx_main=no
4286 MAINCC='$(CC)';;
4287 yes) with_cxx_main=yes
4288 MAINCC='$(CXX)';;
4289 *) with_cxx_main=yes
4290 MAINCC=$withval
4291 if test -z "$CXX"
4292 then
4293 CXX=$withval
4294 fi;;
4295 esac
4296else
4297
4298 with_cxx_main=no
4299 MAINCC='$(CC)'
4300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301fi
4302
Matthias Kloseb9621712010-04-24 17:59:49 +00004303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4304$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004305
4306preset_cxx="$CXX"
4307if test -z "$CXX"
4308then
4309 case "$CC" in
4310 gcc) # Extract the first word of "g++", so it can be a program name with args.
4311set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4313$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004314if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004316else
4317 case $CXX in
4318 [\\/]* | ?:[\\/]*)
4319 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4320 ;;
4321 *)
4322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4323for as_dir in notfound
4324do
4325 IFS=$as_save_IFS
4326 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004327 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07004328 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004329 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004331 break 2
4332 fi
4333done
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004336
4337 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
4338 ;;
4339esac
4340fi
4341CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004342if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4344$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004345else
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4347$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004350 ;;
4351 cc) # Extract the first word of "c++", so it can be a program name with args.
4352set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4354$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004355if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004357else
4358 case $CXX in
4359 [\\/]* | ?:[\\/]*)
4360 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4361 ;;
4362 *)
4363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364for as_dir in notfound
4365do
4366 IFS=$as_save_IFS
4367 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07004369 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004370 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004371 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004372 break 2
4373 fi
4374done
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004377
4378 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
4379 ;;
4380esac
4381fi
4382CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004383if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4385$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004386else
Matthias Kloseb9621712010-04-24 17:59:49 +00004387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4388$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004391 ;;
Ned Deilycbfb9a52012-06-23 16:02:19 -07004392 clang|*/clang) # Extract the first word of "clang++", so it can be a program name with args.
4393set dummy clang++; ac_word=$2
4394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4395$as_echo_n "checking for $ac_word... " >&6; }
4396if ${ac_cv_path_CXX+:} false; then :
4397 $as_echo_n "(cached) " >&6
4398else
4399 case $CXX in
4400 [\\/]* | ?:[\\/]*)
4401 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4402 ;;
4403 *)
4404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4405for as_dir in notfound
4406do
4407 IFS=$as_save_IFS
4408 test -z "$as_dir" && as_dir=.
4409 for ac_exec_ext in '' $ac_executable_extensions; do
4410 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4411 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4412 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4413 break 2
4414 fi
4415done
4416 done
4417IFS=$as_save_IFS
4418
4419 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="clang++"
4420 ;;
4421esac
4422fi
4423CXX=$ac_cv_path_CXX
4424if test -n "$CXX"; then
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4426$as_echo "$CXX" >&6; }
4427else
4428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4429$as_echo "no" >&6; }
4430fi
4431
4432 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004433 esac
4434 if test "$CXX" = "notfound"
4435 then
4436 CXX=""
4437 fi
4438fi
4439if test -z "$CXX"
4440then
4441 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4442do
4443 # Extract the first word of "$ac_prog", so it can be a program name with args.
4444set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004447if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004448 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004449else
4450 if test -n "$CXX"; then
4451 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4452else
4453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4454for as_dir in $PATH
4455do
4456 IFS=$as_save_IFS
4457 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004458 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07004459 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004460 ac_cv_prog_CXX="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004461 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004462 break 2
4463 fi
4464done
Matthias Kloseb9621712010-04-24 17:59:49 +00004465 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004467
4468fi
4469fi
4470CXX=$ac_cv_prog_CXX
4471if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4473$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004474else
Matthias Kloseb9621712010-04-24 17:59:49 +00004475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4476$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004477fi
4478
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004479
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004480 test -n "$CXX" && break
4481done
4482test -n "$CXX" || CXX="notfound"
4483
4484 if test "$CXX" = "notfound"
4485 then
4486 CXX=""
4487 fi
4488fi
4489if test "$preset_cxx" != "$CXX"
4490then
Matthias Kloseb9621712010-04-24 17:59:49 +00004491 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004492
4493 By default, distutils will build C++ extension modules with \"$CXX\".
4494 If this is not intended, then set CXX on the configure command line.
4495 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004496$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004497
4498 By default, distutils will build C++ extension modules with \"$CXX\".
4499 If this is not intended, then set CXX on the configure command line.
4500 " >&2;}
4501fi
4502
4503
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4505$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4506save_LDFLAGS="$LDFLAGS"
4507LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004508
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4510/* end confdefs.h. */
4511
4512int
4513main ()
4514{
4515
4516 ;
4517 return 0;
4518}
4519_ACEOF
4520if ac_fn_c_try_link "$LINENO"; then :
4521 NO_AS_NEEDED="-Wl,--no-as-needed"
4522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4523$as_echo "yes" >&6; }
4524else
4525 NO_AS_NEEDED=""
4526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4527$as_echo "no" >&6; }
4528fi
4529rm -f core conftest.err conftest.$ac_objext \
4530 conftest$ac_exeext conftest.$ac_ext
4531LDFLAGS="$save_LDFLAGS"
4532
4533
4534
4535# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004536ac_ext=c
4537ac_cpp='$CPP $CPPFLAGS'
4538ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4539ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4540ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4542$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004543# On Suns, sometimes $CPP names a directory.
4544if test -n "$CPP" && test -d "$CPP"; then
4545 CPP=
4546fi
4547if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004548 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004549 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004550else
Martin v. Löwis11437992002-04-12 09:54:03 +00004551 # Double quotes because CPP needs to be expanded
4552 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4553 do
4554 ac_preproc_ok=false
4555for ac_c_preproc_warn_flag in '' yes
4556do
4557 # Use a header file that comes with gcc, so configuring glibc
4558 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004559 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4560 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004561 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004562 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004564/* end confdefs.h. */
4565#ifdef __STDC__
4566# include <limits.h>
4567#else
4568# include <assert.h>
4569#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004570 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004572if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004573
Matthias Kloseb9621712010-04-24 17:59:49 +00004574else
Martin v. Löwis11437992002-04-12 09:54:03 +00004575 # Broken: fails on valid input.
4576continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004577fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004578rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004580 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004581 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004584#include <ac_nonexistent.h>
4585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004586if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004587 # Broken: success on invalid input.
4588continue
4589else
Martin v. Löwis11437992002-04-12 09:54:03 +00004590 # Passes both tests.
4591ac_preproc_ok=:
4592break
4593fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004594rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004595
4596done
4597# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004598rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004599if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004600 break
4601fi
4602
4603 done
4604 ac_cv_prog_CPP=$CPP
4605
4606fi
4607 CPP=$ac_cv_prog_CPP
4608else
4609 ac_cv_prog_CPP=$CPP
4610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4612$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004613ac_preproc_ok=false
4614for ac_c_preproc_warn_flag in '' yes
4615do
4616 # Use a header file that comes with gcc, so configuring glibc
4617 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004618 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4619 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004620 # On the NeXT, cc -E runs the code through the compiler's parser,
4621 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004623/* end confdefs.h. */
4624#ifdef __STDC__
4625# include <limits.h>
4626#else
4627# include <assert.h>
4628#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004629 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004631if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004632
Matthias Kloseb9621712010-04-24 17:59:49 +00004633else
Martin v. Löwis11437992002-04-12 09:54:03 +00004634 # Broken: fails on valid input.
4635continue
4636fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004637rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004639 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004640 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004643#include <ac_nonexistent.h>
4644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004645if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004646 # Broken: success on invalid input.
4647continue
4648else
Martin v. Löwis11437992002-04-12 09:54:03 +00004649 # Passes both tests.
4650ac_preproc_ok=:
4651break
4652fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004653rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004654
4655done
4656# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004657rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004658if $ac_preproc_ok; then :
4659
Martin v. Löwis11437992002-04-12 09:54:03 +00004660else
Matthias Kloseb9621712010-04-24 17:59:49 +00004661 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004663as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004664See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004665fi
4666
4667ac_ext=c
4668ac_cpp='$CPP $CPPFLAGS'
4669ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4670ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4671ac_compiler_gnu=$ac_cv_c_compiler_gnu
4672
4673
Matthias Kloseb9621712010-04-24 17:59:49 +00004674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4675$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004676if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004677 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004678else
Matthias Kloseb9621712010-04-24 17:59:49 +00004679 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004680 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004681 # Loop through the user's path and test for each of PROGNAME-LIST
4682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004683for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4684do
4685 IFS=$as_save_IFS
4686 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004687 for ac_prog in grep ggrep; do
4688 for ac_exec_ext in '' $ac_executable_extensions; do
4689 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ned Deilycbfb9a52012-06-23 16:02:19 -07004690 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004691# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004692 # Check for GNU $ac_path_GREP
4693case `"$ac_path_GREP" --version 2>&1` in
4694*GNU*)
4695 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4696*)
4697 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004698 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004699 while :
4700 do
4701 cat "conftest.in" "conftest.in" >"conftest.tmp"
4702 mv "conftest.tmp" "conftest.in"
4703 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004704 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004705 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4706 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004707 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004708 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4709 # Best one so far, save it but keep looking for a better one
4710 ac_cv_path_GREP="$ac_path_GREP"
4711 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004712 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004713 # 10*(2^10) chars as input seems more than enough
4714 test $ac_count -gt 10 && break
4715 done
4716 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4717esac
4718
Matthias Kloseb9621712010-04-24 17:59:49 +00004719 $ac_path_GREP_found && break 3
4720 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004721 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004722 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004723IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004725 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 +00004726 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004727else
4728 ac_cv_path_GREP=$GREP
4729fi
4730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4733$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004734 GREP="$ac_cv_path_GREP"
4735
4736
Matthias Kloseb9621712010-04-24 17:59:49 +00004737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4738$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004739if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004740 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004741else
4742 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4743 then ac_cv_path_EGREP="$GREP -E"
4744 else
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004746 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004747 # Loop through the user's path and test for each of PROGNAME-LIST
4748 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004749for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4750do
4751 IFS=$as_save_IFS
4752 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004753 for ac_prog in egrep; do
4754 for ac_exec_ext in '' $ac_executable_extensions; do
4755 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ned Deilycbfb9a52012-06-23 16:02:19 -07004756 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004757# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004758 # Check for GNU $ac_path_EGREP
4759case `"$ac_path_EGREP" --version 2>&1` in
4760*GNU*)
4761 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4762*)
4763 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004764 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004765 while :
4766 do
4767 cat "conftest.in" "conftest.in" >"conftest.tmp"
4768 mv "conftest.tmp" "conftest.in"
4769 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00004770 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004771 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4772 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00004773 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004774 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4775 # Best one so far, save it but keep looking for a better one
4776 ac_cv_path_EGREP="$ac_path_EGREP"
4777 ac_path_EGREP_max=$ac_count
4778 fi
4779 # 10*(2^10) chars as input seems more than enough
4780 test $ac_count -gt 10 && break
4781 done
4782 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4783esac
4784
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 $ac_path_EGREP_found && break 3
4786 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787 done
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004789IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00004790 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004791 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 +00004792 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004793else
4794 ac_cv_path_EGREP=$EGREP
4795fi
4796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004797 fi
4798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4800$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004801 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004802
4803
Matthias Kloseb9621712010-04-24 17:59:49 +00004804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4805$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004806if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004807 $as_echo_n "(cached) " >&6
4808else
4809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004810/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00004811#include <stdlib.h>
4812#include <stdarg.h>
4813#include <string.h>
4814#include <float.h>
4815
4816int
4817main ()
4818{
4819
4820 ;
4821 return 0;
4822}
4823_ACEOF
4824if ac_fn_c_try_compile "$LINENO"; then :
4825 ac_cv_header_stdc=yes
4826else
4827 ac_cv_header_stdc=no
4828fi
4829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4830
4831if test $ac_cv_header_stdc = yes; then
4832 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4834/* end confdefs.h. */
4835#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004836
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004837_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00004839 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004840
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004841else
Matthias Kloseb9621712010-04-24 17:59:49 +00004842 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00004843fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00004844rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004845
Matthias Kloseb9621712010-04-24 17:59:49 +00004846fi
4847
4848if test $ac_cv_header_stdc = yes; then
4849 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4851/* end confdefs.h. */
4852#include <stdlib.h>
4853
4854_ACEOF
4855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4856 $EGREP "free" >/dev/null 2>&1; then :
4857
4858else
4859 ac_cv_header_stdc=no
4860fi
4861rm -f conftest*
4862
4863fi
4864
4865if test $ac_cv_header_stdc = yes; then
4866 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4867 if test "$cross_compiling" = yes; then :
4868 :
4869else
4870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4871/* end confdefs.h. */
4872#include <ctype.h>
4873#include <stdlib.h>
4874#if ((' ' & 0x0FF) == 0x020)
4875# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4876# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4877#else
4878# define ISLOWER(c) \
4879 (('a' <= (c) && (c) <= 'i') \
4880 || ('j' <= (c) && (c) <= 'r') \
4881 || ('s' <= (c) && (c) <= 'z'))
4882# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4883#endif
4884
4885#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4886int
4887main ()
4888{
4889 int i;
4890 for (i = 0; i < 256; i++)
4891 if (XOR (islower (i), ISLOWER (i))
4892 || toupper (i) != TOUPPER (i))
4893 return 2;
4894 return 0;
4895}
4896_ACEOF
4897if ac_fn_c_try_run "$LINENO"; then :
4898
4899else
4900 ac_cv_header_stdc=no
4901fi
4902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4903 conftest.$ac_objext conftest.beam conftest.$ac_ext
4904fi
4905
4906fi
4907fi
4908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4909$as_echo "$ac_cv_header_stdc" >&6; }
4910if test $ac_cv_header_stdc = yes; then
4911
4912$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4913
4914fi
4915
4916# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4917for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4918 inttypes.h stdint.h unistd.h
4919do :
4920 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4921ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4922"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004923if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004924 cat >>confdefs.h <<_ACEOF
4925#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4926_ACEOF
4927
4928fi
4929
4930done
4931
4932
4933
4934 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 +02004935if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004936 MINIX=yes
4937else
4938 MINIX=
4939fi
4940
4941
4942 if test "$MINIX" = yes; then
4943
4944$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4945
4946
4947$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4948
4949
4950$as_echo "#define _MINIX 1" >>confdefs.h
4951
4952 fi
4953
4954
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4956$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004957if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004958 $as_echo_n "(cached) " >&6
4959else
4960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4961/* end confdefs.h. */
4962
Ned Deilycbfb9a52012-06-23 16:02:19 -07004963# define __EXTENSIONS__ 1
4964 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00004965int
4966main ()
4967{
4968
4969 ;
4970 return 0;
4971}
4972_ACEOF
4973if ac_fn_c_try_compile "$LINENO"; then :
4974 ac_cv_safe_to_define___extensions__=yes
4975else
4976 ac_cv_safe_to_define___extensions__=no
4977fi
4978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4979fi
4980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4981$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4982 test $ac_cv_safe_to_define___extensions__ = yes &&
4983 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4984
4985 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4986
4987 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4988
4989 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4990
4991 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4992
4993
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004994
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004995# Check for unsupported systems
4996case $ac_sys_system/$ac_sys_release in
4997atheos*|Linux*/1*)
4998 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4999 echo See README for details.
5000 exit 1;;
5001esac
5002
5003
Matthias Kloseb9621712010-04-24 17:59:49 +00005004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5005$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005006
5007# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005008if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005009 withval=$with_suffix;
5010 case $withval in
5011 no) EXEEXT=;;
5012 yes) EXEEXT=.exe;;
5013 *) EXEEXT=$withval;;
5014 esac
5015fi
5016
Matthias Kloseb9621712010-04-24 17:59:49 +00005017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5018$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005019
5020# Test whether we're running on a non-case-sensitive system, in which
5021# case we give a warning if no ext is given
5022
Matthias Kloseb9621712010-04-24 17:59:49 +00005023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5024$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005025if test ! -d CaseSensitiveTestDir; then
5026mkdir CaseSensitiveTestDir
5027fi
5028
5029if test -d casesensitivetestdir
5030then
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5032$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005033 BUILDEXEEXT=.exe
5034else
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005037 BUILDEXEEXT=$EXEEXT
5038fi
5039rmdir CaseSensitiveTestDir
5040
5041case $MACHDEP in
5042bsdos*)
5043 case $CC in
5044 gcc) CC="$CC -D_HAVE_BSDI";;
5045 esac;;
5046esac
5047
5048case $ac_sys_system in
5049hp*|HP*)
5050 case $CC in
5051 cc|*/cc) CC="$CC -Ae";;
5052 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005053esac
5054
5055
5056
Matthias Kloseb9621712010-04-24 17:59:49 +00005057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5058$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005059if test -z "$LIBRARY"
5060then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005061 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5064$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005065
5066# LDLIBRARY is the name of the library to link against (as opposed to the
5067# name of the library into which to insert object files). BLDLIBRARY is also
5068# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5069# is blank as the main program is not linked directly against LDLIBRARY.
5070# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5071# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5072# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5073# DLLLIBRARY is the shared (i.e., DLL) library.
5074#
5075# RUNSHARED is used to run shared python without installed libraries
5076#
5077# INSTSONAME is the name of the shared library that will be use to install
5078# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005079#
5080# LDVERSION is the shared library version number, normally the Python version
5081# with the ABI build flags appended.
5082
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005083
5084
5085
5086
5087
5088
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005089
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005090LDLIBRARY="$LIBRARY"
5091BLDLIBRARY='$(LDLIBRARY)'
5092INSTSONAME='$(LDLIBRARY)'
5093DLLLIBRARY=''
5094LDLIBRARYDIR=''
5095RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005096LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005097
5098# LINKCC is the command that links the python executable -- default is $(CC).
5099# If CXX is set, and if it is needed to link a main function that was
5100# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5101# python might then depend on the C++ runtime
5102# This is altered for AIX in order to build the export list before
5103# linking.
5104
Matthias Kloseb9621712010-04-24 17:59:49 +00005105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5106$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005107if test -z "$LINKCC"
5108then
5109 LINKCC='$(PURIFY) $(MAINCC)'
5110 case $ac_sys_system in
5111 AIX*)
5112 exp_extra="\"\""
5113 if test $ac_sys_release -ge 5 -o \
5114 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5115 exp_extra="."
5116 fi
5117 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118 QNX*)
5119 # qcc must be used because the other compilers do not
5120 # support -N.
5121 LINKCC=qcc;;
5122 esac
5123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5125$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005126
5127# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5128# make sure we default having it set to "no": this is used by
5129# distutils.unixccompiler to know if it should add --enable-new-dtags
5130# to linker command lines, and failing to detect GNU ld simply results
5131# in the same bahaviour as before.
5132
Matthias Kloseb9621712010-04-24 17:59:49 +00005133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5134$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005135ac_prog=ld
5136if test "$GCC" = yes; then
5137 ac_prog=`$CC -print-prog-name=ld`
5138fi
5139case `"$ac_prog" -V 2>&1 < /dev/null` in
5140 *GNU*)
5141 GNULD=yes;;
5142 *)
5143 GNULD=no;;
5144esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5146$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5149$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005150if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005151 $as_echo_n "(cached) " >&6
5152else
5153 ac_cv_c_inline=no
5154for ac_kw in inline __inline__ __inline; do
5155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5156/* end confdefs.h. */
5157#ifndef __cplusplus
5158typedef int foo_t;
5159static $ac_kw foo_t static_foo () {return 0; }
5160$ac_kw foo_t foo () {return 0; }
5161#endif
5162
5163_ACEOF
5164if ac_fn_c_try_compile "$LINENO"; then :
5165 ac_cv_c_inline=$ac_kw
5166fi
5167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5168 test "$ac_cv_c_inline" != no && break
5169done
5170
5171fi
5172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5173$as_echo "$ac_cv_c_inline" >&6; }
5174
5175case $ac_cv_c_inline in
5176 inline | yes) ;;
5177 *)
5178 case $ac_cv_c_inline in
5179 no) ac_val=;;
5180 *) ac_val=$ac_cv_c_inline;;
5181 esac
5182 cat >>confdefs.h <<_ACEOF
5183#ifndef __cplusplus
5184#define inline $ac_val
5185#endif
5186_ACEOF
5187 ;;
5188esac
5189
5190if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005191
5192$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005193
5194
5195fi
5196
5197
Matthias Kloseb9621712010-04-24 17:59:49 +00005198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5199$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005201if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005202 enableval=$enable_shared;
5203fi
5204
5205
5206if test -z "$enable_shared"
5207then
5208 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005209 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005210 enable_shared="yes";;
5211 *)
5212 enable_shared="no";;
5213 esac
5214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5216$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005217
Matthias Kloseb9621712010-04-24 17:59:49 +00005218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5219$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005220# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005221if test "${enable_profiling+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005222 enableval=$enable_profiling; ac_save_cc="$CC"
5223 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005224 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005225 ac_enable_profiling="no"
5226else
Matthias Kloseb9621712010-04-24 17:59:49 +00005227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005228/* end confdefs.h. */
5229int main() { return 0; }
5230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005231if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005232 ac_enable_profiling="yes"
5233else
Matthias Kloseb9621712010-04-24 17:59:49 +00005234 ac_enable_profiling="no"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5237 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005238fi
5239
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005240 CC="$ac_save_cc"
5241fi
5242
Matthias Kloseb9621712010-04-24 17:59:49 +00005243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5
5244$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005245
5246case "$ac_enable_profiling" in
5247 "yes")
5248 BASECFLAGS="-pg $BASECFLAGS"
5249 LDFLAGS="-pg $LDFLAGS"
5250 ;;
5251esac
5252
Matthias Kloseb9621712010-04-24 17:59:49 +00005253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5254$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005255
5256# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5257# library that we build, but we do not want to link against it (we
5258# will find it with a -framework option). For this reason there is an
5259# extra variable BLDLIBRARY against which Python and the extension
5260# modules are linked, BLDLIBRARY. This is normally the same as
5261# LDLIBRARY, but empty for MacOSX framework builds.
5262if test "$enable_framework"
5263then
5264 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5265 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5266 BLDLIBRARY=''
5267else
5268 BLDLIBRARY='$(LDLIBRARY)'
5269fi
5270
5271# Other platforms follow
5272if test $enable_shared = "yes"; then
5273
Matthias Kloseb9621712010-04-24 17:59:49 +00005274$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005275
5276 case $ac_sys_system in
5277 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005278 LDLIBRARY='libpython$(LDVERSION).dll.a'
5279 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005280 ;;
5281 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005282 LDLIBRARY='libpython$(LDVERSION).so'
5283 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005284 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5285 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005286 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005287 then
5288 PY3LIBRARY=libpython3.so
5289 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005290 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005291 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005292 LDLIBRARY='libpython$(LDVERSION).so'
5293 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005294 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5295 case $ac_sys_system in
5296 FreeBSD*)
5297 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5298 ;;
5299 esac
5300 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005301 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005302 then
5303 PY3LIBRARY=libpython3.so
5304 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005305 ;;
5306 hp*|HP*)
5307 case `uname -m` in
5308 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005309 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310 ;;
5311 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005312 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313 ;;
5314 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005315 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5317 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005318 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005319 LDLIBRARY='libpython$(LDVERSION).dylib'
5320 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5322 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005323 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005324 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005325 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5326 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327
5328 esac
5329else # shared is disabled
5330 case $ac_sys_system in
5331 CYGWIN*)
5332 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005333 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334 ;;
5335 esac
5336fi
5337
Matthias Kloseb9621712010-04-24 17:59:49 +00005338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5339$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340
5341if test -n "$ac_tool_prefix"; then
5342 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5343set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5345$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005346if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005347 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005348else
5349 if test -n "$RANLIB"; then
5350 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5351else
5352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5353for as_dir in $PATH
5354do
5355 IFS=$as_save_IFS
5356 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005357 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07005358 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005360 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005361 break 2
5362 fi
5363done
Matthias Kloseb9621712010-04-24 17:59:49 +00005364 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365IFS=$as_save_IFS
5366
5367fi
5368fi
5369RANLIB=$ac_cv_prog_RANLIB
5370if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5372$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373else
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5375$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376fi
5377
5378
5379fi
5380if test -z "$ac_cv_prog_RANLIB"; then
5381 ac_ct_RANLIB=$RANLIB
5382 # Extract the first word of "ranlib", so it can be a program name with args.
5383set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5385$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005386if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005388else
5389 if test -n "$ac_ct_RANLIB"; then
5390 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5391else
5392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5393for as_dir in $PATH
5394do
5395 IFS=$as_save_IFS
5396 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07005398 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401 break 2
5402 fi
5403done
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405IFS=$as_save_IFS
5406
5407fi
5408fi
5409ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5410if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5412$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413else
Matthias Kloseb9621712010-04-24 17:59:49 +00005414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5415$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005416fi
5417
5418 if test "x$ac_ct_RANLIB" = x; then
5419 RANLIB=":"
5420 else
5421 case $cross_compiling:$ac_tool_warned in
5422yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5424$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425ac_tool_warned=yes ;;
5426esac
5427 RANLIB=$ac_ct_RANLIB
5428 fi
5429else
5430 RANLIB="$ac_cv_prog_RANLIB"
5431fi
5432
5433
5434for ac_prog in ar aal
5435do
5436 # Extract the first word of "$ac_prog", so it can be a program name with args.
5437set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5439$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005440if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442else
5443 if test -n "$AR"; then
5444 ac_cv_prog_AR="$AR" # Let the user override the test.
5445else
5446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5447for as_dir in $PATH
5448do
5449 IFS=$as_save_IFS
5450 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005451 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07005452 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453 ac_cv_prog_AR="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455 break 2
5456 fi
5457done
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005459IFS=$as_save_IFS
5460
5461fi
5462fi
5463AR=$ac_cv_prog_AR
5464if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5466$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005467else
Matthias Kloseb9621712010-04-24 17:59:49 +00005468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5469$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470fi
5471
5472
5473 test -n "$AR" && break
5474done
5475test -n "$AR" || AR="ar"
5476
5477
5478# tweak ARFLAGS only if the user didn't set it on the command line
5479
5480if test -z "$ARFLAGS"
5481then
5482 ARFLAGS="rc"
5483fi
5484
5485
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005486DISABLE_ASDLGEN=""
5487# Extract the first word of "python", so it can be a program name with args.
5488set dummy python; ac_word=$2
5489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5490$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005491if ${ac_cv_prog_HAS_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005492 $as_echo_n "(cached) " >&6
5493else
5494 if test -n "$HAS_PYTHON"; then
5495 ac_cv_prog_HAS_PYTHON="$HAS_PYTHON" # Let the user override the test.
5496else
5497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5498for as_dir in $PATH
5499do
5500 IFS=$as_save_IFS
5501 test -z "$as_dir" && as_dir=.
5502 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07005503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005504 ac_cv_prog_HAS_PYTHON="found"
5505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5506 break 2
5507 fi
5508done
5509 done
5510IFS=$as_save_IFS
5511
5512 test -z "$ac_cv_prog_HAS_PYTHON" && ac_cv_prog_HAS_PYTHON="not-found"
5513fi
5514fi
5515HAS_PYTHON=$ac_cv_prog_HAS_PYTHON
5516if test -n "$HAS_PYTHON"; then
5517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_PYTHON" >&5
5518$as_echo "$HAS_PYTHON" >&6; }
5519else
5520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5521$as_echo "no" >&6; }
5522fi
5523
5524
5525if test $HAS_HG != found -o $HAS_PYTHON != found
5526then
5527 DISABLE_ASDLGEN="@echo hg: $HAS_HG, python: $HAS_PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5528fi
5529
5530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531case $MACHDEP in
5532bsdos*|hp*|HP*)
5533 # install -d does not work on BSDI or HP-UX
5534 if test -z "$INSTALL"
5535 then
5536 INSTALL="${srcdir}/install-sh -c"
5537 fi
5538esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539# Find a good install program. We prefer a C program (faster),
5540# so one script is as good as another. But avoid the broken or
5541# incompatible versions:
5542# SysV /etc/install, /usr/sbin/install
5543# SunOS /usr/etc/install
5544# IRIX /sbin/install
5545# AIX /bin/install
5546# AmigaOS /C/install, which installs bootblocks on floppy discs
5547# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5548# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5549# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5550# OS/2's system install, which has a completely different semantic
5551# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00005552# Reject install programs that cannot install multiple files.
5553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5554$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02005556if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005557 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558else
5559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5560for as_dir in $PATH
5561do
5562 IFS=$as_save_IFS
5563 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005564 # Account for people who put trailing slashes in PATH elements.
5565case $as_dir/ in #((
5566 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00005568 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569 /usr/ucb/* ) ;;
5570 *)
5571 # OSF1 and SCO ODT 3.0 have their own names for install.
5572 # Don't use installbsd from OSF since it installs stuff as root
5573 # by default.
5574 for ac_prog in ginstall scoinst install; do
5575 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07005576 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005577 if test $ac_prog = install &&
5578 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5579 # AIX install. It has an incompatible calling convention.
5580 :
5581 elif test $ac_prog = install &&
5582 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5583 # program-specific install script used by HP pwplus--don't use.
5584 :
5585 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005586 rm -rf conftest.one conftest.two conftest.dir
5587 echo one > conftest.one
5588 echo two > conftest.two
5589 mkdir conftest.dir
5590 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5591 test -s conftest.one && test -s conftest.two &&
5592 test -s conftest.dir/conftest.one &&
5593 test -s conftest.dir/conftest.two
5594 then
5595 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5596 break 3
5597 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 fi
5599 fi
5600 done
5601 done
5602 ;;
5603esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005604
5605 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606IFS=$as_save_IFS
5607
Matthias Kloseb9621712010-04-24 17:59:49 +00005608rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609
5610fi
5611 if test "${ac_cv_path_install+set}" = set; then
5612 INSTALL=$ac_cv_path_install
5613 else
5614 # As a last resort, use the slow shell script. Don't cache a
5615 # value for INSTALL within a source directory, because that will
5616 # break other packages using the cache if that directory is
5617 # removed, or if the value is a relative name.
5618 INSTALL=$ac_install_sh
5619 fi
5620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5622$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623
5624# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5625# It thinks the first close brace ends the variable substitution.
5626test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5627
5628test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5629
5630test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5631
Matthias Klose93a0ef12012-03-15 18:08:34 +01005632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5633$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5634if test -z "$MKDIR_P"; then
5635 if ${ac_cv_path_mkdir+:} false; then :
5636 $as_echo_n "(cached) " >&6
5637else
5638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5639for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5640do
5641 IFS=$as_save_IFS
5642 test -z "$as_dir" && as_dir=.
5643 for ac_prog in mkdir gmkdir; do
5644 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07005645 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01005646 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5647 'mkdir (GNU coreutils) '* | \
5648 'mkdir (coreutils) '* | \
5649 'mkdir (fileutils) '4.1*)
5650 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5651 break 3;;
5652 esac
5653 done
5654 done
5655 done
5656IFS=$as_save_IFS
5657
5658fi
5659
5660 test -d ./--version && rmdir ./--version
5661 if test "${ac_cv_path_mkdir+set}" = set; then
5662 MKDIR_P="$ac_cv_path_mkdir -p"
5663 else
5664 # As a last resort, use the slow shell script. Don't cache a
5665 # value for MKDIR_P within a source directory, because that will
5666 # break other packages using the cache if that directory is
5667 # removed, or if the value is a relative name.
5668 MKDIR_P="$ac_install_sh -d"
5669 fi
5670fi
5671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5672$as_echo "$MKDIR_P" >&6; }
5673
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674
5675# Not every filesystem supports hard links
5676
5677if test -z "$LN" ; then
5678 case $ac_sys_system in
5679 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 *) LN=ln;;
5681 esac
5682fi
5683
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005684# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005685
5686ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00005687
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00005689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5690$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691
5692# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005693if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694 withval=$with_pydebug;
5695if test "$withval" != no
5696then
5697
Matthias Kloseb9621712010-04-24 17:59:49 +00005698$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5701$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005703 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00005704else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5705$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706fi
5707else
Matthias Kloseb9621712010-04-24 17:59:49 +00005708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5709$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710fi
5711
5712
5713# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5714# merged with this chunk of code?
5715
5716# Optimizer/debugger flags
5717# ------------------------
5718# (The following bit of code is complicated enough - please keep things
5719# indented properly. Just pretend you're editing Python code. ;-)
5720
5721# There are two parallel sets of case statements below, one that checks to
5722# see if OPT was set and one that does BASECFLAGS setting based upon
5723# compiler and platform. BASECFLAGS tweaks need to be made even if the
5724# user set OPT.
5725
5726# tweak OPT based on compiler and platform, only if the user didn't set
5727# it on the command line
5728
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00005729if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730then
5731 case $GCC in
5732 yes)
5733 if test "$CC" != 'g++' ; then
5734 STRICT_PROTO="-Wstrict-prototypes"
5735 fi
5736 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5737 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5738 WRAP="-fwrapv"
5739 fi
Stefan Krah962055d2011-09-14 15:14:08 +02005740
5741 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01005742 case $CC in
5743 *clang*) WRAP="-fwrapv"
5744 ;;
5745 esac
Stefan Krah962055d2011-09-14 15:14:08 +02005746
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747 case $ac_cv_prog_cc_g in
5748 yes)
5749 if test "$Py_DEBUG" = 'true' ; then
5750 # Optimization messes up debuggers, so turn it off for
5751 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00005752 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753 else
5754 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5755 fi
5756 ;;
5757 *)
5758 OPT="-O3 -Wall $STRICT_PROTO"
5759 ;;
5760 esac
5761 case $ac_sys_system in
5762 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5763 ;;
5764 esac
5765 ;;
5766
5767 *)
5768 OPT="-O"
5769 ;;
5770 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771fi
5772
5773
5774
5775# The -arch flags for universal builds on OSX
5776UNIVERSAL_ARCH_FLAGS=
5777
5778
5779# tweak BASECFLAGS based on compiler and platform
5780case $GCC in
5781yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005782 # Python doesn't violate C99 aliasing rules, but older versions of
5783 # GCC produce warnings for legal Python code. Enable
5784 # -fno-strict-aliasing on versions of GCC that support but produce
5785 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00005786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
5787$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 ac_save_cc="$CC"
5789 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005790 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005791 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005792 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005793else
Matthias Kloseb9621712010-04-24 17:59:49 +00005794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005796
Matthias Kloseb159a552010-04-25 21:00:44 +00005797
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005798int
5799main ()
5800{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005801
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005802 ;
5803 return 0;
5804}
Matthias Kloseb159a552010-04-25 21:00:44 +00005805
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005807if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005808
5809 CC="$ac_save_cc -fstrict-aliasing"
5810 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
5811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005812/* end confdefs.h. */
5813
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005814 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005815int
5816main ()
5817{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00005818double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005819 ;
5820 return 0;
5821}
Matthias Kloseb159a552010-04-25 21:00:44 +00005822
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005824if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00005825
5826 ac_cv_no_strict_aliasing=no
5827
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828else
Matthias Kloseb159a552010-04-25 21:00:44 +00005829
5830 ac_cv_no_strict_aliasing=yes
5831
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005832fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00005834
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005835else
Matthias Kloseb159a552010-04-25 21:00:44 +00005836
5837 ac_cv_no_strict_aliasing=no
5838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00005840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005841fi
5842
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005843 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00005845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
5846$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00005847 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848 then
5849 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5850 fi
5851
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
5853$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
5854 ac_save_cc="$CC"
5855 CC="$CC -Wunused-result -Werror"
5856 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02005857 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04005858 $as_echo_n "(cached) " >&6
5859else
5860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5861/* end confdefs.h. */
5862
5863
5864int
5865main ()
5866{
5867
5868 ;
5869 return 0;
5870}
5871
5872_ACEOF
5873if ac_fn_c_try_compile "$LINENO"; then :
5874
5875 ac_cv_disable_unused_result_warning=yes
5876
5877else
5878
5879 ac_cv_disable_unused_result_warning=no
5880
5881fi
5882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5883fi
5884
5885 CFLAGS="$save_CFLAGS"
5886 CC="$ac_save_cc"
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
5888$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
5889
5890 if test $ac_cv_disable_unused_result_warning = yes
5891 then
5892 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
5893 fi
5894
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5896 # support. Without this, treatment of subnormals doesn't follow
5897 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01005898 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 alpha*)
5900 BASECFLAGS="$BASECFLAGS -mieee"
5901 ;;
5902 esac
5903
5904 case $ac_sys_system in
5905 SCO_SV*)
5906 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5907 ;;
5908 # is there any other compiler on Darwin besides gcc?
5909 Darwin*)
5910 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5911 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00005912 if test "${CC}" = gcc
5913 then
Matthias Kloseb9621712010-04-24 17:59:49 +00005914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
5915$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005916 case "${UNIVERSALSDK}" in
5917 */MacOSX10.4u.sdk)
5918 # Build using 10.4 SDK, force usage of gcc when the
5919 # compiler is gcc, otherwise the user will get very
5920 # confusing error messages when building on OSX 10.6
5921 CC=gcc-4.0
5922 CPP=cpp-4.0
5923 ;;
5924 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5926$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00005927 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928
5929
5930 if test "${enable_universalsdk}"; then
5931 UNIVERSAL_ARCH_FLAGS=""
5932 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5933 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5934 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00005935 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5937 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005938 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005939 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940
5941 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5942 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005943 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005944 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005946 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5947 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005948 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005949 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005950
5951 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5952 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00005953 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00005954 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005955
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005957 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 +00005958
5959 fi
5960
5961
Ronald Oussoren666028b2010-04-18 19:07:43 +00005962 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5963 if test "${UNIVERSALSDK}" != "/"
5964 then
5965 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5966 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00005967 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968 fi
5969 fi
5970
5971 # Calculate the right deployment target for this build.
5972 #
5973 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5974 if test ${cur_target} '>' 10.2; then
5975 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005976 if test ${enable_universalsdk}; then
5977 if test "${UNIVERSAL_ARCHS}" = "all"; then
5978 # Ensure that the default platform for a
5979 # 4-way universal build is OSX 10.5,
5980 # that's the first OS release where
5981 # 4-way builds make sense.
5982 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005983
5984 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5985 cur_target='10.5'
5986
5987 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5988 cur_target='10.5'
5989
5990 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5991 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005992 fi
5993 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00005994 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005995 # On Intel macs default to a deployment
5996 # target of 10.4, that's the first OSX
5997 # release with Intel support.
5998 cur_target="10.4"
5999 fi
6000 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001 fi
6002 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6003
6004 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6005 # environment with a value that is the same as what we'll use
6006 # in the Makefile to ensure that we'll get the same compiler
6007 # environment during configure and build time.
6008 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6009 export MACOSX_DEPLOYMENT_TARGET
6010 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6011
6012 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013 esac
6014 ;;
6015
6016*)
6017 case $ac_sys_system in
6018 OpenUNIX*|UnixWare*)
6019 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6020 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021 SCO_SV*)
6022 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6023 ;;
6024 esac
6025 ;;
6026esac
6027
6028if test "$Py_DEBUG" = 'true'; then
6029 :
6030else
6031 OPT="-DNDEBUG $OPT"
6032fi
6033
6034if test "$ac_arch_flags"
6035then
6036 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6037fi
6038
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039# Check whether GCC supports PyArg_ParseTuple format
6040if test "$GCC" = "yes"
6041then
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6043$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044 save_CFLAGS=$CFLAGS
6045 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047/* end confdefs.h. */
6048
6049 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050int
6051main ()
6052{
6053
6054 ;
6055 return 0;
6056}
Matthias Kloseb159a552010-04-25 21:00:44 +00006057
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006059if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060
Matthias Kloseb159a552010-04-25 21:00:44 +00006061
Matthias Kloseb9621712010-04-24 17:59:49 +00006062$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063
Matthias Kloseb159a552010-04-25 21:00:44 +00006064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006065$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006066
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006067else
Matthias Kloseb159a552010-04-25 21:00:44 +00006068
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006070$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071
6072fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6074 CFLAGS=$save_CFLAGS
6075fi
6076
6077# On some compilers, pthreads are available without further options
6078# (e.g. MacOS X). On some of these systems, the compiler will not
6079# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6080# So we have to see first whether pthreads are available without
6081# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6083$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006084if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086else
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088 ac_cv_pthread_is_default=no
6089else
Matthias Kloseb9621712010-04-24 17:59:49 +00006090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091/* end confdefs.h. */
6092
6093#include <pthread.h>
6094
6095void* routine(void* p){return NULL;}
6096
6097int main(){
6098 pthread_t p;
6099 if(pthread_create(&p,NULL,routine,NULL)!=0)
6100 return 1;
6101 (void)pthread_detach(p);
6102 return 0;
6103}
6104
6105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006106if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006107
6108 ac_cv_pthread_is_default=yes
6109 ac_cv_kthread=no
6110 ac_cv_pthread=no
6111
6112else
Matthias Kloseb9621712010-04-24 17:59:49 +00006113 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6116 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006117fi
6118
6119
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006120fi
6121
Matthias Kloseb9621712010-04-24 17:59:49 +00006122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6123$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006124
6125
6126if test $ac_cv_pthread_is_default = yes
6127then
6128 ac_cv_kpthread=no
6129else
6130# -Kpthread, if available, provides the right #defines
6131# and linker options to make pthread_create available
6132# Some compilers won't report that they do not support -Kpthread,
6133# so we need to run a program to see whether it really made the
6134# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6136$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006137if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006138 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006139else
6140 ac_save_cc="$CC"
6141CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006142if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143 ac_cv_kpthread=no
6144else
Matthias Kloseb9621712010-04-24 17:59:49 +00006145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146/* end confdefs.h. */
6147
6148#include <pthread.h>
6149
6150void* routine(void* p){return NULL;}
6151
6152int main(){
6153 pthread_t p;
6154 if(pthread_create(&p,NULL,routine,NULL)!=0)
6155 return 1;
6156 (void)pthread_detach(p);
6157 return 0;
6158}
6159
6160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006161if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162 ac_cv_kpthread=yes
6163else
Matthias Kloseb9621712010-04-24 17:59:49 +00006164 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168fi
6169
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170CC="$ac_save_cc"
6171fi
6172
Matthias Kloseb9621712010-04-24 17:59:49 +00006173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6174$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175fi
6176
6177if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6178then
6179# -Kthread, if available, provides the right #defines
6180# and linker options to make pthread_create available
6181# Some compilers won't report that they do not support -Kthread,
6182# so we need to run a program to see whether it really made the
6183# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6185$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006186if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006187 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188else
6189 ac_save_cc="$CC"
6190CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006191if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192 ac_cv_kthread=no
6193else
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195/* end confdefs.h. */
6196
6197#include <pthread.h>
6198
6199void* routine(void* p){return NULL;}
6200
6201int main(){
6202 pthread_t p;
6203 if(pthread_create(&p,NULL,routine,NULL)!=0)
6204 return 1;
6205 (void)pthread_detach(p);
6206 return 0;
6207}
6208
6209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006210if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211 ac_cv_kthread=yes
6212else
Matthias Kloseb9621712010-04-24 17:59:49 +00006213 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6216 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217fi
6218
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219CC="$ac_save_cc"
6220fi
6221
Matthias Kloseb9621712010-04-24 17:59:49 +00006222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6223$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006224fi
6225
6226if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6227then
6228# -pthread, if available, provides the right #defines
6229# and linker options to make pthread_create available
6230# Some compilers won't report that they do not support -pthread,
6231# so we need to run a program to see whether it really made the
6232# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6234$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006235if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006236 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237else
6238 ac_save_cc="$CC"
6239CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006240if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006241 ac_cv_pthread=no
6242else
Matthias Kloseb9621712010-04-24 17:59:49 +00006243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244/* end confdefs.h. */
6245
6246#include <pthread.h>
6247
6248void* routine(void* p){return NULL;}
6249
6250int main(){
6251 pthread_t p;
6252 if(pthread_create(&p,NULL,routine,NULL)!=0)
6253 return 1;
6254 (void)pthread_detach(p);
6255 return 0;
6256}
6257
6258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006259if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260 ac_cv_pthread=yes
6261else
Matthias Kloseb9621712010-04-24 17:59:49 +00006262 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6265 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266fi
6267
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268CC="$ac_save_cc"
6269fi
6270
Matthias Kloseb9621712010-04-24 17:59:49 +00006271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6272$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273fi
6274
6275# If we have set a CC compiler flag for thread support then
6276# check if it works for CXX, too.
6277ac_cv_cxx_thread=no
6278if test ! -z "$CXX"
6279then
Matthias Kloseb9621712010-04-24 17:59:49 +00006280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6281$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282ac_save_cxx="$CXX"
6283
6284if test "$ac_cv_kpthread" = "yes"
6285then
6286 CXX="$CXX -Kpthread"
6287 ac_cv_cxx_thread=yes
6288elif test "$ac_cv_kthread" = "yes"
6289then
6290 CXX="$CXX -Kthread"
6291 ac_cv_cxx_thread=yes
6292elif test "$ac_cv_pthread" = "yes"
6293then
6294 CXX="$CXX -pthread"
6295 ac_cv_cxx_thread=yes
6296fi
6297
6298if test $ac_cv_cxx_thread = yes
6299then
6300 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6301 $CXX -c conftest.$ac_ext 2>&5
6302 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6303 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6304 then
6305 ac_cv_cxx_thread=yes
6306 else
6307 ac_cv_cxx_thread=no
6308 fi
6309 rm -fr conftest*
6310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6312$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313fi
6314CXX="$ac_save_cxx"
6315
6316
6317# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6319$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006320if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322else
Matthias Kloseb9621712010-04-24 17:59:49 +00006323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324/* end confdefs.h. */
6325#include <stdlib.h>
6326#include <stdarg.h>
6327#include <string.h>
6328#include <float.h>
6329
6330int
6331main ()
6332{
6333
6334 ;
6335 return 0;
6336}
6337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006338if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339 ac_cv_header_stdc=yes
6340else
Matthias Kloseb9621712010-04-24 17:59:49 +00006341 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6344
6345if test $ac_cv_header_stdc = yes; then
6346 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006348/* end confdefs.h. */
6349#include <string.h>
6350
6351_ACEOF
6352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006353 $EGREP "memchr" >/dev/null 2>&1; then :
6354
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006355else
6356 ac_cv_header_stdc=no
6357fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006358rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359
6360fi
6361
6362if test $ac_cv_header_stdc = yes; then
6363 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365/* end confdefs.h. */
6366#include <stdlib.h>
6367
6368_ACEOF
6369if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006370 $EGREP "free" >/dev/null 2>&1; then :
6371
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006372else
6373 ac_cv_header_stdc=no
6374fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006375rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376
6377fi
6378
6379if test $ac_cv_header_stdc = yes; then
6380 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006381 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382 :
6383else
Matthias Kloseb9621712010-04-24 17:59:49 +00006384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385/* end confdefs.h. */
6386#include <ctype.h>
6387#include <stdlib.h>
6388#if ((' ' & 0x0FF) == 0x020)
6389# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6390# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6391#else
6392# define ISLOWER(c) \
6393 (('a' <= (c) && (c) <= 'i') \
6394 || ('j' <= (c) && (c) <= 'r') \
6395 || ('s' <= (c) && (c) <= 'z'))
6396# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6397#endif
6398
6399#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6400int
6401main ()
6402{
6403 int i;
6404 for (i = 0; i < 256; i++)
6405 if (XOR (islower (i), ISLOWER (i))
6406 || toupper (i) != TOUPPER (i))
6407 return 2;
6408 return 0;
6409}
6410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006411if ac_fn_c_try_run "$LINENO"; then :
6412
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006413else
Matthias Kloseb9621712010-04-24 17:59:49 +00006414 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6417 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006418fi
6419
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420fi
6421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6423$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424if test $ac_cv_header_stdc = yes; then
6425
Matthias Kloseb9621712010-04-24 17:59:49 +00006426$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427
6428fi
6429
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006430for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006431fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006432ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006433sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006434unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006435poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006436sys/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 +01006437sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006438sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006439sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006440sys/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 -07006441libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006442bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006443do :
6444 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6445ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006446if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006447 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006448#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006449_ACEOF
6450
6451fi
6452
Guido van Rossum627b2d71993-12-24 10:39:16 +00006453done
6454
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006455ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006456for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006457 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6459$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006460if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006461 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006462else
Matthias Kloseb9621712010-04-24 17:59:49 +00006463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006464/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006465#include <sys/types.h>
6466#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006467
Martin v. Löwis11437992002-04-12 09:54:03 +00006468int
6469main ()
6470{
6471if ((DIR *) 0)
6472return 0;
6473 ;
6474 return 0;
6475}
6476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006477if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006478 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006479else
Matthias Kloseb9621712010-04-24 17:59:49 +00006480 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006484eval ac_res=\$$as_ac_Header
6485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6486$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006487if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006488 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006489#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006490_ACEOF
6491
6492ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006493fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006494
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006495done
6496# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6497if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6499$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006500if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006501 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006502else
Martin v. Löwis11437992002-04-12 09:54:03 +00006503 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006507/* Override any GCC internal prototype to avoid an error.
6508 Use char because int might match the return type of a GCC
6509 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006510#ifdef __cplusplus
6511extern "C"
6512#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006513char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006514int
6515main ()
6516{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006517return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006518 ;
6519 return 0;
6520}
6521_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006522for ac_lib in '' dir; do
6523 if test -z "$ac_lib"; then
6524 ac_res="none required"
6525 else
6526 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006527 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006528 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006529 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006530 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006532rm -f core conftest.err conftest.$ac_objext \
6533 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006534 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006535 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006537done
Victor Stinnere0be4232011-10-25 13:06:09 +02006538if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006539
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006540else
6541 ac_cv_search_opendir=no
6542fi
6543rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006544LIBS=$ac_func_search_save_LIBS
6545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6547$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006548ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006549if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006550 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006551
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006552fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006553
Michael W. Hudson54241132001-12-07 15:38:26 +00006554else
Matthias Kloseb9621712010-04-24 17:59:49 +00006555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6556$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006557if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006558 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006559else
6560 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006562/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006564/* Override any GCC internal prototype to avoid an error.
6565 Use char because int might match the return type of a GCC
6566 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006567#ifdef __cplusplus
6568extern "C"
6569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006570char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006571int
6572main ()
6573{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006574return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006575 ;
6576 return 0;
6577}
6578_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006579for ac_lib in '' x; do
6580 if test -z "$ac_lib"; then
6581 ac_res="none required"
6582 else
6583 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006584 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006585 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006586 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006587 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006589rm -f core conftest.err conftest.$ac_objext \
6590 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02006591 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006592 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006594done
Victor Stinnere0be4232011-10-25 13:06:09 +02006595if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006597else
6598 ac_cv_search_opendir=no
6599fi
6600rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006601LIBS=$ac_func_search_save_LIBS
6602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6604$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006605ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00006606if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006607 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006608
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006609fi
6610
6611fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006612
Matthias Kloseb9621712010-04-24 17:59:49 +00006613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6614$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006615if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006616 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006617else
Matthias Kloseb9621712010-04-24 17:59:49 +00006618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006619/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006620#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006621int
6622main ()
6623{
6624return makedev(0, 0);
6625 ;
6626 return 0;
6627}
6628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006629if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006630 ac_cv_header_sys_types_h_makedev=yes
6631else
Matthias Kloseb9621712010-04-24 17:59:49 +00006632 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006634rm -f core conftest.err conftest.$ac_objext \
6635 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006636
6637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
6639$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006640
6641if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006642ac_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 +02006643if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006644
Matthias Kloseb9621712010-04-24 17:59:49 +00006645$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006646
6647fi
6648
6649
6650
6651 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006652 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 +02006653if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006654
Matthias Kloseb9621712010-04-24 17:59:49 +00006655$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006656
6657fi
6658
6659
6660 fi
6661fi
6662
Michael W. Hudson54241132001-12-07 15:38:26 +00006663
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006664# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
6665for ac_header in net/if.h
6666do :
6667 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
6668#ifdef STDC_HEADERS
6669# include <stdlib.h>
6670# include <stddef.h>
6671#else
6672# ifdef HAVE_STDLIB_H
6673# include <stdlib.h>
6674# endif
6675#endif
6676#ifdef HAVE_SYS_SOCKET_H
6677# include <sys/socket.h>
6678#endif
6679
6680"
Victor Stinnere0be4232011-10-25 13:06:09 +02006681if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006682 cat >>confdefs.h <<_ACEOF
6683#define HAVE_NET_IF_H 1
6684_ACEOF
6685
6686fi
6687
6688done
6689
6690
6691
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006692# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006693for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006694do :
6695 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006696#ifdef HAVE_CURSES_H
6697#include <curses.h>
6698#endif
6699
Matthias Kloseb9621712010-04-24 17:59:49 +00006700"
Victor Stinnere0be4232011-10-25 13:06:09 +02006701if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006702 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006703#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006704_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006705
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006706fi
6707
6708done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006709
6710
Martin v. Löwis11017b12006-01-14 18:12:57 +00006711# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00006712for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006713do :
6714 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 +00006715#ifdef HAVE_ASM_TYPES_H
6716#include <asm/types.h>
6717#endif
6718#ifdef HAVE_SYS_SOCKET_H
6719#include <sys/socket.h>
6720#endif
6721
Matthias Kloseb9621712010-04-24 17:59:49 +00006722"
Victor Stinnere0be4232011-10-25 13:06:09 +02006723if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00006724 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006725#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006726_ACEOF
6727
6728fi
6729
6730done
6731
6732
Charles-François Natali47413c12011-10-06 19:47:44 +02006733# On Linux, can.h and can/raw.h require sys/socket.h
6734for ac_header in linux/can.h linux/can/raw.h
6735do :
6736 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6737ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
6738#ifdef HAVE_SYS_SOCKET_H
6739#include <sys/socket.h>
6740#endif
6741
6742"
6743if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6744 cat >>confdefs.h <<_ACEOF
6745#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6746_ACEOF
6747
6748fi
6749
6750done
6751
6752
Guido van Rossum627b2d71993-12-24 10:39:16 +00006753# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006754was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00006755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
6756$as_echo_n "checking for clock_t in time.h... " >&6; }
6757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006758/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006759#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006760
6761_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006763 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00006764 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006765else
Martin v. Löwis11437992002-04-12 09:54:03 +00006766
6767
Matthias Kloseb9621712010-04-24 17:59:49 +00006768$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006769
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006770
Guido van Rossum627b2d71993-12-24 10:39:16 +00006771fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006772rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006773
Matthias Kloseb9621712010-04-24 17:59:49 +00006774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
6775$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006776
Matthias Kloseb9621712010-04-24 17:59:49 +00006777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
6778$as_echo_n "checking for makedev... " >&6; }
6779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006780/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00006781
Jesus Cea740f53a2010-04-28 11:35:30 +00006782#if defined(MAJOR_IN_MKDEV)
6783#include <sys/mkdev.h>
6784#elif defined(MAJOR_IN_SYSMACROS)
6785#include <sys/sysmacros.h>
6786#else
6787#include <sys/types.h>
6788#endif
6789
Neal Norwitz11690112002-07-30 01:08:28 +00006790int
6791main ()
6792{
Jesus Cea740f53a2010-04-28 11:35:30 +00006793
6794 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00006795 ;
6796 return 0;
6797}
Matthias Kloseb159a552010-04-25 21:00:44 +00006798
Neal Norwitz11690112002-07-30 01:08:28 +00006799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006800if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00006801 ac_cv_has_makedev=yes
6802else
Matthias Kloseb9621712010-04-24 17:59:49 +00006803 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006805rm -f core conftest.err conftest.$ac_objext \
6806 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
6808$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006809if test "$ac_cv_has_makedev" = "yes"; then
6810
Matthias Kloseb9621712010-04-24 17:59:49 +00006811$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00006812
6813fi
6814
Martin v. Löwis399a6892002-10-04 10:22:02 +00006815# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6816# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6817# defined, but the compiler does not support pragma redefine_extname,
6818# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6819# structures (such as rlimit64) without declaring them. As a
6820# work-around, disable LFS on such configurations
6821
6822use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00006823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
6824$as_echo_n "checking Solaris LFS bug... " >&6; }
6825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006826/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006827
6828#define _LARGEFILE_SOURCE 1
6829#define _FILE_OFFSET_BITS 64
6830#include <sys/resource.h>
6831
Martin v. Löwis399a6892002-10-04 10:22:02 +00006832int
6833main ()
6834{
6835struct rlimit foo;
6836 ;
6837 return 0;
6838}
6839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006840if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00006841 sol_lfs_bug=no
6842else
Matthias Kloseb9621712010-04-24 17:59:49 +00006843 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00006846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
6847$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006848if test "$sol_lfs_bug" = "yes"; then
6849 use_lfs=no
6850fi
6851
6852if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006853# Two defines needed to enable largefile support on various platforms
6854# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00006855case $ac_sys_system/$ac_sys_release in
6856AIX*)
6857
6858$as_echo "#define _LARGE_FILES 1" >>confdefs.h
6859
6860 ;;
6861esac
Guido van Rossum810cc512001-09-09 23:51:39 +00006862
Matthias Kloseb9621712010-04-24 17:59:49 +00006863$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006864
6865
Matthias Kloseb9621712010-04-24 17:59:49 +00006866$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00006867
Martin v. Löwis399a6892002-10-04 10:22:02 +00006868fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006869
Guido van Rossum84e7b241996-08-19 21:59:00 +00006870# Add some code to confdefs.h so that the test for off_t works on SCO
6871cat >> confdefs.h <<\EOF
6872#if defined(SCO_DS)
6873#undef _OFF_T
6874#endif
6875EOF
6876
Guido van Rossumef2255b2000-03-10 22:30:29 +00006877# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00006878ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006879if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006880
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006881else
Martin v. Löwis11437992002-04-12 09:54:03 +00006882
6883cat >>confdefs.h <<_ACEOF
6884#define mode_t int
6885_ACEOF
6886
6887fi
6888
Matthias Kloseb9621712010-04-24 17:59:49 +00006889ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006890if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006891
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006892else
Martin v. Löwis11437992002-04-12 09:54:03 +00006893
6894cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006895#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006896_ACEOF
6897
6898fi
6899
Matthias Kloseb9621712010-04-24 17:59:49 +00006900ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006901if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006902
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006903else
Martin v. Löwis11437992002-04-12 09:54:03 +00006904
6905cat >>confdefs.h <<_ACEOF
6906#define pid_t int
6907_ACEOF
6908
6909fi
6910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006911
Martin v. Löwis11437992002-04-12 09:54:03 +00006912cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00006913#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00006914_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006915
Matthias Kloseb9621712010-04-24 17:59:49 +00006916ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02006917if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00006918
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006919else
Martin v. Löwis11437992002-04-12 09:54:03 +00006920
6921cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006922#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006923_ACEOF
6924
6925fi
6926
Matthias Kloseb9621712010-04-24 17:59:49 +00006927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
6928$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006929if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006930 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006931else
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006933/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006934#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006935
6936_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006939 ac_cv_type_uid_t=yes
6940else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006941 ac_cv_type_uid_t=no
6942fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006943rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006944
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
6947$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006948if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006949
Matthias Kloseb9621712010-04-24 17:59:49 +00006950$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00006951
6952
Matthias Kloseb9621712010-04-24 17:59:49 +00006953$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006954
6955fi
6956
Matthias Kloseb9621712010-04-24 17:59:49 +00006957ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
6958case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006959 no|yes) ;; #(
6960 *)
6961
Matthias Kloseb9621712010-04-24 17:59:49 +00006962$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006963
6964
6965cat >>confdefs.h <<_ACEOF
6966#define uint32_t $ac_cv_c_uint32_t
6967_ACEOF
6968;;
6969 esac
6970
Matthias Kloseb9621712010-04-24 17:59:49 +00006971ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
6972case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006973 no|yes) ;; #(
6974 *)
6975
Matthias Kloseb9621712010-04-24 17:59:49 +00006976$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00006977
6978
6979cat >>confdefs.h <<_ACEOF
6980#define uint64_t $ac_cv_c_uint64_t
6981_ACEOF
6982;;
6983 esac
6984
Matthias Kloseb9621712010-04-24 17:59:49 +00006985ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
6986case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006987 no|yes) ;; #(
6988 *)
6989
6990cat >>confdefs.h <<_ACEOF
6991#define int32_t $ac_cv_c_int32_t
6992_ACEOF
6993;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00006994esac
6995
Matthias Kloseb9621712010-04-24 17:59:49 +00006996ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
6997case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00006998 no|yes) ;; #(
6999 *)
7000
7001cat >>confdefs.h <<_ACEOF
7002#define int64_t $ac_cv_c_int64_t
7003_ACEOF
7004;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007005esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007006
Matthias Kloseb9621712010-04-24 17:59:49 +00007007ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007008if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007009
Matthias Kloseb9621712010-04-24 17:59:49 +00007010$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007011
7012fi
7013
Stefan Krah1919b7e2012-03-21 18:25:23 +01007014ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7015if test "x$ac_cv_type___uint128_t" = xyes; then :
7016
7017$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7018
7019fi
7020
Jack Jansendd19cf82001-12-06 22:36:17 +00007021
Michael W. Hudson54241132001-12-07 15:38:26 +00007022# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007023# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007024# The cast to long int works around a bug in the HP C Compiler
7025# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7026# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7027# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7029$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007030if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007032else
Matthias Kloseb9621712010-04-24 17:59:49 +00007033 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 +00007034
Martin v. Löwis11437992002-04-12 09:54:03 +00007035else
Matthias Kloseb9621712010-04-24 17:59:49 +00007036 if test "$ac_cv_type_int" = yes; then
7037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7038$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007039as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007040See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007041 else
7042 ac_cv_sizeof_int=0
7043 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007045
Martin v. Löwis11437992002-04-12 09:54:03 +00007046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7048$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007049
7050
7051
Martin v. Löwis11437992002-04-12 09:54:03 +00007052cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007053#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007054_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007055
7056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007057# The cast to long int works around a bug in the HP C Compiler
7058# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7059# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7060# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7062$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007063if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007064 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007065else
Matthias Kloseb9621712010-04-24 17:59:49 +00007066 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 +00007067
Martin v. Löwis11437992002-04-12 09:54:03 +00007068else
Matthias Kloseb9621712010-04-24 17:59:49 +00007069 if test "$ac_cv_type_long" = yes; then
7070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007072as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007073See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007074 else
7075 ac_cv_sizeof_long=0
7076 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007078
Martin v. Löwis11437992002-04-12 09:54:03 +00007079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7081$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082
7083
7084
Martin v. Löwis11437992002-04-12 09:54:03 +00007085cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007086#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007087_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007088
7089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007090# The cast to long int works around a bug in the HP C Compiler
7091# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7092# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7093# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7095$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007096if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007097 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007098else
Matthias Kloseb9621712010-04-24 17:59:49 +00007099 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 +00007100
Martin v. Löwis11437992002-04-12 09:54:03 +00007101else
Matthias Kloseb9621712010-04-24 17:59:49 +00007102 if test "$ac_cv_type_void_p" = yes; then
7103 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7104$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007105as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007106See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007107 else
7108 ac_cv_sizeof_void_p=0
7109 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007111
Martin v. Löwis11437992002-04-12 09:54:03 +00007112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7114$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007115
7116
7117
Martin v. Löwis11437992002-04-12 09:54:03 +00007118cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007119#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007120_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007121
7122
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007123# The cast to long int works around a bug in the HP C Compiler
7124# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7125# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7126# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7128$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007129if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007130 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007131else
Matthias Kloseb9621712010-04-24 17:59:49 +00007132 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 +00007133
Martin v. Löwis11437992002-04-12 09:54:03 +00007134else
Matthias Kloseb9621712010-04-24 17:59:49 +00007135 if test "$ac_cv_type_short" = yes; then
7136 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007138as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007139See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007140 else
7141 ac_cv_sizeof_short=0
7142 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007144
Martin v. Löwis11437992002-04-12 09:54:03 +00007145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7147$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007148
7149
7150
Martin v. Löwis11437992002-04-12 09:54:03 +00007151cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007152#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007153_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007154
7155
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007156# The cast to long int works around a bug in the HP C Compiler
7157# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7158# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7159# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7161$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007162if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007163 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007164else
Matthias Kloseb9621712010-04-24 17:59:49 +00007165 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 +00007166
Martin v. Löwis11437992002-04-12 09:54:03 +00007167else
Matthias Kloseb9621712010-04-24 17:59:49 +00007168 if test "$ac_cv_type_float" = yes; then
7169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007171as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007172See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007173 else
7174 ac_cv_sizeof_float=0
7175 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007177
Martin v. Löwis11437992002-04-12 09:54:03 +00007178fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7180$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007181
7182
7183
Martin v. Löwis11437992002-04-12 09:54:03 +00007184cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007185#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007186_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007187
7188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007189# The cast to long int works around a bug in the HP C Compiler
7190# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7191# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7192# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7194$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007195if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007196 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007197else
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 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 +00007199
Martin v. Löwis11437992002-04-12 09:54:03 +00007200else
Matthias Kloseb9621712010-04-24 17:59:49 +00007201 if test "$ac_cv_type_double" = yes; then
7202 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007204as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007205See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007206 else
7207 ac_cv_sizeof_double=0
7208 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007210
Martin v. Löwis11437992002-04-12 09:54:03 +00007211fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7213$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007214
7215
7216
Martin v. Löwis11437992002-04-12 09:54:03 +00007217cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007218#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007219_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007220
7221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007222# The cast to long int works around a bug in the HP C Compiler
7223# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7224# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7225# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7227$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007228if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007229 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007230else
Matthias Kloseb9621712010-04-24 17:59:49 +00007231 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 +00007232
Martin v. Löwis11437992002-04-12 09:54:03 +00007233else
Matthias Kloseb9621712010-04-24 17:59:49 +00007234 if test "$ac_cv_type_fpos_t" = yes; then
7235 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007237as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007238See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007239 else
7240 ac_cv_sizeof_fpos_t=0
7241 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007243
Martin v. Löwis11437992002-04-12 09:54:03 +00007244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7246$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007247
7248
7249
Martin v. Löwis11437992002-04-12 09:54:03 +00007250cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007251#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007252_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007253
Michael W. Hudson54241132001-12-07 15:38:26 +00007254
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007255# The cast to long int works around a bug in the HP C Compiler
7256# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7257# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7258# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7260$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007261if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007262 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007263else
Matthias Kloseb9621712010-04-24 17:59:49 +00007264 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 +00007265
Martin v. Löwis18e16552006-02-15 17:27:45 +00007266else
Matthias Kloseb9621712010-04-24 17:59:49 +00007267 if test "$ac_cv_type_size_t" = yes; then
7268 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7269$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007270as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007271See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007272 else
7273 ac_cv_sizeof_size_t=0
7274 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007276
Martin v. Löwis18e16552006-02-15 17:27:45 +00007277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7279$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007280
7281
7282
Martin v. Löwis18e16552006-02-15 17:27:45 +00007283cat >>confdefs.h <<_ACEOF
7284#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7285_ACEOF
7286
7287
Christian Heimes400adb02008-02-01 08:12:03 +00007288# The cast to long int works around a bug in the HP C Compiler
7289# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7290# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7291# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7293$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007294if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007295 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007296else
Matthias Kloseb9621712010-04-24 17:59:49 +00007297 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 +00007298
Christian Heimes400adb02008-02-01 08:12:03 +00007299else
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 if test "$ac_cv_type_pid_t" = yes; then
7301 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7302$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007303as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007304See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007305 else
7306 ac_cv_sizeof_pid_t=0
7307 fi
7308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007309
Christian Heimes400adb02008-02-01 08:12:03 +00007310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7312$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007313
7314
7315
7316cat >>confdefs.h <<_ACEOF
7317#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7318_ACEOF
7319
7320
Michael W. Hudson54241132001-12-07 15:38:26 +00007321
Matthias Kloseb9621712010-04-24 17:59:49 +00007322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7323$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007324have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007326/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007327
Martin v. Löwis11437992002-04-12 09:54:03 +00007328int
7329main ()
7330{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007331long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007332 ;
7333 return 0;
7334}
7335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007336if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007337
7338
Matthias Kloseb9621712010-04-24 17:59:49 +00007339$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007340
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007341 have_long_long=yes
7342
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7346$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007347if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007348# The cast to long int works around a bug in the HP C Compiler
7349# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7350# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7351# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7353$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007354if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007355 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007356else
Matthias Kloseb9621712010-04-24 17:59:49 +00007357 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 +00007358
Martin v. Löwis11437992002-04-12 09:54:03 +00007359else
Matthias Kloseb9621712010-04-24 17:59:49 +00007360 if test "$ac_cv_type_long_long" = yes; then
7361 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7362$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007363as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007364See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007365 else
7366 ac_cv_sizeof_long_long=0
7367 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007369
Martin v. Löwis11437992002-04-12 09:54:03 +00007370fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7372$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007373
7374
7375
Martin v. Löwis11437992002-04-12 09:54:03 +00007376cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007377#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007378_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007379
Michael W. Hudson54241132001-12-07 15:38:26 +00007380
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007381fi
7382
Matthias Kloseb9621712010-04-24 17:59:49 +00007383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7384$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007385have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007387/* end confdefs.h. */
7388
7389int
7390main ()
7391{
7392long double x; x = (long double)0;
7393 ;
7394 return 0;
7395}
7396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007397if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007398
7399
Matthias Kloseb9621712010-04-24 17:59:49 +00007400$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007401
7402 have_long_double=yes
7403
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007404fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7407$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007408if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007409# The cast to long int works around a bug in the HP C Compiler
7410# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7411# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7412# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7414$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007415if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007416 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007417else
Matthias Kloseb9621712010-04-24 17:59:49 +00007418 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 +00007419
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007420else
Matthias Kloseb9621712010-04-24 17:59:49 +00007421 if test "$ac_cv_type_long_double" = yes; then
7422 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7423$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007424as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007425See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007426 else
7427 ac_cv_sizeof_long_double=0
7428 fi
7429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007430
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7433$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007434
7435
7436
7437cat >>confdefs.h <<_ACEOF
7438#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7439_ACEOF
7440
7441
7442fi
7443
7444
Matthias Kloseb9621712010-04-24 17:59:49 +00007445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7446$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007447have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007449/* end confdefs.h. */
7450
7451int
7452main ()
7453{
7454_Bool x; x = (_Bool)0;
7455 ;
7456 return 0;
7457}
7458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007459if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007460
7461
Matthias Kloseb9621712010-04-24 17:59:49 +00007462$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007463
7464 have_c99_bool=yes
7465
Thomas Woutersb2137042007-02-01 18:02:27 +00007466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7469$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007470if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007471# The cast to long int works around a bug in the HP C Compiler
7472# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7473# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7474# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7476$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007477if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007478 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007479else
Matthias Kloseb9621712010-04-24 17:59:49 +00007480 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 +00007481
Thomas Woutersb2137042007-02-01 18:02:27 +00007482else
Matthias Kloseb9621712010-04-24 17:59:49 +00007483 if test "$ac_cv_type__Bool" = yes; then
7484 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7485$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007486as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007487See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007488 else
7489 ac_cv_sizeof__Bool=0
7490 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007492
Thomas Woutersb2137042007-02-01 18:02:27 +00007493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7495$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007496
7497
7498
Thomas Woutersb2137042007-02-01 18:02:27 +00007499cat >>confdefs.h <<_ACEOF
7500#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7501_ACEOF
7502
7503
7504fi
7505
Matthias Kloseb9621712010-04-24 17:59:49 +00007506ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007507 #include <stdint.h>
7508 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007509 #ifdef HAVE_INTTYPES_H
7510 #include <inttypes.h>
7511 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007512"
Victor Stinnere0be4232011-10-25 13:06:09 +02007513if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007514
7515cat >>confdefs.h <<_ACEOF
7516#define HAVE_UINTPTR_T 1
7517_ACEOF
7518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007519# The cast to long int works around a bug in the HP C Compiler
7520# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7521# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7522# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7524$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007525if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007526 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007527else
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 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 +00007529
Martin v. Löwis11437992002-04-12 09:54:03 +00007530else
Matthias Kloseb9621712010-04-24 17:59:49 +00007531 if test "$ac_cv_type_uintptr_t" = yes; then
7532 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007534as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007535See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007536 else
7537 ac_cv_sizeof_uintptr_t=0
7538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007540
Martin v. Löwis11437992002-04-12 09:54:03 +00007541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7543$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007544
7545
7546
Martin v. Löwis11437992002-04-12 09:54:03 +00007547cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007548#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007549_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007550
Michael W. Hudson54241132001-12-07 15:38:26 +00007551
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007552fi
7553
Thomas Wouters89f507f2006-12-13 04:49:30 +00007554
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007555# The cast to long int works around a bug in the HP C Compiler
7556# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7557# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7558# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7560$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007561if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007562 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007563else
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007565#ifdef HAVE_SYS_TYPES_H
7566#include <sys/types.h>
7567#endif
7568
Matthias Kloseb9621712010-04-24 17:59:49 +00007569"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007570
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007571else
Matthias Kloseb9621712010-04-24 17:59:49 +00007572 if test "$ac_cv_type_off_t" = yes; then
7573 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7574$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007575as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007576See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007577 else
7578 ac_cv_sizeof_off_t=0
7579 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007581
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7584$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007585
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007586
7587
Martin v. Löwis11437992002-04-12 09:54:03 +00007588cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007589#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007590_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007591
Michael W. Hudson54241132001-12-07 15:38:26 +00007592
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007593
Matthias Kloseb9621712010-04-24 17:59:49 +00007594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7595$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007596if test "$have_long_long" = yes
7597then
7598if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007599 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007600
Matthias Kloseb9621712010-04-24 17:59:49 +00007601$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007602
Matthias Kloseb9621712010-04-24 17:59:49 +00007603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7604$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007605else
Matthias Kloseb9621712010-04-24 17:59:49 +00007606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7607$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007608fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00007609else
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7611$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00007612fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007613
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007614# The cast to long int works around a bug in the HP C Compiler
7615# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7616# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7617# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7619$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007620if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007622else
Matthias Kloseb9621712010-04-24 17:59:49 +00007623 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007624#ifdef HAVE_SYS_TYPES_H
7625#include <sys/types.h>
7626#endif
7627#ifdef HAVE_TIME_H
7628#include <time.h>
7629#endif
7630
Matthias Kloseb9621712010-04-24 17:59:49 +00007631"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007632
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007633else
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 if test "$ac_cv_type_time_t" = yes; then
7635 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7636$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007637as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007638See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007639 else
7640 ac_cv_sizeof_time_t=0
7641 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007643
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
7646$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007647
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007648
7649
Martin v. Löwis11437992002-04-12 09:54:03 +00007650cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007651#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007652_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007653
Michael W. Hudson54241132001-12-07 15:38:26 +00007654
7655
Trent Mick635f6fb2000-08-23 21:33:05 +00007656# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007657ac_save_cc="$CC"
7658if test "$ac_cv_kpthread" = "yes"
7659then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00007660elif test "$ac_cv_kthread" = "yes"
7661then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00007662elif test "$ac_cv_pthread" = "yes"
7663then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007664fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007665
Matthias Kloseb9621712010-04-24 17:59:49 +00007666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
7667$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007668have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007670/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007671
7672 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007673int
7674main ()
7675{
Guido van Rossum12580492000-09-24 16:47:19 +00007676pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 ;
7678 return 0;
7679}
Matthias Kloseb159a552010-04-25 21:00:44 +00007680
Martin v. Löwis11437992002-04-12 09:54:03 +00007681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007682if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00007683 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00007684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
7687$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00007688if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007689 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7692# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
7694$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007695if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007699#ifdef HAVE_PTHREAD_H
7700#include <pthread.h>
7701#endif
7702
Matthias Kloseb9621712010-04-24 17:59:49 +00007703"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007704
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 if test "$ac_cv_type_pthread_t" = yes; then
7707 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007709as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007710See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007711 else
7712 ac_cv_sizeof_pthread_t=0
7713 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00007714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715
Trent Mick635f6fb2000-08-23 21:33:05 +00007716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
7718$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007719
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007720
7721
Martin v. Löwis11437992002-04-12 09:54:03 +00007722cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007723#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007724_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00007725
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007726
Trent Mick635f6fb2000-08-23 21:33:05 +00007727fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00007728CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00007729
Michael W. Hudson54241132001-12-07 15:38:26 +00007730
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007731case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007732 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007733 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
7734 ;;
7735 Darwin/*)
7736 OTHER_LIBTOOL_OPT=""
7737 ;;
7738esac
7739
7740
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007741ARCH_RUN_32BIT=""
7742
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007743case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00007744 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00007745 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
7746 if test "${enable_universalsdk}"; then
7747 :
7748 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007749 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007750 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00007751 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007752 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00007753 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00007754 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00007755 if test ${gcc_version} '<' 4.0
7756 then
7757 LIBTOOL_CRUFT="-lcc_dynamic"
7758 else
7759 LIBTOOL_CRUFT=""
7760 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007762 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007763else
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007765/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007766
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007767 #include <unistd.h>
7768 int main(int argc, char*argv[])
7769 {
7770 if (sizeof(long) == 4) {
7771 return 0;
7772 } else {
7773 return 1;
7774 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007775 }
7776
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007778if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007779 ac_osx_32bit=yes
7780else
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007783rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7784 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007785fi
7786
7787
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007788 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007789 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007790 i386)
7791 MACOSX_DEFAULT_ARCH="i386"
7792 ;;
7793 ppc)
7794 MACOSX_DEFAULT_ARCH="ppc"
7795 ;;
7796 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007797 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007798 ;;
7799 esac
7800 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00007801 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007802 i386)
7803 MACOSX_DEFAULT_ARCH="x86_64"
7804 ;;
7805 ppc)
7806 MACOSX_DEFAULT_ARCH="ppc64"
7807 ;;
7808 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007809 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00007810 ;;
7811 esac
7812
7813 #ARCH_RUN_32BIT="true"
7814 fi
7815
7816 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00007817 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007818 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007819esac
7820
Matthias Kloseb9621712010-04-24 17:59:49 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
7822$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007823if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007824then
Skip Montanarodecc6a42003-01-01 20:07:49 +00007825 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00007826 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00007827 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007828
Matthias Kloseb9621712010-04-24 17:59:49 +00007829$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007830
Matthias Kloseb9621712010-04-24 17:59:49 +00007831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7832$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00007833 if test $enable_shared = "yes"
7834 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007835 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 +00007836 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007837else
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7839$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007840fi
7841
Matthias Kloseb9621712010-04-24 17:59:49 +00007842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
7843$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007844case $ac_sys_system/$ac_sys_release in
7845 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007846
Matthias Kloseb9621712010-04-24 17:59:49 +00007847$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007848
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
7850$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007851 ;;
7852 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7854$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00007855 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00007856esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007857
Guido van Rossum0a516c91994-09-12 10:58:40 +00007858# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00007859
Michael W. Hudson54241132001-12-07 15:38:26 +00007860
7861
7862
7863
Benjamin Peterson99f03762010-04-11 22:15:28 +00007864
Thomas Wouters477c8d52006-05-27 19:21:47 +00007865
Georg Brandlb1441c72009-01-03 22:33:39 +00007866
Thomas Wouters477c8d52006-05-27 19:21:47 +00007867cat >>confdefs.h <<_ACEOF
7868#define SHLIB_EXT "$SO"
7869_ACEOF
7870
Guido van Rossum0a516c91994-09-12 10:58:40 +00007871# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00007872# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007873# (Shared libraries in this instance are shared modules to be loaded into
7874# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00007875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
7876$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00007877if test -z "$LDSHARED"
7878then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007879 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007880 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00007881 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00007882 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007883 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00007884 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00007885 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007887 if test "$GCC" = "yes" ; then
7888 LDSHARED='$(CC) -shared'
7889 LDCXXSHARED='$(CXX) -shared'
7890 else
7891 LDSHARED='$(CC) -G'
7892 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00007893 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007894 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007895 if test "$GCC" = "yes" ; then
7896 LDSHARED='$(CC) -shared'
7897 LDCXXSHARED='$(CXX) -shared'
7898 else
7899 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00007900 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00007901 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007902 LDSHARED='$(CC) -bundle'
7903 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00007904 if test "$enable_framework" ; then
7905 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007906 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7907 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007908 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00007909 else
7910 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00007911 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00007912 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00007913 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007914 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007915 LDSHARED='$(CC) -bundle'
7916 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00007917 if test "$enable_framework" ; then
7918 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007919 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7920 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007921 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00007922 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00007923 # No framework, use the Python app as bundle-loader
7924 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00007925 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007926 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007927 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00007928 Darwin/*)
7929 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
7930 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00007931
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007932 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00007933 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00007934 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00007935 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00007936 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00007937 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
7938 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00007939 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00007940 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007941 LDSHARED='$(CC) -bundle'
7942 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00007943 if test "$enable_framework" ; then
7944 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00007945 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
7946 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007947 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007948 else
7949 # No framework, use the Python app as bundle-loader
7950 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
7951 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00007952 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00007953 fi
7954 fi
7955 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007956 Linux*|GNU*|QNX*)
7957 LDSHARED='$(CC) -shared'
7958 LDCXXSHARED='$(CXX) -shared';;
7959 BSD/OS*/4*)
7960 LDSHARED="gcc -shared"
7961 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007962 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00007963 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00007964 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007965 LDSHARED='$(CC) -shared'
7966 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00007967 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00007968 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00007969 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007970 OpenBSD*)
7971 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
7972 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00007973 LDSHARED='$(CC) -shared $(CCSHARED)'
7974 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007975 else
7976 case `uname -r` in
7977 [01].* | 2.[0-7] | 2.[0-7].*)
7978 LDSHARED="ld -Bshareable ${LDFLAGS}"
7979 ;;
7980 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00007981 LDSHARED='$(CC) -shared $(CCSHARED)'
7982 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00007983 ;;
7984 esac
7985 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007986 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00007987 LDSHARED='$(CC) -shared'
7988 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00007989 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00007990 if test "$GCC" = "yes" ; then
7991 LDSHARED='$(CC) -shared'
7992 LDCXXSHARED='$(CXX) -shared'
7993 else
7994 LDSHARED='$(CC) -G'
7995 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00007996 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00007997 SCO_SV*)
7998 LDSHARED='$(CC) -Wl,-G,-Bexport'
7999 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8000 CYGWIN*)
8001 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8002 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008003 *) LDSHARED="ld";;
8004 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8007$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008008LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008009BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008010# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008011# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8013$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008014if test -z "$CCSHARED"
8015then
Guido van Rossum07397971997-04-29 21:49:50 +00008016 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008017 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008018 then CCSHARED="-fPIC";
8019 elif test `uname -p` = sparc;
8020 then CCSHARED="-xcode=pic32";
8021 else CCSHARED="-Kpic";
8022 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008023 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008024 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008025 else CCSHARED="+z";
8026 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008027 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008028 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008029 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008030 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008031 if test "$GCC" = "yes"
8032 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008033 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008034 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008035 SCO_SV*)
8036 if test "$GCC" = "yes"
8037 then CCSHARED="-fPIC"
8038 else CCSHARED="-Kpic -belf"
8039 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008040 IRIX*/6*) case $CC in
8041 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008042 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008043 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008044 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8047$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008048# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008049# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8051$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008052if test -z "$LINKFORSHARED"
8053then
Guido van Rossum07397971997-04-29 21:49:50 +00008054 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008055 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008056 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008057 LINKFORSHARED="-Wl,-E -Wl,+s";;
8058# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008059 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008060 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008061 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008062 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008063 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008064 if test "$enable_framework"
8065 then
Jack Jansenda49e192005-01-07 13:08:22 +00008066 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008067 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008068 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008069 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008070 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008071 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008072 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008073 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8074 then
8075 LINKFORSHARED="-Wl,--export-dynamic"
8076 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008077 SunOS/5*) case $CC in
8078 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008079 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008080 then
8081 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008082 fi;;
8083 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008084 CYGWIN*)
8085 if test $enable_shared = "no"
8086 then
8087 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8088 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008089 QNX*)
8090 # -Wl,-E causes the symbols to be added to the dynamic
8091 # symbol table so that they can be found when a module
8092 # is loaded. -N 2048K causes the stack size to be set
8093 # to 2048 kilobytes so that the stack doesn't overflow
8094 # when running test_compile.py.
8095 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008096 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8099$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008100
Michael W. Hudson54241132001-12-07 15:38:26 +00008101
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008102
Matthias Kloseb9621712010-04-24 17:59:49 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8104$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008105if test ! "$LIBRARY" = "$LDLIBRARY"
8106then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008107 case $ac_sys_system in
8108 CYGWIN*)
8109 # Cygwin needs CCSHARED when building extension DLLs
8110 # but not when building the interpreter DLL.
8111 CFLAGSFORSHARED='';;
8112 *)
8113 CFLAGSFORSHARED='$(CCSHARED)'
8114 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8117$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008118
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008119# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8120# library (with --enable-shared).
8121# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008122# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8123# if it is not required, since it creates a dependency of the shared library
8124# to LIBS. This, in turn, means that applications linking the shared libpython
8125# don't need to link LIBS explicitly. The default should be only changed
8126# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008127
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8129$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008130case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008131 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008132 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008133esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8135$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008136
8137
Guido van Rossum627b2d71993-12-24 10:39:16 +00008138# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8140$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008141if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008142 $as_echo_n "(cached) " >&6
8143else
8144 ac_check_lib_save_LIBS=$LIBS
8145LIBS="-lsendfile $LIBS"
8146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8147/* end confdefs.h. */
8148
8149/* Override any GCC internal prototype to avoid an error.
8150 Use char because int might match the return type of a GCC
8151 builtin and then its argument prototype would still apply. */
8152#ifdef __cplusplus
8153extern "C"
8154#endif
8155char sendfile ();
8156int
8157main ()
8158{
8159return sendfile ();
8160 ;
8161 return 0;
8162}
8163_ACEOF
8164if ac_fn_c_try_link "$LINENO"; then :
8165 ac_cv_lib_sendfile_sendfile=yes
8166else
8167 ac_cv_lib_sendfile_sendfile=no
8168fi
8169rm -f core conftest.err conftest.$ac_objext \
8170 conftest$ac_exeext conftest.$ac_ext
8171LIBS=$ac_check_lib_save_LIBS
8172fi
8173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8174$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008175if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008176 cat >>confdefs.h <<_ACEOF
8177#define HAVE_LIBSENDFILE 1
8178_ACEOF
8179
8180 LIBS="-lsendfile $LIBS"
8181
8182fi
8183
Matthias Kloseb9621712010-04-24 17:59:49 +00008184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8185$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008186if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008187 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008188else
Martin v. Löwis11437992002-04-12 09:54:03 +00008189 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008190LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008194/* Override any GCC internal prototype to avoid an error.
8195 Use char because int might match the return type of a GCC
8196 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008197#ifdef __cplusplus
8198extern "C"
8199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008200char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008201int
8202main ()
8203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 ;
8206 return 0;
8207}
8208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008209if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008211else
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008214rm -f core conftest.err conftest.$ac_objext \
8215 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008216LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8219$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008220if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 cat >>confdefs.h <<_ACEOF
8222#define HAVE_LIBDL 1
8223_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008224
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008225 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008227fi
8228 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8230$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008231if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008233else
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008235LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008237/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008239/* Override any GCC internal prototype to avoid an error.
8240 Use char because int might match the return type of a GCC
8241 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008242#ifdef __cplusplus
8243extern "C"
8244#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008245char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008246int
8247main ()
8248{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008250 ;
8251 return 0;
8252}
8253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008254if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008255 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008256else
Matthias Kloseb9621712010-04-24 17:59:49 +00008257 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008259rm -f core conftest.err conftest.$ac_objext \
8260 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008261LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8264$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008265if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008266 cat >>confdefs.h <<_ACEOF
8267#define HAVE_LIBDLD 1
8268_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008269
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008270 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008271
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008272fi
8273 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008274
Georg Brandlb1441c72009-01-03 22:33:39 +00008275# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008276if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8278$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008279if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008281else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008282 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008286/* Override any GCC internal prototype to avoid an error.
8287 Use char because int might match the return type of a GCC
8288 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008289#ifdef __cplusplus
8290extern "C"
8291#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008292char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008293int
8294main ()
8295{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008296return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008297 ;
8298 return 0;
8299}
8300_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301for ac_lib in '' pthread rt posix4; do
8302 if test -z "$ac_lib"; then
8303 ac_res="none required"
8304 else
8305 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008306 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008307 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008309 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008311rm -f core conftest.err conftest.$ac_objext \
8312 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008313 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316done
Victor Stinnere0be4232011-10-25 13:06:09 +02008317if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008319else
8320 ac_cv_search_sem_init=no
8321fi
8322rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008323LIBS=$ac_func_search_save_LIBS
8324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8326$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008327ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008328if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008329 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008330
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008331fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008332 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008333 # posix4 on Solaris 2.6
8334 # pthread (first!) on Linux
8335fi
8336
Martin v. Löwis19d17342003-06-14 21:03:05 +00008337# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8339$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008340if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008342else
8343 ac_check_lib_save_LIBS=$LIBS
8344LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008346/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008347
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008348/* Override any GCC internal prototype to avoid an error.
8349 Use char because int might match the return type of a GCC
8350 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008351#ifdef __cplusplus
8352extern "C"
8353#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008354char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008355int
8356main ()
8357{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008359 ;
8360 return 0;
8361}
8362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008363if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008364 ac_cv_lib_intl_textdomain=yes
8365else
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008368rm -f core conftest.err conftest.$ac_objext \
8369 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008370LIBS=$ac_check_lib_save_LIBS
8371fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8373$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008374if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008377
Brett Cannonc6d936e2009-06-07 20:09:53 +00008378 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008379fi
8380
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008381
8382# checks for system dependent C++ extensions support
8383case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8385$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008387/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008388
Georg Brandl59e87bd2011-02-15 19:48:59 +00008389 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008390int
8391main ()
8392{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008393loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008394 ;
8395 return 0;
8396}
Matthias Kloseb159a552010-04-25 21:00:44 +00008397
Martin v. Löwis11437992002-04-12 09:54:03 +00008398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008399if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008400
Matthias Kloseb159a552010-04-25 21:00:44 +00008401
Matthias Kloseb9621712010-04-24 17:59:49 +00008402$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008403
Matthias Kloseb159a552010-04-25 21:00:44 +00008404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008405$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008406
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008407else
Matthias Kloseb159a552010-04-25 21:00:44 +00008408
8409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008410$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008411
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008413rm -f core conftest.err conftest.$ac_objext \
8414 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008415 *) ;;
8416esac
8417
Guido van Rossum70c7f481998-03-26 18:44:10 +00008418# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8420$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008421if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008423else
Martin v. Löwis11437992002-04-12 09:54:03 +00008424 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008425LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008427/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008428
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429/* Override any GCC internal prototype to avoid an error.
8430 Use char because int might match the return type of a GCC
8431 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008432#ifdef __cplusplus
8433extern "C"
8434#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008435char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008436int
8437main ()
8438{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008439return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008440 ;
8441 return 0;
8442}
8443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008444if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008446else
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008449rm -f core conftest.err conftest.$ac_objext \
8450 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008451LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8454$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008455if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008456 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008457fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008458 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8460$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008461if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008463else
Martin v. Löwis11437992002-04-12 09:54:03 +00008464 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008465LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008468
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469/* Override any GCC internal prototype to avoid an error.
8470 Use char because int might match the return type of a GCC
8471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008472#ifdef __cplusplus
8473extern "C"
8474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008475char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008476int
8477main ()
8478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 ;
8481 return 0;
8482}
8483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008484if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008486else
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489rm -f core conftest.err conftest.$ac_objext \
8490 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008491LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8494$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008495if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008496 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008497fi
8498 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008499
Matthias Kloseb9621712010-04-24 17:59:49 +00008500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8501$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008504if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8507$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008508LIBS="$withval $LIBS"
8509
8510else
Matthias Kloseb9621712010-04-24 17:59:49 +00008511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8512$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513fi
8514
Guido van Rossum7f43da71994-08-01 12:15:30 +00008515
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008516if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008517 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8518set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8520$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008521if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008523else
8524 case $PKG_CONFIG in
8525 [\\/]* | ?:[\\/]*)
8526 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8527 ;;
8528 *)
8529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8530for as_dir in $PATH
8531do
8532 IFS=$as_save_IFS
8533 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07008535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008536 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008538 break 2
8539 fi
8540done
Matthias Kloseb9621712010-04-24 17:59:49 +00008541 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008542IFS=$as_save_IFS
8543
8544 ;;
8545esac
8546fi
8547PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8548if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8550$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008551else
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8553$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008554fi
8555
8556
8557fi
8558if test -z "$ac_cv_path_PKG_CONFIG"; then
8559 ac_pt_PKG_CONFIG=$PKG_CONFIG
8560 # Extract the first word of "pkg-config", so it can be a program name with args.
8561set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8563$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008564if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008566else
8567 case $ac_pt_PKG_CONFIG in
8568 [\\/]* | ?:[\\/]*)
8569 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8570 ;;
8571 *)
8572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8573for as_dir in $PATH
8574do
8575 IFS=$as_save_IFS
8576 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -07008578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008579 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00008580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00008581 break 2
8582 fi
8583done
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00008585IFS=$as_save_IFS
8586
8587 ;;
8588esac
8589fi
8590ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8591if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8593$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008594else
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8596$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00008597fi
8598
8599 if test "x$ac_pt_PKG_CONFIG" = x; then
8600 PKG_CONFIG=""
8601 else
8602 case $cross_compiling:$ac_tool_warned in
8603yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00008604{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8605$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00008606ac_tool_warned=yes ;;
8607esac
8608 PKG_CONFIG=$ac_pt_PKG_CONFIG
8609 fi
8610else
8611 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8612fi
8613
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008614
8615# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
8617$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008618
8619# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008620if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008621 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00008622else
8623 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008624fi
8625
8626
Matthias Kloseb9621712010-04-24 17:59:49 +00008627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
8628$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008629
8630# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
8632$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008633
8634# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008635if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008636 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00008637else
8638 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008639fi
8640
8641
8642if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008643 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
8644else
8645 LIBFFI_INCLUDEDIR=""
8646fi
8647
8648
Matthias Kloseb9621712010-04-24 17:59:49 +00008649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
8650$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008651
Stefan Krah60187b52012-03-23 19:06:27 +01008652# Check for use of the system libmpdec library
8653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
8654$as_echo_n "checking for --with-system-libmpdec... " >&6; }
8655
8656# Check whether --with-system_libmpdec was given.
8657if test "${with_system_libmpdec+set}" = set; then :
8658 withval=$with_system_libmpdec;
8659else
8660 with_system_libmpdec="no"
8661fi
8662
8663
8664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
8665$as_echo "$with_system_libmpdec" >&6; }
8666
Benjamin Peterson076ed002010-10-31 17:11:02 +00008667# Check for support for loadable sqlite extensions
8668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
8669$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
8670# Check whether --enable-loadable-sqlite-extensions was given.
8671if test "${enable_loadable_sqlite_extensions+set}" = set; then :
8672 enableval=$enable_loadable_sqlite_extensions;
8673else
8674 enable_loadable_sqlite_extensions="no"
8675fi
8676
8677
8678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
8679$as_echo "$enable_loadable_sqlite_extensions" >&6; }
8680
Matthias Klose55708cc2009-04-30 08:06:49 +00008681# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
8683$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008684
8685# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008686if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00008687 withval=$with_dbmliborder;
8688if test x$with_dbmliborder = xyes
8689then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008690as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008691else
8692 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
8693 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
8694 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008695 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00008696 fi
8697 done
8698fi
8699fi
8700
Matthias Kloseb9621712010-04-24 17:59:49 +00008701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
8702$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00008703
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00008704# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008705
8706
Matthias Kloseb9621712010-04-24 17:59:49 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
8708$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008711if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712 withval=$with_signal_module;
8713fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008714
8715
8716if test -z "$with_signal_module"
8717then with_signal_module="yes"
8718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
8720$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008721
8722if test "${with_signal_module}" = "yes"; then
8723 USE_SIGNAL_MODULE=""
8724 SIGNAL_OBJS=""
8725else
8726 USE_SIGNAL_MODULE="#"
8727 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
8728fi
8729
Guido van Rossum3d15bd82001-01-10 18:53:48 +00008730# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00008731
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008732USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00008733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008734
Martin v. Löwis11437992002-04-12 09:54:03 +00008735
8736# Templates for things AC_DEFINEd more than once.
8737# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00008738
8739
Martin v. Löwis11437992002-04-12 09:54:03 +00008740
Matthias Kloseb9621712010-04-24 17:59:49 +00008741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
8742$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008744# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008745if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746 withval=$with_threads;
8747fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00008748
8749
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008750# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00008751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008753if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754 withval=$with_thread; with_threads=$with_thread
8755fi
8756
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008757
8758if test -z "$with_threads"
8759then with_threads="yes"
8760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
8762$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008763
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008764
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00008765if test "$with_threads" = "no"
8766then
8767 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008768elif test "$ac_cv_pthread_is_default" = yes
8769then
Matthias Kloseb9621712010-04-24 17:59:49 +00008770 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008771
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008772 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00008774
8775 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008777elif test "$ac_cv_kpthread" = "yes"
8778then
8779 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008780 if test "$ac_cv_cxx_thread" = "yes"; then
8781 CXX="$CXX -Kpthread"
8782 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00008784
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008785 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008786 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008787elif test "$ac_cv_kthread" = "yes"
8788then
8789 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008790 if test "$ac_cv_cxx_thread" = "yes"; then
8791 CXX="$CXX -Kthread"
8792 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008794
8795 posix_threads=yes
8796 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008797elif test "$ac_cv_pthread" = "yes"
8798then
8799 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00008800 if test "$ac_cv_cxx_thread" = "yes"; then
8801 CXX="$CXX -pthread"
8802 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008804
8805 posix_threads=yes
8806 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008807else
8808 if test ! -z "$with_threads" -a -d "$with_threads"
8809 then LDFLAGS="$LDFLAGS -L$with_threads"
8810 fi
8811 if test ! -z "$withval" -a -d "$withval"
8812 then LDFLAGS="$LDFLAGS -L$withval"
8813 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008814
8815 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00008816 # define _POSIX_THREADS in unistd.h. Some apparently don't
8817 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00008818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
8819$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
8820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008821/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008822
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008823#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00008824#ifdef _POSIX_THREADS
8825yes
8826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008827
8828_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008829if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008830 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008831 unistd_defines_pthreads=yes
8832else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008833 unistd_defines_pthreads=no
8834fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008835rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008836
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
8838$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008839
Matthias Kloseb9621712010-04-24 17:59:49 +00008840 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00008841
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008842 # Just looking for pthread_create in libpthread is not enough:
8843 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
8844 # So we really have to include pthread.h, and then link.
8845 _libs=$LIBS
8846 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
8848$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
8849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008850/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008851#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00008852
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008853void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00008854int
8855main ()
8856{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008857
8858pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00008859 ;
8860 return 0;
8861}
8862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008863if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008864
Matthias Kloseb9621712010-04-24 17:59:49 +00008865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8866$as_echo "yes" >&6; }
8867 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00008868
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008869 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008870 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00008871else
Martin v. Löwis11437992002-04-12 09:54:03 +00008872
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00008873 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02008875if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00008877
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00008878 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008879 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00008880else
Guido van Rossumad678af1998-10-02 14:42:15 +00008881
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
8883$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008884if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008886else
Martin v. Löwis11437992002-04-12 09:54:03 +00008887 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008888LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008892/* Override any GCC internal prototype to avoid an error.
8893 Use char because int might match the return type of a GCC
8894 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008895#ifdef __cplusplus
8896extern "C"
8897#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008898char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008899int
8900main ()
8901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008902return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ;
8904 return 0;
8905}
8906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008907if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00008909else
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00008911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008912rm -f core conftest.err conftest.$ac_objext \
8913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008914LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
8917$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008918if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00008920
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008921 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008922 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008923 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00008924else
Greg Steinadf63d62000-07-05 10:38:09 +00008925
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
8927$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008928if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008929 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00008930else
Martin v. Löwis11437992002-04-12 09:54:03 +00008931 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00008932LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008936/* Override any GCC internal prototype to avoid an error.
8937 Use char because int might match the return type of a GCC
8938 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008939#ifdef __cplusplus
8940extern "C"
8941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008942char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008943int
8944main ()
8945{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008946return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008947 ;
8948 return 0;
8949}
8950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008951if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00008953else
Matthias Kloseb9621712010-04-24 17:59:49 +00008954 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00008955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008956rm -f core conftest.err conftest.$ac_objext \
8957 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008958LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00008959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
8961$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008962if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00008964
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00008965 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00008966 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00008967 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008968else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00008969
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
8971$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008972if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008974else
Martin v. Löwis11437992002-04-12 09:54:03 +00008975 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008976LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008979
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008980/* Override any GCC internal prototype to avoid an error.
8981 Use char because int might match the return type of a GCC
8982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008983#ifdef __cplusplus
8984extern "C"
8985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008986char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008987int
8988main ()
8989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008991 ;
8992 return 0;
8993}
8994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008995if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008996 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008997else
Matthias Kloseb9621712010-04-24 17:59:49 +00008998 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00008999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009000rm -f core conftest.err conftest.$ac_objext \
9001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009002LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9005$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009006if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009007 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009008
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009009 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009010 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009011 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009012else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009013
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9015$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009016if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009017 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009018else
Martin v. Löwis11437992002-04-12 09:54:03 +00009019 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009020LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009022/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024/* Override any GCC internal prototype to avoid an error.
9025 Use char because int might match the return type of a GCC
9026 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009027#ifdef __cplusplus
9028extern "C"
9029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009030char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009031int
9032main ()
9033{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 ;
9036 return 0;
9037}
9038_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009039if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009041else
Matthias Kloseb9621712010-04-24 17:59:49 +00009042 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009044rm -f core conftest.err conftest.$ac_objext \
9045 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009046LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009047fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9049$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009050if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009051 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009052
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009053 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009054 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009055 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009056else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009057
Martin v. Löwis130fb172001-07-19 11:00:41 +00009058 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009059fi
9060
Guido van Rossum627b2d71993-12-24 10:39:16 +00009061
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009062fi
9063
Guido van Rossum0be3e491997-05-22 20:33:33 +00009064fi
9065
Guido van Rossum49545951997-12-02 19:28:29 +00009066fi
9067
Guido van Rossumb93a8621998-05-07 13:27:32 +00009068fi
9069
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009071rm -f core conftest.err conftest.$ac_objext \
9072 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009073
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9075$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009076if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009077 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009078else
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009080LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009083
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009084/* Override any GCC internal prototype to avoid an error.
9085 Use char because int might match the return type of a GCC
9086 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009087#ifdef __cplusplus
9088extern "C"
9089#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009090char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009091int
9092main ()
9093{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009094return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009095 ;
9096 return 0;
9097}
9098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009099if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009101else
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009104rm -f core conftest.err conftest.$ac_objext \
9105 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009106LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9109$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009110if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009112
Martin v. Löwis130fb172001-07-19 11:00:41 +00009113 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009114 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009115 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009116fi
9117
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009118
Neal Norwitza978ab02002-11-02 16:58:05 +00009119 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9121$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009122if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009123 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009124else
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009126LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009130/* Override any GCC internal prototype to avoid an error.
9131 Use char because int might match the return type of a GCC
9132 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009133#ifdef __cplusplus
9134extern "C"
9135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009136char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009137int
9138main ()
9139{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009140return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009141 ;
9142 return 0;
9143}
9144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009145if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009147else
Matthias Kloseb9621712010-04-24 17:59:49 +00009148 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009149fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009150rm -f core conftest.err conftest.$ac_objext \
9151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009152LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009153fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9155$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009156if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009157 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009158
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009159 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009160 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009161 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009162fi
9163
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009164 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009165fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009166
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009167if test "$posix_threads" = "yes"; then
9168 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009169
Matthias Kloseb9621712010-04-24 17:59:49 +00009170$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009171
9172 fi
9173
9174 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9175 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009176 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009177$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009178
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009179 ;;
9180 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009181$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009182
9183 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009184 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009185$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009186
9187 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009188 esac
9189
Matthias Kloseb9621712010-04-24 17:59:49 +00009190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9191$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009192 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009193 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009194else
Matthias Kloseb9621712010-04-24 17:59:49 +00009195 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009196 ac_cv_pthread_system_supported=no
9197else
Matthias Kloseb9621712010-04-24 17:59:49 +00009198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009199/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009200#include <pthread.h>
9201 void *foo(void *parm) {
9202 return NULL;
9203 }
9204 main() {
9205 pthread_attr_t attr;
9206 pthread_t id;
9207 if (pthread_attr_init(&attr)) exit(-1);
9208 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9209 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9210 exit(0);
9211 }
9212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009213if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009214 ac_cv_pthread_system_supported=yes
9215else
Matthias Kloseb9621712010-04-24 17:59:49 +00009216 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9219 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009220fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009221
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009222
Guido van Rossum627b2d71993-12-24 10:39:16 +00009223fi
9224
Matthias Kloseb9621712010-04-24 17:59:49 +00009225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9226$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009227 if test "$ac_cv_pthread_system_supported" = "yes"; then
9228
Matthias Kloseb9621712010-04-24 17:59:49 +00009229$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009230
9231 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009232 for ac_func in pthread_sigmask
9233do :
9234 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009235if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009236 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009237#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009238_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009239 case $ac_sys_system in
9240 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009241
Matthias Kloseb9621712010-04-24 17:59:49 +00009242$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009243
9244 ;;
9245 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009246fi
9247done
9248
9249fi
9250
9251
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009252# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009253
Matthias Kloseb9621712010-04-24 17:59:49 +00009254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9255$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009257if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009259 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9261$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009262 ipv6=no
9263 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009264 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9265$as_echo "yes" >&6; }
9266 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009267
9268 ipv6=yes
9269 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009271else
Martin v. Löwis11437992002-04-12 09:54:03 +00009272
Matthias Kloseb9621712010-04-24 17:59:49 +00009273 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009274
Matthias Kloseb9621712010-04-24 17:59:49 +00009275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9276$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009277 ipv6=no
9278
9279else
Matthias Kloseb9621712010-04-24 17:59:49 +00009280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009281/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009282 /* AF_INET6 available check */
9283#include <sys/types.h>
9284#include <sys/socket.h>
9285main()
9286{
9287 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9288 exit(1);
9289 else
9290 exit(0);
9291}
9292
Martin v. Löwis11437992002-04-12 09:54:03 +00009293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009294if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009295
Matthias Kloseb9621712010-04-24 17:59:49 +00009296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9297$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009298 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009299
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009300else
Matthias Kloseb159a552010-04-25 21:00:44 +00009301
Matthias Kloseb9621712010-04-24 17:59:49 +00009302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9303$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009304 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009305
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9308 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009309fi
9310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009311
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009312if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9314$as_echo_n "checking if RFC2553 API is available... " >&6; }
9315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009316/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009317
9318 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009319#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009320int
9321main ()
9322{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009323struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009324 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009325 ;
9326 return 0;
9327}
Matthias Kloseb159a552010-04-25 21:00:44 +00009328
Martin v. Löwis11437992002-04-12 09:54:03 +00009329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009330if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009331
9332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009333$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009334 ipv6=yes
9335
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009336else
Matthias Kloseb159a552010-04-25 21:00:44 +00009337
9338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009339$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009340 ipv6=no
9341
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009344fi
9345
9346if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009347 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009348
9349fi
9350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009351fi
9352
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009353
9354ipv6type=unknown
9355ipv6lib=none
9356ipv6trylibc=no
9357
9358if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9360$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009361 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9362 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009363 case $i in
9364 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009366/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009367
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009368#include <netinet/in.h>
9369#ifdef IPV6_INRIA_VERSION
9370yes
9371#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009372_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009374 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009375 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009376fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009377rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009378
9379 ;;
9380 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009382/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009383
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009384#include <netinet/in.h>
9385#ifdef __KAME__
9386yes
9387#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009388_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009390 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009391 ipv6type=$i;
9392 ipv6lib=inet6
9393 ipv6libdir=/usr/local/v6/lib
9394 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009395fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009396rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009397
9398 ;;
9399 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009401/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009402
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009403#include <features.h>
9404#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9405yes
9406#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009407_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009408if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009409 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009410 ipv6type=$i;
9411 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009412fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009413rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009414
9415 ;;
9416 linux-inet6)
9417 if test -d /usr/inet6; then
9418 ipv6type=$i
9419 ipv6lib=inet6
9420 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009421 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009422 fi
9423 ;;
9424 solaris)
9425 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009426 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009427 ipv6type=$i
9428 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009429 fi
9430 fi
9431 ;;
9432 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009434/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009435
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009436#include <sys/param.h>
9437#ifdef _TOSHIBA_INET6
9438yes
9439#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009440_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009443 ipv6type=$i;
9444 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009445 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009446fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009447rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009448
9449 ;;
9450 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009452/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009453
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009454#include </usr/local/v6/include/sys/v6config.h>
9455#ifdef __V6D__
9456yes
9457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009458_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009460 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009461 ipv6type=$i;
9462 ipv6lib=v6;
9463 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009464 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009465fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009466rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009467
9468 ;;
9469 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009471/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009472
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009473#include <sys/param.h>
9474#ifdef _ZETA_MINAMI_INET6
9475yes
9476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009477_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009480 ipv6type=$i;
9481 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009482 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009483fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009484rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009485
9486 ;;
9487 esac
9488 if test "$ipv6type" != "unknown"; then
9489 break
9490 fi
9491 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9493$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009494fi
9495
9496if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9497 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9498 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9499 echo "using lib$ipv6lib"
9500 else
9501 if test $ipv6trylibc = "yes"; then
9502 echo "using libc"
9503 else
9504 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9505 echo "You need to fetch lib$ipv6lib.a from appropriate"
9506 echo 'ipv6 kit and compile beforehand.'
9507 exit 1
9508 fi
9509 fi
9510fi
9511
Matthias Kloseb9621712010-04-24 17:59:49 +00009512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9513$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009515/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009516
9517 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009518int
9519main ()
9520{
9521FSIORefNum fRef = 0
9522 ;
9523 return 0;
9524}
Matthias Kloseb159a552010-04-25 21:00:44 +00009525
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009527if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009528
Matthias Kloseb159a552010-04-25 21:00:44 +00009529
Matthias Kloseb9621712010-04-24 17:59:49 +00009530$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009531
Matthias Kloseb9621712010-04-24 17:59:49 +00009532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9533$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009534
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009535else
Matthias Kloseb159a552010-04-25 21:00:44 +00009536
Matthias Kloseb9621712010-04-24 17:59:49 +00009537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009539
9540fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9542
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009543# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +00009544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
9545$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009547# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009548if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009549 withval=$with_doc_strings;
9550fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009551
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009552
9553if test -z "$with_doc_strings"
9554then with_doc_strings="yes"
9555fi
9556if test "$with_doc_strings" != "no"
9557then
9558
Matthias Kloseb9621712010-04-24 17:59:49 +00009559$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009560
9561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
9563$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +00009564
Antoine Pitrou042b1282010-08-13 21:15:58 +00009565# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +00009566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
9567$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009570if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009571 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009572if test "$withval" != no
9573then
9574
Matthias Kloseb9621712010-04-24 17:59:49 +00009575$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009576
Matthias Kloseb9621712010-04-24 17:59:49 +00009577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9578$as_echo "yes" >&6; }
9579else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9580$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009581fi
9582else
Matthias Kloseb9621712010-04-24 17:59:49 +00009583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9584$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585fi
9586
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00009587
9588# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +00009589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
9590$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009592# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009593if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009594 withval=$with_pymalloc;
9595fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009596
Neil Schemenauera35c6882001-02-27 04:45:05 +00009597
Neil Schemenauer16c22972002-03-22 15:34:49 +00009598if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00009599then
9600 with_pymalloc="yes"
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00009601 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +00009602fi
9603if test "$with_pymalloc" != "no"
9604then
Martin v. Löwis11437992002-04-12 09:54:03 +00009605
Matthias Kloseb9621712010-04-24 17:59:49 +00009606$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +00009607
9608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
9610$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +00009611
Benjamin Peterson05159c42009-12-03 03:01:27 +00009612# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +00009613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
9614$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009615
9616# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009617if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009618 withval=$with_valgrind;
9619else
9620 with_valgrind=no
9621fi
9622
Matthias Kloseb9621712010-04-24 17:59:49 +00009623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
9624$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +00009625if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009626 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 +02009627if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +00009628
Matthias Kloseb9621712010-04-24 17:59:49 +00009629$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +00009630
9631else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009632 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +00009633
9634fi
9635
9636
Jeffrey Yasskin39370832010-05-03 19:29:34 +00009637 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +00009638fi
9639
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009640# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00009641
Guido van Rossum98935bf2001-09-05 19:13:16 +00009642DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00009643
Guido van Rossume97ee181999-12-20 21:27:22 +00009644# the dlopen() function means we might want to use dynload_shlib.o. some
9645# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00009646for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +00009647do :
9648 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +02009649if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009651#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009652_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +00009653
Guido van Rossume97ee181999-12-20 21:27:22 +00009654fi
Thomas Wouters3a584202000-08-05 23:28:51 +00009655done
Guido van Rossume97ee181999-12-20 21:27:22 +00009656
Michael W. Hudson54241132001-12-07 15:38:26 +00009657
Guido van Rossume97ee181999-12-20 21:27:22 +00009658# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
9659# loading of modules.
9660
Matthias Kloseb9621712010-04-24 17:59:49 +00009661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
9662$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009663if test -z "$DYNLOADFILE"
9664then
9665 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00009666 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
9667 if test "$ac_cv_func_dlopen" = yes
9668 then DYNLOADFILE="dynload_shlib.o"
9669 else DYNLOADFILE="dynload_aix.o"
9670 fi
9671 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +00009672 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009673 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
9674 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00009675 *)
9676 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
9677 # out any dynamic loading
9678 if test "$ac_cv_func_dlopen" = yes
9679 then DYNLOADFILE="dynload_shlib.o"
9680 else DYNLOADFILE="dynload_stub.o"
9681 fi
9682 ;;
9683 esac
9684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
9686$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +00009687if test "$DYNLOADFILE" != "dynload_stub.o"
9688then
Martin v. Löwis11437992002-04-12 09:54:03 +00009689
Matthias Kloseb9621712010-04-24 17:59:49 +00009690$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +00009691
9692fi
9693
Neil Schemenauer4e425612001-06-19 15:44:15 +00009694# MACHDEP_OBJS can be set to platform-specific object files needed by Python
9695
Michael W. Hudson54241132001-12-07 15:38:26 +00009696
Matthias Kloseb9621712010-04-24 17:59:49 +00009697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
9698$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009699if test -z "$MACHDEP_OBJS"
9700then
Jack Jansene578a632001-08-15 01:27:14 +00009701 MACHDEP_OBJS=$extra_machdep_objs
9702else
9703 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00009704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
9706$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +00009707
Guido van Rossum627b2d71993-12-24 10:39:16 +00009708# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +00009709for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -08009710 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009711 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009712 futimens futimes gai_strerror \
9713 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +00009714 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -07009715 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +01009716 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
9717 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +02009718 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009719 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +02009720 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +00009721 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +00009722 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +00009723 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +02009724 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
9725 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +02009726 sigaction sigaltstack siginterrupt sigpending sigrelse \
9727 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +00009728 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +02009729 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
9730 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +00009731do :
9732 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9733ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009734if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009736#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009737_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00009738
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009739fi
9740done
9741
Michael W. Hudson54241132001-12-07 15:38:26 +00009742
Gregory P. Smithdf300d52012-01-21 18:20:15 -08009743ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
9744 #include <dirent.h>
9745"
9746if test "x$ac_cv_have_decl_dirfd" = xyes; then :
9747
9748$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
9749
9750fi
9751
9752
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009753# For some functions, having a definition is not sufficient, since
9754# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +00009755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
9756$as_echo_n "checking for chroot... " >&6; }
9757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009758/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009759#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009760int
9761main ()
9762{
9763void *x=chroot
9764 ;
9765 return 0;
9766}
9767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009768if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009769
Matthias Kloseb9621712010-04-24 17:59:49 +00009770$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009771
Matthias Kloseb159a552010-04-25 21:00:44 +00009772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009773$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009774else
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9776$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009777
9778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
9781$as_echo_n "checking for link... " >&6; }
9782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009783/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009784#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009785int
9786main ()
9787{
9788void *x=link
9789 ;
9790 return 0;
9791}
9792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009793if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009794
Matthias Kloseb9621712010-04-24 17:59:49 +00009795$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009796
Matthias Kloseb159a552010-04-25 21:00:44 +00009797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009798$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009799else
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öwisc8ad7cc2002-11-11 13:23:45 +00009802
9803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
9806$as_echo_n "checking for symlink... " >&6; }
9807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009808/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009809#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009810int
9811main ()
9812{
9813void *x=symlink
9814 ;
9815 return 0;
9816}
9817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009818if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009819
Matthias Kloseb9621712010-04-24 17:59:49 +00009820$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009821
Matthias Kloseb159a552010-04-25 21:00:44 +00009822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009823$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009824else
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9826$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009827
9828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
9831$as_echo_n "checking for fchdir... " >&6; }
9832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009833/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009834#include <unistd.h>
9835int
9836main ()
9837{
9838void *x=fchdir
9839 ;
9840 return 0;
9841}
9842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009843if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009844
Matthias Kloseb9621712010-04-24 17:59:49 +00009845$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009846
Matthias Kloseb159a552010-04-25 21:00:44 +00009847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009848$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009849else
Matthias Kloseb9621712010-04-24 17:59:49 +00009850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9851$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009852
9853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
9856$as_echo_n "checking for fsync... " >&6; }
9857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009858/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009859#include <unistd.h>
9860int
9861main ()
9862{
9863void *x=fsync
9864 ;
9865 return 0;
9866}
9867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009868if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009869
Matthias Kloseb9621712010-04-24 17:59:49 +00009870$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009871
Matthias Kloseb159a552010-04-25 21:00:44 +00009872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009873$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009874else
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9876$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009877
9878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
9881$as_echo_n "checking for fdatasync... " >&6; }
9882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009883/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009884#include <unistd.h>
9885int
9886main ()
9887{
9888void *x=fdatasync
9889 ;
9890 return 0;
9891}
9892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009893if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009894
Matthias Kloseb9621712010-04-24 17:59:49 +00009895$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009896
Matthias Kloseb159a552010-04-25 21:00:44 +00009897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009898$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009899else
Matthias Kloseb9621712010-04-24 17:59:49 +00009900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9901$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +00009902
9903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
9906$as_echo_n "checking for epoll... " >&6; }
9907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009908/* end confdefs.h. */
9909#include <sys/epoll.h>
9910int
9911main ()
9912{
9913void *x=epoll_create
9914 ;
9915 return 0;
9916}
9917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009918if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +00009919
Matthias Kloseb9621712010-04-24 17:59:49 +00009920$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009921
Matthias Kloseb159a552010-04-25 21:00:44 +00009922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009923$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009924else
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009927
9928fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -06009930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
9931$as_echo_n "checking for epoll_create1... " >&6; }
9932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9933/* end confdefs.h. */
9934#include <sys/epoll.h>
9935int
9936main ()
9937{
9938void *x=epoll_create1
9939 ;
9940 return 0;
9941}
9942_ACEOF
9943if ac_fn_c_try_compile "$LINENO"; then :
9944
9945$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
9946
9947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9948$as_echo "yes" >&6; }
9949else
9950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952
9953fi
9954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
9956$as_echo_n "checking for kqueue... " >&6; }
9957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009958/* end confdefs.h. */
9959
9960#include <sys/types.h>
9961#include <sys/event.h>
9962
9963int
9964main ()
9965{
9966int x=kqueue()
9967 ;
9968 return 0;
9969}
9970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009971if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009972
Matthias Kloseb9621712010-04-24 17:59:49 +00009973$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009974
Matthias Kloseb159a552010-04-25 21:00:44 +00009975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009976$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009977else
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9979$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009980
9981fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +00009982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +00009983# On some systems (eg. FreeBSD 5), we would find a definition of the
9984# functions ctermid_r, setgroups in the library, but no prototype
9985# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
9986# address to avoid compiler warnings and potential miscompilations
9987# because of the missing prototypes.
9988
Matthias Kloseb9621712010-04-24 17:59:49 +00009989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
9990$as_echo_n "checking for ctermid_r... " >&6; }
9991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009992/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +00009993
Martin v. Löwisd5843682002-11-21 20:41:28 +00009994#include <stdio.h>
9995
Martin v. Löwisd5843682002-11-21 20:41:28 +00009996int
9997main ()
9998{
9999void* p = ctermid_r
10000 ;
10001 return 0;
10002}
10003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010004if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010005
Matthias Kloseb9621712010-04-24 17:59:49 +000010006$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010007
Matthias Kloseb159a552010-04-25 21:00:44 +000010008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010009$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010010else
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10012$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010013
10014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10016
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10018$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010019if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010020 $as_echo_n "(cached) " >&6
10021else
10022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010023/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010024#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010025int
10026main ()
10027{
10028void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010029
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010030 ;
10031 return 0;
10032}
10033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010034if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010035 ac_cv_flock_decl=yes
10036else
10037 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010038
10039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010041
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010042fi
10043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10044$as_echo "$ac_cv_flock_decl" >&6; }
10045if test "x${ac_cv_flock_decl}" = xyes; then
10046 for ac_func in flock
10047do :
10048 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010049if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010050 cat >>confdefs.h <<_ACEOF
10051#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010052_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010053
Antoine Pitroua3000072010-09-07 14:52:42 +000010054else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010056$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010057if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010058 $as_echo_n "(cached) " >&6
10059else
10060 ac_check_lib_save_LIBS=$LIBS
10061LIBS="-lbsd $LIBS"
10062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10063/* end confdefs.h. */
10064
10065/* Override any GCC internal prototype to avoid an error.
10066 Use char because int might match the return type of a GCC
10067 builtin and then its argument prototype would still apply. */
10068#ifdef __cplusplus
10069extern "C"
10070#endif
10071char flock ();
10072int
10073main ()
10074{
10075return flock ();
10076 ;
10077 return 0;
10078}
10079_ACEOF
10080if ac_fn_c_try_link "$LINENO"; then :
10081 ac_cv_lib_bsd_flock=yes
10082else
10083 ac_cv_lib_bsd_flock=no
10084fi
10085rm -f core conftest.err conftest.$ac_objext \
10086 conftest$ac_exeext conftest.$ac_ext
10087LIBS=$ac_check_lib_save_LIBS
10088fi
10089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10090$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010091if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010092 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010093
10094
10095$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10096
10097
10098fi
10099
10100
10101fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010102done
10103
Antoine Pitroua3000072010-09-07 14:52:42 +000010104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010105
Matthias Kloseb9621712010-04-24 17:59:49 +000010106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10107$as_echo_n "checking for getpagesize... " >&6; }
10108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010109/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010110
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010111#include <unistd.h>
10112
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010113int
10114main ()
10115{
10116void* p = getpagesize
10117 ;
10118 return 0;
10119}
10120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010121if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010122
Matthias Kloseb9621712010-04-24 17:59:49 +000010123$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010124
Matthias Kloseb159a552010-04-25 21:00:44 +000010125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010126$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010127else
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10129$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010130
10131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010133
Victor Stinner984890f2011-11-24 13:53:38 +010010134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10135$as_echo_n "checking for broken unsetenv... " >&6; }
10136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10137/* end confdefs.h. */
10138
10139#include <stdlib.h>
10140
10141int
10142main ()
10143{
10144int res = unsetenv("DUMMY")
10145 ;
10146 return 0;
10147}
10148_ACEOF
10149if ac_fn_c_try_compile "$LINENO"; then :
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10151$as_echo "no" >&6; }
10152else
10153
10154$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10155
10156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10157$as_echo "yes" >&6; }
10158
10159fi
10160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10161
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010162for ac_prog in true
10163do
10164 # Extract the first word of "$ac_prog", so it can be a program name with args.
10165set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10167$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010168if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010169 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010170else
10171 if test -n "$TRUE"; then
10172 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10173else
10174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10175for as_dir in $PATH
10176do
10177 IFS=$as_save_IFS
10178 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 for ac_exec_ext in '' $ac_executable_extensions; do
Ned Deilycbfb9a52012-06-23 16:02:19 -070010180 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010181 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010182 $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 +000010183 break 2
10184 fi
10185done
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010188
10189fi
10190fi
10191TRUE=$ac_cv_prog_TRUE
10192if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10194$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010195else
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010198fi
10199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010201 test -n "$TRUE" && break
10202done
10203test -n "$TRUE" || TRUE="/bin/true"
10204
10205
Matthias Kloseb9621712010-04-24 17:59:49 +000010206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10207$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010208if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010210else
10211 ac_check_lib_save_LIBS=$LIBS
10212LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010214/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216/* Override any GCC internal prototype to avoid an error.
10217 Use char because int might match the return type of a GCC
10218 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010219#ifdef __cplusplus
10220extern "C"
10221#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010222char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010223int
10224main ()
10225{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010226return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010227 ;
10228 return 0;
10229}
10230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010231if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010232 ac_cv_lib_c_inet_aton=yes
10233else
Matthias Kloseb9621712010-04-24 17:59:49 +000010234 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010236rm -f core conftest.err conftest.$ac_objext \
10237 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010238LIBS=$ac_check_lib_save_LIBS
10239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10241$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010242if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010243 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010244else
Matthias Kloseb9621712010-04-24 17:59:49 +000010245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10246$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010247if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010249else
10250 ac_check_lib_save_LIBS=$LIBS
10251LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010253/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255/* Override any GCC internal prototype to avoid an error.
10256 Use char because int might match the return type of a GCC
10257 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010258#ifdef __cplusplus
10259extern "C"
10260#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010261char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010262int
10263main ()
10264{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010266 ;
10267 return 0;
10268}
10269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010270if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010271 ac_cv_lib_resolv_inet_aton=yes
10272else
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010275rm -f core conftest.err conftest.$ac_objext \
10276 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010277LIBS=$ac_check_lib_save_LIBS
10278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10280$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010281if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010282 cat >>confdefs.h <<_ACEOF
10283#define HAVE_LIBRESOLV 1
10284_ACEOF
10285
10286 LIBS="-lresolv $LIBS"
10287
10288fi
10289
10290
10291fi
10292
10293
Christian Heimesd0764e22007-12-04 15:00:33 +000010294# On Tru64, chflags seems to be present, but calling it will
10295# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10297$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010298if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010300else
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010302 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010303else
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010305/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010306
Christian Heimesd0764e22007-12-04 15:00:33 +000010307#include <sys/stat.h>
10308#include <unistd.h>
10309int main(int argc, char*argv[])
10310{
10311 if(chflags(argv[0], 0) != 0)
10312 return 1;
10313 return 0;
10314}
Ned Deily3eb67d52011-06-28 00:00:28 -070010315
Christian Heimesd0764e22007-12-04 15:00:33 +000010316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010317if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010318 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010319else
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10323 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010324fi
10325
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010326
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10329$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010330if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010332if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010333 ac_cv_have_chflags="yes"
10334else
10335 ac_cv_have_chflags="no"
10336fi
10337
10338fi
10339if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010340
Matthias Kloseb9621712010-04-24 17:59:49 +000010341$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010342
10343fi
10344
Matthias Kloseb9621712010-04-24 17:59:49 +000010345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10346$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010347if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010349else
Matthias Kloseb9621712010-04-24 17:59:49 +000010350 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010351 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010352else
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010354/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010355
Christian Heimesd0764e22007-12-04 15:00:33 +000010356#include <sys/stat.h>
10357#include <unistd.h>
10358int main(int argc, char*argv[])
10359{
10360 if(lchflags(argv[0], 0) != 0)
10361 return 1;
10362 return 0;
10363}
Ned Deily3eb67d52011-06-28 00:00:28 -070010364
Christian Heimesd0764e22007-12-04 15:00:33 +000010365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010366if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010367 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010368else
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10372 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010373fi
10374
10375
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010376fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10378$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010379if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010381if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010382 ac_cv_have_lchflags="yes"
10383else
10384 ac_cv_have_lchflags="no"
10385fi
10386
10387fi
10388if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010389
Matthias Kloseb9621712010-04-24 17:59:49 +000010390$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010391
10392fi
10393
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010394case $ac_sys_system/$ac_sys_release in
10395Darwin/*)
10396 _CUR_CFLAGS="${CFLAGS}"
10397 _CUR_LDFLAGS="${LDFLAGS}"
10398 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10399 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10400 ;;
10401esac
10402
Matthias Kloseb9621712010-04-24 17:59:49 +000010403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10404$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010405if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010406 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010407else
10408 ac_check_lib_save_LIBS=$LIBS
10409LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010411/* end confdefs.h. */
10412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010413/* Override any GCC internal prototype to avoid an error.
10414 Use char because int might match the return type of a GCC
10415 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010416#ifdef __cplusplus
10417extern "C"
10418#endif
10419char inflateCopy ();
10420int
10421main ()
10422{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010423return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010424 ;
10425 return 0;
10426}
10427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010428if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010429 ac_cv_lib_z_inflateCopy=yes
10430else
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010433rm -f core conftest.err conftest.$ac_objext \
10434 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010435LIBS=$ac_check_lib_save_LIBS
10436fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10438$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010439if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010440
Matthias Kloseb9621712010-04-24 17:59:49 +000010441$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010442
10443fi
10444
10445
10446case $ac_sys_system/$ac_sys_release in
10447Darwin/*)
10448 CFLAGS="${_CUR_CFLAGS}"
10449 LDFLAGS="${_CUR_LDFLAGS}"
10450 ;;
10451esac
10452
Matthias Kloseb9621712010-04-24 17:59:49 +000010453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10454$as_echo_n "checking for hstrerror... " >&6; }
10455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010456/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010457
Martin v. Löwise9416172003-05-03 10:12:45 +000010458#include <netdb.h>
10459
Martin v. Löwise9416172003-05-03 10:12:45 +000010460int
10461main ()
10462{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010463void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010464 ;
10465 return 0;
10466}
10467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010468if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010469
Matthias Kloseb9621712010-04-24 17:59:49 +000010470$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010471
Matthias Kloseb159a552010-04-25 21:00:44 +000010472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010473$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010474else
Matthias Kloseb9621712010-04-24 17:59:49 +000010475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10476$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010477
10478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010479rm -f core conftest.err conftest.$ac_objext \
10480 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010481
Matthias Kloseb9621712010-04-24 17:59:49 +000010482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10483$as_echo_n "checking for inet_aton... " >&6; }
10484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010485/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010486
Martin v. Löwis86d66262006-02-17 08:40:11 +000010487#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010488#include <sys/socket.h>
10489#include <netinet/in.h>
10490#include <arpa/inet.h>
10491
Martin v. Löwise9416172003-05-03 10:12:45 +000010492int
10493main ()
10494{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010495void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010496 ;
10497 return 0;
10498}
10499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010500if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010501
Matthias Kloseb9621712010-04-24 17:59:49 +000010502$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010503
Matthias Kloseb159a552010-04-25 21:00:44 +000010504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010505$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010506else
Matthias Kloseb9621712010-04-24 17:59:49 +000010507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10508$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010509
10510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010511rm -f core conftest.err conftest.$ac_objext \
10512 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010513
Matthias Kloseb9621712010-04-24 17:59:49 +000010514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10515$as_echo_n "checking for inet_pton... " >&6; }
10516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010517/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010518
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010519#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010520#include <sys/socket.h>
10521#include <netinet/in.h>
10522#include <arpa/inet.h>
10523
Martin v. Löwise9416172003-05-03 10:12:45 +000010524int
10525main ()
10526{
10527void* p = inet_pton
10528 ;
10529 return 0;
10530}
10531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010532if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010533
Matthias Kloseb9621712010-04-24 17:59:49 +000010534$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010535
Matthias Kloseb159a552010-04-25 21:00:44 +000010536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010537$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010538else
Matthias Kloseb9621712010-04-24 17:59:49 +000010539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10540$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010541
10542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000010544
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010545# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000010546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
10547$as_echo_n "checking for setgroups... " >&6; }
10548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010549/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010550
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010551#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000010552#ifdef HAVE_GRP_H
10553#include <grp.h>
10554#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000010555
Martin v. Löwisd5843682002-11-21 20:41:28 +000010556int
10557main ()
10558{
10559void* p = setgroups
10560 ;
10561 return 0;
10562}
10563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010565
Matthias Kloseb9621712010-04-24 17:59:49 +000010566$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010567
Matthias Kloseb159a552010-04-25 21:00:44 +000010568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010569$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010570else
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10572$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010573
10574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010576
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010577# check for openpty and forkpty
10578
10579for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010580do :
10581 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010582if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010583 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010584#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010585_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010586
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010587else
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
10589$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010590if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010592else
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010594LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598/* Override any GCC internal prototype to avoid an error.
10599 Use char because int might match the return type of a GCC
10600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010601#ifdef __cplusplus
10602extern "C"
10603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010604char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010605int
10606main ()
10607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010609 ;
10610 return 0;
10611}
10612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010615else
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010618rm -f core conftest.err conftest.$ac_objext \
10619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010620LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
10623$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010624if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010626 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010627else
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
10629$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010630if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010631 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010632else
10633 ac_check_lib_save_LIBS=$LIBS
10634LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010636/* end confdefs.h. */
10637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010638/* Override any GCC internal prototype to avoid an error.
10639 Use char because int might match the return type of a GCC
10640 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010641#ifdef __cplusplus
10642extern "C"
10643#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010644char openpty ();
10645int
10646main ()
10647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010648return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010649 ;
10650 return 0;
10651}
10652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010653if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010654 ac_cv_lib_bsd_openpty=yes
10655else
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010658rm -f core conftest.err conftest.$ac_objext \
10659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010660LIBS=$ac_check_lib_save_LIBS
10661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
10663$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010664if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010666 LIBS="$LIBS -lbsd"
10667fi
10668
10669
10670fi
10671
Fred Drake8cef4cf2000-06-28 16:40:38 +000010672
10673fi
10674done
10675
10676for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010677do :
10678 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020010679if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010680 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010681#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010682_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010683
Fred Drake8cef4cf2000-06-28 16:40:38 +000010684else
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
10686$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010687if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010688 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000010689else
Martin v. Löwis11437992002-04-12 09:54:03 +000010690 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010691LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695/* Override any GCC internal prototype to avoid an error.
10696 Use char because int might match the return type of a GCC
10697 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010698#ifdef __cplusplus
10699extern "C"
10700#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010701char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010702int
10703main ()
10704{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010706 ;
10707 return 0;
10708}
10709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010710if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000010712else
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010715rm -f core conftest.err conftest.$ac_objext \
10716 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010717LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000010718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
10720$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010721if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000010723 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010724else
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
10726$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010727if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010729else
10730 ac_check_lib_save_LIBS=$LIBS
10731LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010733/* end confdefs.h. */
10734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735/* Override any GCC internal prototype to avoid an error.
10736 Use char because int might match the return type of a GCC
10737 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010738#ifdef __cplusplus
10739extern "C"
10740#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010741char forkpty ();
10742int
10743main ()
10744{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010745return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010746 ;
10747 return 0;
10748}
10749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010750if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010751 ac_cv_lib_bsd_forkpty=yes
10752else
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000010754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010755rm -f core conftest.err conftest.$ac_objext \
10756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010757LIBS=$ac_check_lib_save_LIBS
10758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
10760$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010761if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000010763 LIBS="$LIBS -lbsd"
10764fi
10765
10766
10767fi
10768
Fred Drake8cef4cf2000-06-28 16:40:38 +000010769
10770fi
10771done
10772
Jack Jansendd19cf82001-12-06 22:36:17 +000010773
Christian Heimesb186d002008-03-18 15:15:01 +000010774# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000010775for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000010776do :
10777 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020010778if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000010779 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010780#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000010781_ACEOF
10782
10783fi
10784done
10785
10786
Michael W. Hudson54241132001-12-07 15:38:26 +000010787# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000010788for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000010789do :
10790 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10791ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010792if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010794#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010795_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000010796
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010797fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000010798done
10799
Michael W. Hudson54241132001-12-07 15:38:26 +000010800
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010801ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020010802if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010803 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000010804
Martin v. Löwis1142de32002-03-29 16:28:31 +000010805else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010806 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010807 *" dup2.$ac_objext "* ) ;;
10808 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010809 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000010810esac
10811
Martin v. Löwis1142de32002-03-29 16:28:31 +000010812fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010813
10814ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020010815if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010816 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
10817
10818else
10819 case " $LIBOBJS " in
10820 *" getcwd.$ac_objext "* ) ;;
10821 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
10822 ;;
10823esac
10824
10825fi
10826
10827ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020010828if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010829 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
10830
10831else
10832 case " $LIBOBJS " in
10833 *" strdup.$ac_objext "* ) ;;
10834 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
10835 ;;
10836esac
10837
10838fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000010839
10840
10841for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010842do :
10843 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010844if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010846#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010849/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010850#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010851int
10852main ()
10853{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010854getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 ;
10856 return 0;
10857}
10858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010859if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010862
Guido van Rossum627b2d71993-12-24 10:39:16 +000010863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010865
Guido van Rossum627b2d71993-12-24 10:39:16 +000010866fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010867done
Guido van Rossum627b2d71993-12-24 10:39:16 +000010868
Jack Jansen150753c2003-03-29 22:07:47 +000010869for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000010870do :
10871 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020010872if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000010873 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010874#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000010875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010877/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000010878#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000010879int
10880main ()
10881{
10882setpgrp(0,0);
10883 ;
10884 return 0;
10885}
10886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010887if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000010890
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000010893
10894fi
10895done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000010896
Thomas Wouters3a584202000-08-05 23:28:51 +000010897for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000010898do :
10899 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020010900if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010901 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010902#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000010906#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010907int
10908main ()
10909{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010910gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010911 ;
10912 return 0;
10913}
10914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010915if ac_fn_c_try_compile "$LINENO"; then :
10916
Guido van Rossum627b2d71993-12-24 10:39:16 +000010917else
Skip Montanaro6dead952003-09-25 14:50:04 +000010918
Matthias Kloseb9621712010-04-24 17:59:49 +000010919$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010920
Martin v. Löwis11437992002-04-12 09:54:03 +000010921
Guido van Rossum627b2d71993-12-24 10:39:16 +000010922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010924
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010925fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010926done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010927
Michael W. Hudson54241132001-12-07 15:38:26 +000010928
Victor Stinnere0be4232011-10-25 13:06:09 +020010929for ac_func in clock_gettime
10930do :
10931 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
10932if test "x$ac_cv_func_clock_gettime" = xyes; then :
10933 cat >>confdefs.h <<_ACEOF
10934#define HAVE_CLOCK_GETTIME 1
10935_ACEOF
10936
10937else
10938
10939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
10940$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
10941if ${ac_cv_lib_rt_clock_gettime+:} false; then :
10942 $as_echo_n "(cached) " >&6
10943else
10944 ac_check_lib_save_LIBS=$LIBS
10945LIBS="-lrt $LIBS"
10946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10947/* end confdefs.h. */
10948
10949/* Override any GCC internal prototype to avoid an error.
10950 Use char because int might match the return type of a GCC
10951 builtin and then its argument prototype would still apply. */
10952#ifdef __cplusplus
10953extern "C"
10954#endif
10955char clock_gettime ();
10956int
10957main ()
10958{
10959return clock_gettime ();
10960 ;
10961 return 0;
10962}
10963_ACEOF
10964if ac_fn_c_try_link "$LINENO"; then :
10965 ac_cv_lib_rt_clock_gettime=yes
10966else
10967 ac_cv_lib_rt_clock_gettime=no
10968fi
10969rm -f core conftest.err conftest.$ac_objext \
10970 conftest$ac_exeext conftest.$ac_ext
10971LIBS=$ac_check_lib_save_LIBS
10972fi
10973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
10974$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
10975if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
10976
10977 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
10978
10979
10980$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
10981
10982
10983fi
10984
10985
10986fi
10987done
10988
10989
10990for ac_func in clock_getres
10991do :
10992 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
10993if test "x$ac_cv_func_clock_getres" = xyes; then :
10994 cat >>confdefs.h <<_ACEOF
10995#define HAVE_CLOCK_GETRES 1
10996_ACEOF
10997
10998else
10999
11000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11001$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11002if ${ac_cv_lib_rt_clock_getres+:} false; then :
11003 $as_echo_n "(cached) " >&6
11004else
11005 ac_check_lib_save_LIBS=$LIBS
11006LIBS="-lrt $LIBS"
11007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11008/* end confdefs.h. */
11009
11010/* Override any GCC internal prototype to avoid an error.
11011 Use char because int might match the return type of a GCC
11012 builtin and then its argument prototype would still apply. */
11013#ifdef __cplusplus
11014extern "C"
11015#endif
11016char clock_getres ();
11017int
11018main ()
11019{
11020return clock_getres ();
11021 ;
11022 return 0;
11023}
11024_ACEOF
11025if ac_fn_c_try_link "$LINENO"; then :
11026 ac_cv_lib_rt_clock_getres=yes
11027else
11028 ac_cv_lib_rt_clock_getres=no
11029fi
11030rm -f core conftest.err conftest.$ac_objext \
11031 conftest$ac_exeext conftest.$ac_ext
11032LIBS=$ac_check_lib_save_LIBS
11033fi
11034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11035$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11036if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11037
11038 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11039
11040
11041fi
11042
11043
11044fi
11045done
11046
11047
Matthias Kloseb9621712010-04-24 17:59:49 +000011048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11049$as_echo_n "checking for major... " >&6; }
11050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011051/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011052
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011053#if defined(MAJOR_IN_MKDEV)
11054#include <sys/mkdev.h>
11055#elif defined(MAJOR_IN_SYSMACROS)
11056#include <sys/sysmacros.h>
11057#else
11058#include <sys/types.h>
11059#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011060
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011061int
11062main ()
11063{
11064
11065 makedev(major(0),minor(0));
11066
11067 ;
11068 return 0;
11069}
11070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011071if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011072
11073
Matthias Kloseb9621712010-04-24 17:59:49 +000011074$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011075
Matthias Kloseb9621712010-04-24 17:59:49 +000011076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11077$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011078
11079else
Skip Montanaro6dead952003-09-25 14:50:04 +000011080
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11082$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011083
11084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011085rm -f core conftest.err conftest.$ac_objext \
11086 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011087
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011088# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011089# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11091$as_echo_n "checking for getaddrinfo... " >&6; }
11092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011093/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011094
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011095#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011096#include <sys/socket.h>
11097#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011098#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011099
Martin v. Löwis11437992002-04-12 09:54:03 +000011100int
11101main ()
11102{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011103getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011104 ;
11105 return 0;
11106}
11107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011108if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011109 have_getaddrinfo=yes
11110else
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011113rm -f core conftest.err conftest.$ac_objext \
11114 conftest$ac_exeext conftest.$ac_ext
11115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11116$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011117if test $have_getaddrinfo = yes
11118then
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11120$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011121 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011123else
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011125
11126if test "${enable_ipv6+set}" = set; then
11127 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11128else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011129 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011130fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011131else
Matthias Kloseb9621712010-04-24 17:59:49 +000011132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011133/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011134
11135#include <sys/types.h>
11136#include <netdb.h>
11137#include <string.h>
11138#include <sys/socket.h>
11139#include <netinet/in.h>
11140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011141int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011142{
11143 int passive, gaierr, inet4 = 0, inet6 = 0;
11144 struct addrinfo hints, *ai, *aitop;
11145 char straddr[INET6_ADDRSTRLEN], strport[16];
11146
11147 for (passive = 0; passive <= 1; passive++) {
11148 memset(&hints, 0, sizeof(hints));
11149 hints.ai_family = AF_UNSPEC;
11150 hints.ai_flags = passive ? AI_PASSIVE : 0;
11151 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011152 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011153 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11154 (void)gai_strerror(gaierr);
11155 goto bad;
11156 }
11157 for (ai = aitop; ai; ai = ai->ai_next) {
11158 if (ai->ai_addr == NULL ||
11159 ai->ai_addrlen == 0 ||
11160 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11161 straddr, sizeof(straddr), strport, sizeof(strport),
11162 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11163 goto bad;
11164 }
11165 switch (ai->ai_family) {
11166 case AF_INET:
11167 if (strcmp(strport, "54321") != 0) {
11168 goto bad;
11169 }
11170 if (passive) {
11171 if (strcmp(straddr, "0.0.0.0") != 0) {
11172 goto bad;
11173 }
11174 } else {
11175 if (strcmp(straddr, "127.0.0.1") != 0) {
11176 goto bad;
11177 }
11178 }
11179 inet4++;
11180 break;
11181 case AF_INET6:
11182 if (strcmp(strport, "54321") != 0) {
11183 goto bad;
11184 }
11185 if (passive) {
11186 if (strcmp(straddr, "::") != 0) {
11187 goto bad;
11188 }
11189 } else {
11190 if (strcmp(straddr, "::1") != 0) {
11191 goto bad;
11192 }
11193 }
11194 inet6++;
11195 break;
11196 case AF_UNSPEC:
11197 goto bad;
11198 break;
11199 default:
11200 /* another family support? */
11201 break;
11202 }
11203 }
11204 }
11205
11206 if (!(inet4 == 0 || inet4 == 2))
11207 goto bad;
11208 if (!(inet6 == 0 || inet6 == 2))
11209 goto bad;
11210
11211 if (aitop)
11212 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011213 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011214
11215 bad:
11216 if (aitop)
11217 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011218 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011219}
11220
Martin v. Löwis11437992002-04-12 09:54:03 +000011221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011222if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011223 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011224else
Matthias Kloseb9621712010-04-24 17:59:49 +000011225 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11228 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011231fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011232
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011234
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11236$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11237
Mark Dickinson2df5d282009-12-31 21:22:50 +000011238if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011239then
11240 if test $ipv6 = yes
11241 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011242 echo 'Fatal: You must get working getaddrinfo() function.'
11243 echo ' or you can specify "--disable-ipv6"'.
11244 exit 1
11245 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011246else
Martin v. Löwis11437992002-04-12 09:54:03 +000011247
Matthias Kloseb9621712010-04-24 17:59:49 +000011248$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011249
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011250fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011251
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011252for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011253do :
11254 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011255if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011256 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011257#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011258_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011259
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011260fi
11261done
11262
Michael W. Hudson54241132001-12-07 15:38:26 +000011263
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011264# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11266$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011267if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011268 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011269else
Matthias Kloseb9621712010-04-24 17:59:49 +000011270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011271/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011272#include <sys/types.h>
11273#include <sys/time.h>
11274#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011275
Martin v. Löwis11437992002-04-12 09:54:03 +000011276int
11277main ()
11278{
11279if ((struct tm *) 0)
11280return 0;
11281 ;
11282 return 0;
11283}
11284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011285if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011286 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011287else
Matthias Kloseb9621712010-04-24 17:59:49 +000011288 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11293$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011294if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
Matthias Kloseb9621712010-04-24 17:59:49 +000011296$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011297
11298fi
11299
Matthias Kloseb9621712010-04-24 17:59:49 +000011300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11301$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011302if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011303 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011304else
Matthias Kloseb9621712010-04-24 17:59:49 +000011305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011306/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011307#include <sys/types.h>
11308#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011309
Martin v. Löwis11437992002-04-12 09:54:03 +000011310int
11311main ()
11312{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011313struct tm tm;
11314 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011316 ;
11317 return 0;
11318}
11319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011320if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321 ac_cv_struct_tm=time.h
11322else
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11328$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011329if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011330
Matthias Kloseb9621712010-04-24 17:59:49 +000011331$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011332
11333fi
11334
Matthias Kloseb9621712010-04-24 17:59:49 +000011335ac_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 +000011336#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011337
Matthias Kloseb9621712010-04-24 17:59:49 +000011338"
Victor Stinnere0be4232011-10-25 13:06:09 +020011339if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011340
11341cat >>confdefs.h <<_ACEOF
11342#define HAVE_STRUCT_TM_TM_ZONE 1
11343_ACEOF
11344
11345
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011346fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011347
Martin v. Löwis11437992002-04-12 09:54:03 +000011348if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11349
Matthias Kloseb9621712010-04-24 17:59:49 +000011350$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011351
11352else
Matthias Kloseb9621712010-04-24 17:59:49 +000011353 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11354"
Victor Stinnere0be4232011-10-25 13:06:09 +020011355if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011357else
Matthias Kloseb9621712010-04-24 17:59:49 +000011358 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011359fi
11360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011361cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011362#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363_ACEOF
11364
Matthias Kloseb9621712010-04-24 17:59:49 +000011365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11366$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011367if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011369else
Matthias Kloseb9621712010-04-24 17:59:49 +000011370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011371/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011372#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011373#if !HAVE_DECL_TZNAME
11374extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011375#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011376
Martin v. Löwis11437992002-04-12 09:54:03 +000011377int
11378main ()
11379{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011380return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 ;
11382 return 0;
11383}
11384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011385if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011386 ac_cv_var_tzname=yes
11387else
Matthias Kloseb9621712010-04-24 17:59:49 +000011388 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011390rm -f core conftest.err conftest.$ac_objext \
11391 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011392fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11394$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011395 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011396
Matthias Kloseb9621712010-04-24 17:59:49 +000011397$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011398
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011399 fi
11400fi
11401
Matthias Kloseb9621712010-04-24 17:59:49 +000011402ac_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 +020011403if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011404
11405cat >>confdefs.h <<_ACEOF
11406#define HAVE_STRUCT_STAT_ST_RDEV 1
11407_ACEOF
11408
11409
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011410fi
11411
Matthias Kloseb9621712010-04-24 17:59:49 +000011412ac_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 +020011413if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011414
Martin v. Löwis11437992002-04-12 09:54:03 +000011415cat >>confdefs.h <<_ACEOF
11416#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11417_ACEOF
11418
11419
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011420fi
11421
Matthias Kloseb9621712010-04-24 17:59:49 +000011422ac_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 +020011423if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011424
11425cat >>confdefs.h <<_ACEOF
11426#define HAVE_STRUCT_STAT_ST_FLAGS 1
11427_ACEOF
11428
11429
11430fi
11431
Matthias Kloseb9621712010-04-24 17:59:49 +000011432ac_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 +020011433if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011434
11435cat >>confdefs.h <<_ACEOF
11436#define HAVE_STRUCT_STAT_ST_GEN 1
11437_ACEOF
11438
11439
11440fi
11441
Matthias Kloseb9621712010-04-24 17:59:49 +000011442ac_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 +020011443if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011444
11445cat >>confdefs.h <<_ACEOF
11446#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11447_ACEOF
11448
11449
11450fi
11451
Matthias Kloseb9621712010-04-24 17:59:49 +000011452ac_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 +020011453if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011454
Martin v. Löwis11437992002-04-12 09:54:03 +000011455cat >>confdefs.h <<_ACEOF
11456#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11457_ACEOF
11458
11459
Matthias Kloseb9621712010-04-24 17:59:49 +000011460$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011461
11462else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011464 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11466 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011467esac
11468
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011469fi
11470
Michael W. Hudson54241132001-12-07 15:38:26 +000011471
Martin v. Löwis11437992002-04-12 09:54:03 +000011472
Matthias Kloseb9621712010-04-24 17:59:49 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11474$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011475if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011476 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011477else
Matthias Kloseb159a552010-04-25 21:00:44 +000011478
Matthias Kloseb9621712010-04-24 17:59:49 +000011479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011481#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011482int
11483main ()
11484{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011485return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 ;
11487 return 0;
11488}
11489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011490if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011491 ac_cv_header_time_altzone=yes
11492else
Matthias Kloseb9621712010-04-24 17:59:49 +000011493 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011497fi
11498
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11500$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011501if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011502
Matthias Kloseb9621712010-04-24 17:59:49 +000011503$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011504
11505fi
11506
Guido van Rossumda88dad1995-01-26 00:46:29 +000011507was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11509$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011511/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011512
11513#include <sys/types.h>
11514#include <sys/select.h>
11515#include <sys/time.h>
11516
Martin v. Löwis11437992002-04-12 09:54:03 +000011517int
11518main ()
11519{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011520;
Martin v. Löwis11437992002-04-12 09:54:03 +000011521 ;
11522 return 0;
11523}
11524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011525if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011526
11527
Matthias Kloseb9621712010-04-24 17:59:49 +000011528$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011529
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011530 was_it_defined=yes
11531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
11535$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011536
Matthias Kloseb9621712010-04-24 17:59:49 +000011537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
11538$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011539if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011541else
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011543/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011544#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011545int
11546main ()
11547{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011548struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000011549 ;
11550 return 0;
11551}
11552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011553if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011554 ac_cv_struct_addrinfo=yes
11555else
Matthias Kloseb9621712010-04-24 17:59:49 +000011556 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11559fi
11560
Matthias Kloseb9621712010-04-24 17:59:49 +000011561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
11562$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011563if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011564
Matthias Kloseb9621712010-04-24 17:59:49 +000011565$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011566
11567fi
11568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
11570$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011571if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011573else
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011575/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011576
11577# include <sys/types.h>
11578# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011579int
11580main ()
11581{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011582struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000011583 ;
11584 return 0;
11585}
11586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011587if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011588 ac_cv_struct_sockaddr_storage=yes
11589else
Matthias Kloseb9621712010-04-24 17:59:49 +000011590 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11593fi
11594
Matthias Kloseb9621712010-04-24 17:59:49 +000011595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
11596$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011597if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011600
11601fi
11602
Guido van Rossum627b2d71993-12-24 10:39:16 +000011603# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000011604
Matthias Kloseb9621712010-04-24 17:59:49 +000011605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
11606$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011607if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000011609else
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011612$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011613int
11614main ()
11615{
11616static int test_array [1 - 2 * !(((char) -1) < 0)];
Ned Deilycbfb9a52012-06-23 16:02:19 -070011617test_array [0] = 0;
11618return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011619
11620 ;
11621 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000011622}
Martin v. Löwis11437992002-04-12 09:54:03 +000011623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011624if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000011625 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011626else
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
11632$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011633if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011634 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011635
11636fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000011637
Matthias Kloseb9621712010-04-24 17:59:49 +000011638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11639$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011640if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011642else
Matthias Kloseb9621712010-04-24 17:59:49 +000011643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011644/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011645
Martin v. Löwis11437992002-04-12 09:54:03 +000011646int
11647main ()
11648{
Ned Deilycbfb9a52012-06-23 16:02:19 -070011649
Martin v. Löwis11437992002-04-12 09:54:03 +000011650#ifndef __cplusplus
Ned Deilycbfb9a52012-06-23 16:02:19 -070011651 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011652 typedef int charset[2];
Ned Deilycbfb9a52012-06-23 16:02:19 -070011653 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011655 char const *const *pcpcc;
11656 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 /* NEC SVR4.0.2 mips cc rejects this. */
11658 struct point {int x, y;};
11659 static struct point const zero = {0,0};
11660 /* AIX XL C 1.02.0.0 rejects this.
11661 It does not let you subtract one const X* pointer from another in
11662 an arm of an if-expression whose if-part is not a constant
11663 expression */
11664 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011665 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011666 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011667 ++pcpcc;
11668 ppc = (char**) pcpcc;
11669 pcpcc = (char const *const *) ppc;
Ned Deilycbfb9a52012-06-23 16:02:19 -070011670 { /* SCO 3.2v4 cc rejects this sort of thing. */
11671 char tx;
11672 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000011673 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011674
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011676 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011677 }
11678 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11679 int x[] = {25, 17};
11680 const int *foo = &x[0];
11681 ++foo;
11682 }
11683 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11684 typedef const int *iptr;
11685 iptr p = 0;
11686 ++p;
11687 }
Ned Deilycbfb9a52012-06-23 16:02:19 -070011688 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000011689 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ned Deilycbfb9a52012-06-23 16:02:19 -070011690 struct s { int j; const int *ap[3]; } bx;
11691 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000011692 }
11693 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11694 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011695 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011696 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011697 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000011698#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000011699
Martin v. Löwis11437992002-04-12 09:54:03 +000011700 ;
11701 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000011702}
Martin v. Löwis11437992002-04-12 09:54:03 +000011703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011704if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011705 ac_cv_c_const=yes
11706else
Matthias Kloseb9621712010-04-24 17:59:49 +000011707 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11712$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011713if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011714
Matthias Kloseb9621712010-04-24 17:59:49 +000011715$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011716
11717fi
11718
Michael W. Hudson54241132001-12-07 15:38:26 +000011719
Guido van Rossumda88dad1995-01-26 00:46:29 +000011720works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
11722$as_echo_n "checking for working volatile... " >&6; }
11723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011724/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011725
Martin v. Löwis11437992002-04-12 09:54:03 +000011726int
11727main ()
11728{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011729volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011730 ;
11731 return 0;
11732}
11733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011734if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011735 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011736else
Skip Montanaro6dead952003-09-25 14:50:04 +000011737
Matthias Kloseb9621712010-04-24 17:59:49 +000011738$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011739
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011740
Guido van Rossum627b2d71993-12-24 10:39:16 +000011741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11744$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011745
Guido van Rossumda88dad1995-01-26 00:46:29 +000011746works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
11748$as_echo_n "checking for working signed char... " >&6; }
11749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011750/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011751
Martin v. Löwis11437992002-04-12 09:54:03 +000011752int
11753main ()
11754{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011755signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 ;
11757 return 0;
11758}
11759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011760if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000011761 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000011762else
Skip Montanaro6dead952003-09-25 14:50:04 +000011763
Matthias Kloseb9621712010-04-24 17:59:49 +000011764$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000011765
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011766
Guido van Rossum7f43da71994-08-01 12:15:30 +000011767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11770$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000011771
Guido van Rossumda88dad1995-01-26 00:46:29 +000011772have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
11774$as_echo_n "checking for prototypes... " >&6; }
11775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011776/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011777int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011778int
11779main ()
11780{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011781return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 ;
11783 return 0;
11784}
11785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011787
Matthias Kloseb9621712010-04-24 17:59:49 +000011788$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011789
Matthias Kloseb159a552010-04-25 21:00:44 +000011790 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000011791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
11794$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011795
Guido van Rossumda88dad1995-01-26 00:46:29 +000011796works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
11798$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
11799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011800/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011801
11802#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000011803int foo(int x, ...) {
11804 va_list va;
11805 va_start(va, x);
11806 va_arg(va, int);
11807 va_arg(va, char *);
11808 va_arg(va, double);
11809 return 0;
11810}
Guido van Rossum7f43da71994-08-01 12:15:30 +000011811
Martin v. Löwis11437992002-04-12 09:54:03 +000011812int
11813main ()
11814{
Guido van Rossum90eea071996-08-30 20:58:57 +000011815return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000011816 ;
11817 return 0;
11818}
11819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011820if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011821
11822
Matthias Kloseb9621712010-04-24 17:59:49 +000011823$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011824
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011825 works=yes
11826
Guido van Rossum627b2d71993-12-24 10:39:16 +000011827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
11830$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011831
Martin v. Löwisd6320502004-08-12 13:45:08 +000011832# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
11834$as_echo_n "checking for socketpair... " >&6; }
11835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011836/* end confdefs.h. */
11837
11838#include <sys/types.h>
11839#include <sys/socket.h>
11840
11841int
11842main ()
11843{
11844void *x=socketpair
11845 ;
11846 return 0;
11847}
11848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011849if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000011850
Matthias Kloseb9621712010-04-24 17:59:49 +000011851$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000011852
Matthias Kloseb159a552010-04-25 21:00:44 +000011853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011854$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011855else
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11857$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000011858
11859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000011861
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011862# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000011863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
11864$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
11865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011866/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011867#include <sys/types.h>
11868#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011869int
11870main ()
11871{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011872struct sockaddr x;
11873x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011874 ;
11875 return 0;
11876}
11877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011878if ac_fn_c_try_compile "$LINENO"; then :
11879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11880$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011881
Matthias Kloseb9621712010-04-24 17:59:49 +000011882$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011883
11884else
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11886$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011887
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011890
Guido van Rossumda88dad1995-01-26 00:46:29 +000011891va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
11893$as_echo_n "checking whether va_list is an array... " >&6; }
11894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011895/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011896
11897#ifdef HAVE_STDARG_PROTOTYPES
11898#include <stdarg.h>
11899#else
11900#include <varargs.h>
11901#endif
11902
Martin v. Löwis11437992002-04-12 09:54:03 +000011903int
11904main ()
11905{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011906va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000011907 ;
11908 return 0;
11909}
11910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011911if ac_fn_c_try_compile "$LINENO"; then :
11912
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011913else
Skip Montanaro6dead952003-09-25 14:50:04 +000011914
Martin v. Löwis11437992002-04-12 09:54:03 +000011915
Matthias Kloseb9621712010-04-24 17:59:49 +000011916$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000011917
Guido van Rossumda88dad1995-01-26 00:46:29 +000011918 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011919
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
11923$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011924
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011925# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000011926
11927
Matthias Kloseb9621712010-04-24 17:59:49 +000011928ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020011929if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011930
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000011932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
11934$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011935 OLD_CFLAGS=$CFLAGS
11936 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011938/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011939
11940# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011941
Martin v. Löwis11437992002-04-12 09:54:03 +000011942int
11943main ()
11944{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011945
11946 char *name;
11947 struct hostent *he, *res;
11948 char buffer[2048];
11949 int buflen = 2048;
11950 int h_errnop;
11951
11952 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011953
11954 ;
11955 return 0;
11956}
11957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011959
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011961
Martin v. Löwis11437992002-04-12 09:54:03 +000011962
Matthias Kloseb9621712010-04-24 17:59:49 +000011963$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011964
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11966$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011967
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011968else
Skip Montanaro6dead952003-09-25 14:50:04 +000011969
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11971$as_echo "no" >&6; }
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
11973$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
11974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011975/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011976
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011977# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011978
Martin v. Löwis11437992002-04-12 09:54:03 +000011979int
11980main ()
11981{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011982
11983 char *name;
11984 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000011985 char buffer[2048];
11986 int buflen = 2048;
11987 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000011988
Matthias Kloseb159a552010-04-25 21:00:44 +000011989 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000011990
11991 ;
11992 return 0;
11993}
11994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011995if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011996
Matthias Kloseb9621712010-04-24 17:59:49 +000011997 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000011998
Martin v. Löwis11437992002-04-12 09:54:03 +000011999
Matthias Kloseb159a552010-04-25 21:00:44 +000012000$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012001
Matthias Kloseb9621712010-04-24 17:59:49 +000012002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12003$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012004
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012005else
Skip Montanaro6dead952003-09-25 14:50:04 +000012006
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12008$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12010$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12012/* end confdefs.h. */
12013
12014# include <netdb.h>
12015
12016int
12017main ()
12018{
12019
12020 char *name;
12021 struct hostent *he;
12022 struct hostent_data data;
12023
12024 (void) gethostbyname_r(name, he, &data);
12025
12026 ;
12027 return 0;
12028}
12029_ACEOF
12030if ac_fn_c_try_compile "$LINENO"; then :
12031
12032 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12033
12034
12035$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12036
12037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12038$as_echo "yes" >&6; }
12039
12040else
12041
12042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12043$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012044
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012047
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012050
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012053 CFLAGS=$OLD_CFLAGS
12054
12055else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 for ac_func in gethostbyname
12058do :
12059 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012060if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012061 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012062#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012063_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012064
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012065fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012066done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012067
Michael W. Hudson54241132001-12-07 15:38:26 +000012068
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012069fi
12070
Michael W. Hudson54241132001-12-07 15:38:26 +000012071
12072
12073
12074
12075
12076
Guido van Rossum627b2d71993-12-24 10:39:16 +000012077# checks for system services
12078# (none yet)
12079
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012080# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012081ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012082if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012083
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012084else
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12086$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012087if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089else
Martin v. Löwis11437992002-04-12 09:54:03 +000012090 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012091LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012095/* Override any GCC internal prototype to avoid an error.
12096 Use char because int might match the return type of a GCC
12097 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012098#ifdef __cplusplus
12099extern "C"
12100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012101char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012102int
12103main ()
12104{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012105return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 ;
12107 return 0;
12108}
12109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012110if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012111 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012112else
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012115rm -f core conftest.err conftest.$ac_objext \
12116 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012117LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12120$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012121if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012122 cat >>confdefs.h <<_ACEOF
12123#define HAVE_LIBIEEE 1
12124_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012125
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012126 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012127
Guido van Rossum627b2d71993-12-24 10:39:16 +000012128fi
12129
Michael W. Hudson54241132001-12-07 15:38:26 +000012130
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012131fi
12132
Michael W. Hudson54241132001-12-07 15:38:26 +000012133
Guido van Rossum7f253911997-05-09 02:42:48 +000012134# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12136$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012138# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012139if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012141if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012142then
12143
Matthias Kloseb9621712010-04-24 17:59:49 +000012144$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012145
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12147$as_echo "yes" >&6; }
12148else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12149$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012150fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012151else
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12153$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154fi
12155
Guido van Rossum7f253911997-05-09 02:42:48 +000012156
Guido van Rossum7f43da71994-08-01 12:15:30 +000012157# check for --with-libm=...
12158
Guido van Rossum563e7081996-09-10 18:20:48 +000012159case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012160Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012161*) LIBM=-lm
12162esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12164$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012167if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012168 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012169if test "$withval" = no
12170then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12172$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012173elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012174then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12176$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012177else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012178fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012179else
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12181$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012182fi
12183
Guido van Rossum7f43da71994-08-01 12:15:30 +000012184
12185# check for --with-libc=...
12186
Matthias Kloseb9621712010-04-24 17:59:49 +000012187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12188$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012190# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012191if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012192 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012193if test "$withval" = no
12194then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12196$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012197elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012198then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12200$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012201else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012202fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012203else
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12205$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206fi
12207
Guido van Rossum7f43da71994-08-01 12:15:30 +000012208
Stefan Krah1919b7e2012-03-21 18:25:23 +010012209# **************************************
12210# * Check for gcc x64 inline assembler *
12211# **************************************
12212
12213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12214$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12216/* end confdefs.h. */
12217
12218int
12219main ()
12220{
12221
12222 __asm__ __volatile__ ("movq %rcx, %rax");
12223
12224 ;
12225 return 0;
12226}
12227_ACEOF
12228if ac_fn_c_try_compile "$LINENO"; then :
12229 have_gcc_asm_for_x64=yes
12230else
12231 have_gcc_asm_for_x64=no
12232fi
12233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12235$as_echo "$have_gcc_asm_for_x64" >&6; }
12236if test "$have_gcc_asm_for_x64" = yes
12237then
12238
12239$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12240
12241fi
12242
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012243# **************************************************
12244# * Check for various properties of floating point *
12245# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012246
Matthias Kloseb9621712010-04-24 17:59:49 +000012247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12248$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012249if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012251else
12252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012254 ac_cv_little_endian_double=no
12255else
Matthias Kloseb9621712010-04-24 17:59:49 +000012256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012257/* end confdefs.h. */
12258
12259#include <string.h>
12260int main() {
12261 double x = 9006104071832581.0;
12262 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12263 return 0;
12264 else
12265 return 1;
12266}
12267
12268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012269if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012270 ac_cv_little_endian_double=yes
12271else
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12275 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012276fi
12277
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012278fi
12279
Matthias Kloseb9621712010-04-24 17:59:49 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12281$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012282if test "$ac_cv_little_endian_double" = yes
12283then
12284
Matthias Kloseb9621712010-04-24 17:59:49 +000012285$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012286
12287fi
12288
Matthias Kloseb9621712010-04-24 17:59:49 +000012289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12290$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012291if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012292 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012293else
12294
Matthias Kloseb9621712010-04-24 17:59:49 +000012295if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012296 ac_cv_big_endian_double=no
12297else
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012299/* end confdefs.h. */
12300
12301#include <string.h>
12302int main() {
12303 double x = 9006104071832581.0;
12304 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12305 return 0;
12306 else
12307 return 1;
12308}
12309
12310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012311if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012312 ac_cv_big_endian_double=yes
12313else
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012318fi
12319
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012320fi
12321
Matthias Kloseb9621712010-04-24 17:59:49 +000012322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12323$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012324if test "$ac_cv_big_endian_double" = yes
12325then
12326
Matthias Kloseb9621712010-04-24 17:59:49 +000012327$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012328
12329fi
12330
12331# Some ARM platforms use a mixed-endian representation for doubles.
12332# While Python doesn't currently have full support for these platforms
12333# (see e.g., issue 1762561), we can at least make sure that float <-> string
12334# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12336$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012337if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012339else
12340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012342 ac_cv_mixed_endian_double=no
12343else
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012345/* end confdefs.h. */
12346
12347#include <string.h>
12348int main() {
12349 double x = 9006104071832581.0;
12350 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12351 return 0;
12352 else
12353 return 1;
12354}
12355
12356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012357if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012358 ac_cv_mixed_endian_double=yes
12359else
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012362rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12363 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012364fi
12365
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012366fi
12367
Matthias Kloseb9621712010-04-24 17:59:49 +000012368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12369$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012370if test "$ac_cv_mixed_endian_double" = yes
12371then
12372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012374
12375fi
12376
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012377# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012378# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012379# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012380# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012381# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012382# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012383
12384# This inline assembler syntax may also work for suncc and icc,
12385# so we try it on all platforms.
12386
Matthias Kloseb9621712010-04-24 17:59:49 +000012387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12388$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012390/* end confdefs.h. */
12391
12392int
12393main ()
12394{
12395
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012396 unsigned short cw;
12397 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12398 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012399
12400 ;
12401 return 0;
12402}
12403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012404if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012405 have_gcc_asm_for_x87=yes
12406else
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012408fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12411$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012412if test "$have_gcc_asm_for_x87" = yes
12413then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012414
Matthias Kloseb9621712010-04-24 17:59:49 +000012415$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012416
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012417fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012418
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012419# Detect whether system arithmetic is subject to x87-style double
12420# rounding issues. The result of this test has little meaning on non
12421# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12422# mode is round-to-nearest and double rounding issues are present, and
12423# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12425$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012426# $BASECFLAGS may affect the result
12427ac_save_cc="$CC"
12428CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012429if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012430 ac_cv_x87_double_rounding=no
12431else
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012433/* end confdefs.h. */
12434
12435#include <stdlib.h>
12436#include <math.h>
12437int main() {
12438 volatile double x, y, z;
12439 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12440 x = 0.99999999999999989; /* 1-2**-53 */
12441 y = 1./x;
12442 if (y != 1.)
12443 exit(0);
12444 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12445 x = 1e16;
12446 y = 2.99999;
12447 z = x + y;
12448 if (z != 1e16+4.)
12449 exit(0);
12450 /* both tests show evidence of double rounding */
12451 exit(1);
12452}
12453
12454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012455if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012456 ac_cv_x87_double_rounding=no
12457else
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012460rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12461 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012462fi
12463
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012464CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12466$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012467if test "$ac_cv_x87_double_rounding" = yes
12468then
12469
Matthias Kloseb9621712010-04-24 17:59:49 +000012470$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012471
12472fi
12473
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012474# ************************************
12475# * Check for mathematical functions *
12476# ************************************
12477
12478LIBS_SAVE=$LIBS
12479LIBS="$LIBS $LIBM"
12480
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012481for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12482do :
12483 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12484ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012485if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012486 cat >>confdefs.h <<_ACEOF
12487#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12488_ACEOF
12489
12490fi
12491done
12492
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012493for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012494do :
12495 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12496ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012497if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012498 cat >>confdefs.h <<_ACEOF
12499#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12500_ACEOF
12501
12502fi
12503done
12504
12505ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12506"
Victor Stinnere0be4232011-10-25 13:06:09 +020012507if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012508 ac_have_decl=1
12509else
12510 ac_have_decl=0
12511fi
12512
12513cat >>confdefs.h <<_ACEOF
12514#define HAVE_DECL_ISINF $ac_have_decl
12515_ACEOF
12516ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12517"
Victor Stinnere0be4232011-10-25 13:06:09 +020012518if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012519 ac_have_decl=1
12520else
12521 ac_have_decl=0
12522fi
12523
12524cat >>confdefs.h <<_ACEOF
12525#define HAVE_DECL_ISNAN $ac_have_decl
12526_ACEOF
12527ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
12528"
Victor Stinnere0be4232011-10-25 13:06:09 +020012529if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012530 ac_have_decl=1
12531else
12532 ac_have_decl=0
12533fi
12534
12535cat >>confdefs.h <<_ACEOF
12536#define HAVE_DECL_ISFINITE $ac_have_decl
12537_ACEOF
12538
12539
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012540# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12541# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000012542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12543$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012544if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012545 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012546else
12547
Matthias Kloseb9621712010-04-24 17:59:49 +000012548if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012549 ac_cv_tanh_preserves_zero_sign=no
12550else
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012552/* end confdefs.h. */
12553
12554#include <math.h>
12555#include <stdlib.h>
12556int main() {
12557 /* return 0 if either negative zeros don't exist
12558 on this platform or if negative zeros exist
12559 and tanh(-0.) == -0. */
12560 if (atan2(0., -1.) == atan2(-0., -1.) ||
12561 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12562 else exit(1);
12563}
12564
12565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012566if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012567 ac_cv_tanh_preserves_zero_sign=yes
12568else
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12572 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012573fi
12574
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012575fi
12576
Matthias Kloseb9621712010-04-24 17:59:49 +000012577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12578$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012579if test "$ac_cv_tanh_preserves_zero_sign" = yes
12580then
12581
Matthias Kloseb9621712010-04-24 17:59:49 +000012582$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012583
12584fi
12585
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012586if test "$ac_cv_func_log1p" = yes
12587then
12588 # On some versions of AIX, log1p(-0.) returns 0. instead of
12589 # -0. See issue #9920.
12590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
12591$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012592 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012593 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012594else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012595
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012596 if test "$cross_compiling" = yes; then :
12597 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012598else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12600/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012601
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012602 #include <math.h>
12603 #include <stdlib.h>
12604 int main() {
12605 /* Fail if the signs of log1p(-0.) and -0. can be
12606 distinguished. */
12607 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
12608 return 0;
12609 else
12610 return 1;
12611 }
12612
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012613_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012614if ac_fn_c_try_run "$LINENO"; then :
12615 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012616else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012617 ac_cv_log1p_drops_zero_sign=yes
12618fi
12619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12620 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012621fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012622
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012623fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012624
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
12626$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
12627fi
12628if test "$ac_cv_log1p_drops_zero_sign" = yes
12629then
12630
12631$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
12632
12633fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012634
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000012635LIBS=$LIBS_SAVE
12636
Mark Dickinsona614f042009-11-28 12:48:43 +000012637# For multiprocessing module, check that sem_open
12638# actually works. For FreeBSD versions <= 7.2,
12639# the kernel module that provides POSIX semaphores
12640# isn't loaded by default, so an attempt to call
12641# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000012642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
12643$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012644if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012645 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000012646else
Matthias Kloseb9621712010-04-24 17:59:49 +000012647 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012648 ac_cv_posix_semaphores_enabled=yes
12649else
Matthias Kloseb9621712010-04-24 17:59:49 +000012650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012651/* end confdefs.h. */
12652
12653#include <unistd.h>
12654#include <fcntl.h>
12655#include <stdio.h>
12656#include <semaphore.h>
12657#include <sys/stat.h>
12658
12659int main(void) {
12660 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
12661 if (a == SEM_FAILED) {
12662 perror("sem_open");
12663 return 1;
12664 }
12665 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012666 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000012667 return 0;
12668}
12669
12670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012671if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000012672 ac_cv_posix_semaphores_enabled=yes
12673else
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000012675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12677 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000012678fi
12679
12680
Mark Dickinsona614f042009-11-28 12:48:43 +000012681fi
12682
Matthias Kloseb9621712010-04-24 17:59:49 +000012683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
12684$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000012685if test $ac_cv_posix_semaphores_enabled = no
12686then
12687
Matthias Kloseb9621712010-04-24 17:59:49 +000012688$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000012689
12690fi
12691
Mark Dickinson10683072009-04-18 21:18:19 +000012692# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000012693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
12694$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012695if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012697else
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012699 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000012700else
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000012702/* end confdefs.h. */
12703
12704#include <unistd.h>
12705#include <fcntl.h>
12706#include <stdio.h>
12707#include <semaphore.h>
12708#include <sys/stat.h>
12709
12710int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000012711 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000012712 int count;
12713 int res;
12714 if(a==SEM_FAILED){
12715 perror("sem_open");
12716 return 1;
12717
12718 }
12719 res = sem_getvalue(a, &count);
12720 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000012721 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000012722 return res==-1 ? 1 : 0;
12723}
12724
Mark Dickinson10683072009-04-18 21:18:19 +000012725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012726if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012727 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000012728else
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012733fi
12734
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012735
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012736fi
12737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
12739$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012740if test $ac_cv_broken_sem_getvalue = yes
12741then
12742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012744
12745fi
12746
Mark Dickinsonbd792642009-03-18 20:06:12 +000012747# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000012748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
12749$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012750# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012751if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000012752 enableval=$enable_big_digits; case $enable_big_digits in
12753yes)
12754 enable_big_digits=30 ;;
12755no)
12756 enable_big_digits=15 ;;
1275715|30)
12758 ;;
12759*)
Victor Stinnere0be4232011-10-25 13:06:09 +020012760 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 +000012761esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
12763$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012764
12765cat >>confdefs.h <<_ACEOF
12766#define PYLONG_BITS_IN_DIGIT $enable_big_digits
12767_ACEOF
12768
12769
12770else
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
12772$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000012773fi
12774
12775
Guido van Rossumef2255b2000-03-10 22:30:29 +000012776# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012777ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012778if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012779
12780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012782
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012783 wchar_h="yes"
12784
Guido van Rossumef2255b2000-03-10 22:30:29 +000012785else
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000012787
12788fi
12789
Michael W. Hudson54241132001-12-07 15:38:26 +000012790
Martin v. Löwis11437992002-04-12 09:54:03 +000012791
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012792# determine wchar_t size
12793if test "$wchar_h" = yes
12794then
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12797# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12798# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000012799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
12800$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012801if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012803else
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
12805"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012806
Martin v. Löwis11437992002-04-12 09:54:03 +000012807else
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 if test "$ac_cv_type_wchar_t" = yes; then
12809 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012811as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020012812See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012813 else
12814 ac_cv_sizeof_wchar_t=0
12815 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012817
Martin v. Löwis11437992002-04-12 09:54:03 +000012818fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
12820$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821
12822
12823
Martin v. Löwis11437992002-04-12 09:54:03 +000012824cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012825#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012826_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012827
Michael W. Hudson54241132001-12-07 15:38:26 +000012828
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012829fi
12830
Matthias Kloseb9621712010-04-24 17:59:49 +000012831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
12832$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012833have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012835/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012836
12837#include <tcl.h>
12838#if TCL_UTF_MAX != 6
12839# error "NOT UCS4_TCL"
12840#endif
12841int
12842main ()
12843{
12844
12845 ;
12846 return 0;
12847}
12848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012849if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012850
12851
Matthias Kloseb9621712010-04-24 17:59:49 +000012852$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012853
12854 have_ucs4_tcl=yes
12855
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
12859$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000012860
Skip Montanaro6dead952003-09-25 14:50:04 +000012861# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012862if test "$wchar_h" = yes
12863then
12864 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
12866$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012867 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012868 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012869else
12870
Matthias Kloseb9621712010-04-24 17:59:49 +000012871 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012872 ac_cv_wchar_t_signed=yes
12873else
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012875/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012876
12877 #include <wchar.h>
12878 int main()
12879 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012880 /* Success: exit code 0 */
12881 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012882 }
12883
12884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012885if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012886 ac_cv_wchar_t_signed=yes
12887else
Matthias Kloseb9621712010-04-24 17:59:49 +000012888 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012892fi
12893
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000012894fi
12895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
12897$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898fi
12899
Georg Brandl52d168a2008-01-07 18:10:24 +000012900# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012901if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000012902 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000012903then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012904 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012905
Matthias Kloseb9621712010-04-24 17:59:49 +000012906$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
Georg Brandl52d168a2008-01-07 18:10:24 +000012908else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012909 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000012910fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020012911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
12912$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000012913
12914# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12916$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012917if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000012919else
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 ac_cv_c_bigendian=unknown
12921 # See if we're dealing with a universal compiler.
12922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12923/* end confdefs.h. */
12924#ifndef __APPLE_CC__
12925 not a universal capable compiler
12926 #endif
12927 typedef int dummy;
12928
Skip Montanaro6dead952003-09-25 14:50:04 +000012929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012930if ac_fn_c_try_compile "$LINENO"; then :
12931
12932 # Check for potential -arch flags. It is not universal unless
12933 # there are at least two -arch flags with different values.
12934 ac_arch=
12935 ac_prev=
12936 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12937 if test -n "$ac_prev"; then
12938 case $ac_word in
12939 i?86 | x86_64 | ppc | ppc64)
12940 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12941 ac_arch=$ac_word
12942 else
12943 ac_cv_c_bigendian=universal
12944 break
12945 fi
12946 ;;
12947 esac
12948 ac_prev=
12949 elif test "x$ac_word" = "x-arch"; then
12950 ac_prev=arch
12951 fi
12952 done
12953fi
12954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12955 if test $ac_cv_c_bigendian = unknown; then
12956 # See if sys/param.h defines the BYTE_ORDER macro.
12957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012958/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012959#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012961
Martin v. Löwis11437992002-04-12 09:54:03 +000012962int
12963main ()
12964{
Matthias Kloseb9621712010-04-24 17:59:49 +000012965#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12966 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12967 && LITTLE_ENDIAN)
12968 bogus endian macros
12969 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012970
12971 ;
12972 return 0;
12973}
12974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012975if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012976 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012978/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000012979#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000012981
Martin v. Löwis11437992002-04-12 09:54:03 +000012982int
12983main ()
12984{
Guido van Rossumef2255b2000-03-10 22:30:29 +000012985#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000012986 not big endian
12987 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012988
12989 ;
12990 return 0;
12991}
12992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012993if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000012994 ac_cv_c_bigendian=yes
12995else
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000012997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012999fi
13000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13001 fi
13002 if test $ac_cv_c_bigendian = unknown; then
13003 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013005/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013006#include <limits.h>
13007
Martin v. Löwis11437992002-04-12 09:54:03 +000013008int
13009main ()
13010{
Matthias Kloseb9621712010-04-24 17:59:49 +000013011#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13012 bogus endian macros
13013 #endif
13014
Martin v. Löwis11437992002-04-12 09:54:03 +000013015 ;
13016 return 0;
13017}
13018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013019if ac_fn_c_try_compile "$LINENO"; then :
13020 # It does; now see whether it defined to _BIG_ENDIAN or not.
13021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13022/* end confdefs.h. */
13023#include <limits.h>
13024
13025int
13026main ()
13027{
13028#ifndef _BIG_ENDIAN
13029 not big endian
13030 #endif
13031
13032 ;
13033 return 0;
13034}
13035_ACEOF
13036if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013037 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013038else
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13042fi
13043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13044 fi
13045 if test $ac_cv_c_bigendian = unknown; then
13046 # Compile a test program.
13047 if test "$cross_compiling" = yes; then :
13048 # Try to guess by grepping values from an object file.
13049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13050/* end confdefs.h. */
13051short int ascii_mm[] =
13052 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13053 short int ascii_ii[] =
13054 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13055 int use_ascii (int i) {
13056 return ascii_mm[i] + ascii_ii[i];
13057 }
13058 short int ebcdic_ii[] =
13059 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13060 short int ebcdic_mm[] =
13061 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13062 int use_ebcdic (int i) {
13063 return ebcdic_mm[i] + ebcdic_ii[i];
13064 }
13065 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013066
Matthias Kloseb9621712010-04-24 17:59:49 +000013067int
13068main ()
13069{
13070return use_ascii (foo) == use_ebcdic (foo);
13071 ;
13072 return 0;
13073}
13074_ACEOF
13075if ac_fn_c_try_compile "$LINENO"; then :
13076 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13077 ac_cv_c_bigendian=yes
13078 fi
13079 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13080 if test "$ac_cv_c_bigendian" = unknown; then
13081 ac_cv_c_bigendian=no
13082 else
13083 # finding both strings is unlikely to happen, but who knows?
13084 ac_cv_c_bigendian=unknown
13085 fi
13086 fi
13087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013089else
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013091/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013092$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013093int
13094main ()
13095{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 /* Are we little or big endian? From Harbison&Steele. */
13098 union
13099 {
13100 long int l;
13101 char c[sizeof (long int)];
13102 } u;
13103 u.l = 1;
13104 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013105
13106 ;
13107 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013108}
Martin v. Löwis11437992002-04-12 09:54:03 +000013109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013110if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013111 ac_cv_c_bigendian=no
13112else
Matthias Kloseb9621712010-04-24 17:59:49 +000013113 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013114fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13116 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13122$as_echo "$ac_cv_c_bigendian" >&6; }
13123 case $ac_cv_c_bigendian in #(
13124 yes)
13125 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13126;; #(
13127 no)
13128 ;; #(
13129 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013130
Matthias Kloseb9621712010-04-24 17:59:49 +000013131$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 ;; #(
13134 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013135 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013136 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013138
Michael W. Hudson54241132001-12-07 15:38:26 +000013139
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013140# ABI version string for Python extension modules. This appears between the
13141# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13142# from the following attributes which affect the ABI of this Python build (in
13143# this order):
13144#
13145# * The Python implementation (always 'cpython-' for us)
13146# * The major and minor version numbers
13147# * --with-pydebug (adds a 'd')
13148# * --with-pymalloc (adds a 'm')
13149# * --with-wide-unicode (adds a 'u')
13150#
13151# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013152# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13153# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013154
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13156$as_echo_n "checking ABIFLAGS... " >&6; }
13157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13158$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13160$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013161SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13163$as_echo "$SOABI" >&6; }
13164
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13166$as_echo_n "checking LDVERSION... " >&6; }
13167LDVERSION='$(VERSION)$(ABIFLAGS)'
13168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13169$as_echo "$LDVERSION" >&6; }
13170
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013171# SO is the extension of shared libraries `(including the dot!)
13172# -- usually .so, .sl on HP-UX, .dll on Cygwin
13173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13174$as_echo_n "checking SO... " >&6; }
13175if test -z "$SO"
13176then
13177 case $ac_sys_system in
13178 hp*|HP*)
13179 case `uname -m` in
13180 ia64) SO=.so;;
13181 *) SO=.sl;;
13182 esac
13183 ;;
13184 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013185 Linux*|GNU*)
13186 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013187 *) SO=.so;;
13188 esac
13189else
13190 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013191 echo
13192 echo '====================================================================='
13193 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013194 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013195 echo '+ Do you really mean to change the extension for shared libraries? +'
13196 echo '+ Continuing in 10 seconds to let you to ponder. +'
13197 echo '+ +'
13198 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013199 sleep 10
13200fi
13201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13202$as_echo "$SO" >&6; }
13203
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013204# Check whether right shifting a negative integer extends the sign bit
13205# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13207$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013208if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013210else
Martin v. Löwis11437992002-04-12 09:54:03 +000013211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013213 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013214else
Matthias Kloseb9621712010-04-24 17:59:49 +000013215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013216/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013217
13218int main()
13219{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013220 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013221}
13222
Martin v. Löwis11437992002-04-12 09:54:03 +000013223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013224if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013225 ac_cv_rshift_extends_sign=yes
13226else
Matthias Kloseb9621712010-04-24 17:59:49 +000013227 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13230 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013231fi
13232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013233fi
13234
Matthias Kloseb9621712010-04-24 17:59:49 +000013235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13236$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013237if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013238then
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013241
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013242fi
13243
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013244# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13246$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013247if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013248 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013249else
Martin v. Löwis11437992002-04-12 09:54:03 +000013250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013252/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013253#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013254int
13255main ()
13256{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013257
13258 FILE *f = fopen("/dev/null", "r");
13259 flockfile(f);
13260 getc_unlocked(f);
13261 funlockfile(f);
13262
Martin v. Löwis11437992002-04-12 09:54:03 +000013263 ;
13264 return 0;
13265}
13266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013267if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013268 ac_cv_have_getc_unlocked=yes
13269else
Matthias Kloseb9621712010-04-24 17:59:49 +000013270 ac_cv_have_getc_unlocked=no
13271fi
13272rm -f core conftest.err conftest.$ac_objext \
13273 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013275
Matthias Kloseb9621712010-04-24 17:59:49 +000013276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13277$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013278if test "$ac_cv_have_getc_unlocked" = yes
13279then
Martin v. Löwis11437992002-04-12 09:54:03 +000013280
Matthias Kloseb9621712010-04-24 17:59:49 +000013281$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013282
13283fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013284
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013285# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013286# save the value of LIBS so we don't actually link Python with readline
13287LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013288
Gregory P. Smith18820942008-09-07 06:24:49 +000013289# On some systems we need to link readline to a termcap compatible
13290# library. NOTE: Keep the precedence of listed libraries synchronised
13291# with setup.py.
13292py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13294$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013295for py_libtermcap in "" ncursesw ncurses curses termcap; do
13296 if test -z "$py_libtermcap"; then
13297 READLINE_LIBS="-lreadline"
13298 else
13299 READLINE_LIBS="-lreadline -l$py_libtermcap"
13300 fi
13301 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013303/* end confdefs.h. */
13304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013305/* Override any GCC internal prototype to avoid an error.
13306 Use char because int might match the return type of a GCC
13307 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013308#ifdef __cplusplus
13309extern "C"
13310#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013311char readline ();
13312int
13313main ()
13314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013315return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013316 ;
13317 return 0;
13318}
13319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013320if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013321 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013322fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013323rm -f core conftest.err conftest.$ac_objext \
13324 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013325 if test $py_cv_lib_readline = yes; then
13326 break
13327 fi
13328done
13329# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13330#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013331if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13333$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013334else
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13336$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013337
Matthias Kloseb9621712010-04-24 17:59:49 +000013338$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013339
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013340fi
13341
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013342# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13344$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013345if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013346 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013347else
13348 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013349LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013351/* end confdefs.h. */
13352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013353/* Override any GCC internal prototype to avoid an error.
13354 Use char because int might match the return type of a GCC
13355 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013356#ifdef __cplusplus
13357extern "C"
13358#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013359char rl_callback_handler_install ();
13360int
13361main ()
13362{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013363return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013364 ;
13365 return 0;
13366}
13367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013368if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013369 ac_cv_lib_readline_rl_callback_handler_install=yes
13370else
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013373rm -f core conftest.err conftest.$ac_objext \
13374 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013375LIBS=$ac_check_lib_save_LIBS
13376fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13378$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013379if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013382
13383fi
13384
13385
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013386# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013388/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013389#include <readline/readline.h>
13390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013391if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013392 have_readline=yes
13393else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013394 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013395
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013396fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013397rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013398if test $have_readline = yes
13399then
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013401/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013402#include <readline/readline.h>
13403
13404_ACEOF
13405if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013409
13410fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013411rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013412
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013414/* end confdefs.h. */
13415#include <readline/readline.h>
13416
13417_ACEOF
13418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013422
13423fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013424rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013425
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013426fi
13427
Martin v. Löwis0daad592001-09-30 21:09:59 +000013428# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13430$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013431if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013433else
Martin v. Löwis11437992002-04-12 09:54:03 +000013434 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013435LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013439/* Override any GCC internal prototype to avoid an error.
13440 Use char because int might match the return type of a GCC
13441 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013442#ifdef __cplusplus
13443extern "C"
13444#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013445char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013446int
13447main ()
13448{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013449return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013450 ;
13451 return 0;
13452}
13453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013454if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013455 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013456else
Matthias Kloseb9621712010-04-24 17:59:49 +000013457 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013459rm -f core conftest.err conftest.$ac_objext \
13460 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013461LIBS=$ac_check_lib_save_LIBS
13462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13464$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013465if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013466
Matthias Kloseb9621712010-04-24 17:59:49 +000013467$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013468
Martin v. Löwis0daad592001-09-30 21:09:59 +000013469fi
13470
Michael W. Hudson54241132001-12-07 15:38:26 +000013471
Thomas Wouters89d996e2007-09-08 17:39:28 +000013472# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13474$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013475if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013477else
13478 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013479LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013481/* end confdefs.h. */
13482
13483/* Override any GCC internal prototype to avoid an error.
13484 Use char because int might match the return type of a GCC
13485 builtin and then its argument prototype would still apply. */
13486#ifdef __cplusplus
13487extern "C"
13488#endif
13489char rl_completion_display_matches_hook ();
13490int
13491main ()
13492{
13493return rl_completion_display_matches_hook ();
13494 ;
13495 return 0;
13496}
13497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013498if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013499 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13500else
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013503rm -f core conftest.err conftest.$ac_objext \
13504 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013505LIBS=$ac_check_lib_save_LIBS
13506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13508$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013509if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013512
13513fi
13514
13515
Martin v. Löwis0daad592001-09-30 21:09:59 +000013516# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13518$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013519if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013520 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013521else
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013523LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013527/* Override any GCC internal prototype to avoid an error.
13528 Use char because int might match the return type of a GCC
13529 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013530#ifdef __cplusplus
13531extern "C"
13532#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013533char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013534int
13535main ()
13536{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013538 ;
13539 return 0;
13540}
13541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013542if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013543 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000013544else
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000013546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013547rm -f core conftest.err conftest.$ac_objext \
13548 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013549LIBS=$ac_check_lib_save_LIBS
13550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
13552$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013553if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000013556
Guido van Rossum353ae582001-07-10 16:45:32 +000013557fi
13558
Jack Jansendd19cf82001-12-06 22:36:17 +000013559
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013560# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013562/* end confdefs.h. */
13563#include <readline/readline.h>
13564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013565if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013566 have_readline=yes
13567else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013568 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013569
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013570fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013571rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013572if test $have_readline = yes
13573then
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013575/* end confdefs.h. */
13576#include <readline/readline.h>
13577
13578_ACEOF
13579if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013583
13584fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013585rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013586
13587fi
13588
Martin v. Löwis82bca632006-02-10 20:49:30 +000013589# End of readline checks: restore LIBS
13590LIBS=$LIBS_no_readline
13591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
13593$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013594if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000013596else
Martin v. Löwis11437992002-04-12 09:54:03 +000013597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013599 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013600else
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013602/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013603
13604int main()
13605{
13606 int val1 = nice(1);
13607 if (val1 != -1 && val1 == nice(2))
13608 exit(0);
13609 exit(1);
13610}
13611
Martin v. Löwis11437992002-04-12 09:54:03 +000013612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013613if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013614 ac_cv_broken_nice=yes
13615else
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013618rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13619 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013620fi
13621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013622fi
13623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
13625$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013626if test "$ac_cv_broken_nice" = yes
13627then
Martin v. Löwis11437992002-04-12 09:54:03 +000013628
Matthias Kloseb9621712010-04-24 17:59:49 +000013629$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000013630
13631fi
13632
Matthias Kloseb9621712010-04-24 17:59:49 +000013633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
13634$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013635if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013637else
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013639 ac_cv_broken_poll=no
13640else
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013642/* end confdefs.h. */
13643
13644#include <poll.h>
13645
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013646int main()
13647{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013648 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013649 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013650
13651 close (42);
13652
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013653 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013654 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013655 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013656 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013657 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013658 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013659 return 1;
13660}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013661
13662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013663if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013664 ac_cv_broken_poll=yes
13665else
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13669 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013671
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013672fi
13673
Matthias Kloseb9621712010-04-24 17:59:49 +000013674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
13675$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013676if test "$ac_cv_broken_poll" = yes
13677then
13678
Matthias Kloseb9621712010-04-24 17:59:49 +000013679$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013680
13681fi
13682
Brett Cannon43802422005-02-10 20:48:03 +000013683# 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 +000013684# (which is not required by ISO C or UNIX spec) and/or if we support
13685# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000013686ac_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 +000013687#include <$ac_cv_struct_tm>
13688
Matthias Kloseb9621712010-04-24 17:59:49 +000013689"
Victor Stinnere0be4232011-10-25 13:06:09 +020013690if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000013691
13692cat >>confdefs.h <<_ACEOF
13693#define HAVE_STRUCT_TM_TM_ZONE 1
13694_ACEOF
13695
13696
13697fi
13698
13699if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013702
13703else
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13705"
Victor Stinnere0be4232011-10-25 13:06:09 +020013706if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013708else
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013710fi
13711
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013712cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013713#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714_ACEOF
13715
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13717$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013718if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013720else
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013722/* end confdefs.h. */
13723#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013724#if !HAVE_DECL_TZNAME
13725extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000013726#endif
13727
13728int
13729main ()
13730{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013731return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000013732 ;
13733 return 0;
13734}
13735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013736if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000013737 ac_cv_var_tzname=yes
13738else
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000013740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013741rm -f core conftest.err conftest.$ac_objext \
13742 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000013743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13745$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000013746 if test $ac_cv_var_tzname = yes; then
13747
Matthias Kloseb9621712010-04-24 17:59:49 +000013748$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000013749
13750 fi
13751fi
13752
Nicholas Bastine62c5c82004-03-21 23:45:42 +000013753
Martin v. Löwis1d459062005-03-14 21:23:33 +000013754# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000013755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
13756$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013757if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013759else
13760
Matthias Kloseb9621712010-04-24 17:59:49 +000013761if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013762 ac_cv_working_tzset=no
13763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013765/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013766
13767#include <stdlib.h>
13768#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000013769#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000013770
13771#if HAVE_TZNAME
13772extern char *tzname[];
13773#endif
13774
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013775int main()
13776{
Brett Cannon18367812003-09-19 00:59:16 +000013777 /* Note that we need to ensure that not only does tzset(3)
13778 do 'something' with localtime, but it works as documented
13779 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000013780 This includes making sure that tzname is set properly if
13781 tm->tm_zone does not exist since it is the alternative way
13782 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000013783
13784 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000013785 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000013786 */
13787
Martin v. Löwis1d459062005-03-14 21:23:33 +000013788 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000013789 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
13790
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013791 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013792 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013793 if (localtime(&groundhogday)->tm_hour != 0)
13794 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013795#if HAVE_TZNAME
13796 /* For UTC, tzname[1] is sometimes "", sometimes " " */
13797 if (strcmp(tzname[0], "UTC") ||
13798 (tzname[1][0] != 0 && tzname[1][0] != ' '))
13799 exit(1);
13800#endif
Brett Cannon18367812003-09-19 00:59:16 +000013801
Neal Norwitz7f2588c2003-04-11 15:35:53 +000013802 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013803 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000013804 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013805 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013806#if HAVE_TZNAME
13807 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
13808 exit(1);
13809#endif
Brett Cannon18367812003-09-19 00:59:16 +000013810
13811 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
13812 tzset();
13813 if (localtime(&groundhogday)->tm_hour != 11)
13814 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013815#if HAVE_TZNAME
13816 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
13817 exit(1);
13818#endif
13819
13820#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000013821 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
13822 exit(1);
13823 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
13824 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000013825#endif
Brett Cannon18367812003-09-19 00:59:16 +000013826
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013827 exit(0);
13828}
13829
13830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013831if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013832 ac_cv_working_tzset=yes
13833else
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013838fi
13839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013840fi
13841
Matthias Kloseb9621712010-04-24 17:59:49 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
13843$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013844if test "$ac_cv_working_tzset" = yes
13845then
13846
Matthias Kloseb9621712010-04-24 17:59:49 +000013847$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000013848
13849fi
13850
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013851# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
13853$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013854if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013855 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013856else
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013858/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013859#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013860int
13861main ()
13862{
13863
13864struct stat st;
13865st.st_mtim.tv_nsec = 1;
13866
13867 ;
13868 return 0;
13869}
13870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013871if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000013872 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013873else
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13877fi
13878
Matthias Kloseb9621712010-04-24 17:59:49 +000013879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
13880$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013881if test "$ac_cv_stat_tv_nsec" = yes
13882then
13883
Matthias Kloseb9621712010-04-24 17:59:49 +000013884$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000013885
13886fi
13887
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013888# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000013889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
13890$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013891if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013893else
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013895/* end confdefs.h. */
13896#include <sys/stat.h>
13897int
13898main ()
13899{
13900
13901struct stat st;
13902st.st_mtimespec.tv_nsec = 1;
13903
13904 ;
13905 return 0;
13906}
13907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013908if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013909 ac_cv_stat_tv_nsec2=yes
13910else
Matthias Kloseb9621712010-04-24 17:59:49 +000013911 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13914fi
13915
Matthias Kloseb9621712010-04-24 17:59:49 +000013916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
13917$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013918if test "$ac_cv_stat_tv_nsec2" = yes
13919then
13920
Matthias Kloseb9621712010-04-24 17:59:49 +000013921$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013922
13923fi
13924
Jack Jansen666b1e72001-10-31 12:11:48 +000013925# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000013926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
13927$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013928if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013930else
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. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013933#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013934int
13935main ()
13936{
Jack Jansen666b1e72001-10-31 12:11:48 +000013937
13938 int rtn;
13939 rtn = mvwdelch(0,0,0);
13940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941 ;
13942 return 0;
13943}
13944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013945if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013946 ac_cv_mvwdelch_is_expression=yes
13947else
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13951fi
13952
Matthias Kloseb9621712010-04-24 17:59:49 +000013953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
13954$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000013955
13956if test "$ac_cv_mvwdelch_is_expression" = yes
13957then
Martin v. Löwis11437992002-04-12 09:54:03 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013960
13961fi
13962
Matthias Kloseb9621712010-04-24 17:59:49 +000013963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
13964$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013965if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000013967else
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013969/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000013970#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013971int
13972main ()
13973{
Jack Jansen666b1e72001-10-31 12:11:48 +000013974
13975 WINDOW *w;
13976 w->_flags = 0;
13977
Martin v. Löwis11437992002-04-12 09:54:03 +000013978 ;
13979 return 0;
13980}
13981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013982if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000013983 ac_cv_window_has_flags=yes
13984else
Matthias Kloseb9621712010-04-24 17:59:49 +000013985 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000013986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13988fi
13989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
13991$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013992
Jack Jansen666b1e72001-10-31 12:11:48 +000013993
13994if test "$ac_cv_window_has_flags" = yes
13995then
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
Matthias Kloseb9621712010-04-24 17:59:49 +000013997$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000013998
13999fi
14000
Matthias Kloseb9621712010-04-24 17:59:49 +000014001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14002$as_echo_n "checking for is_term_resized... " >&6; }
14003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014004/* end confdefs.h. */
14005#include <curses.h>
14006int
14007main ()
14008{
14009void *x=is_term_resized
14010 ;
14011 return 0;
14012}
14013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014014if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014015
Matthias Kloseb9621712010-04-24 17:59:49 +000014016$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014017
Matthias Kloseb159a552010-04-25 21:00:44 +000014018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014019$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014020else
Matthias Kloseb9621712010-04-24 17:59:49 +000014021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14022$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014023
14024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14026
Matthias Kloseb9621712010-04-24 17:59:49 +000014027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14028$as_echo_n "checking for resize_term... " >&6; }
14029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014030/* end confdefs.h. */
14031#include <curses.h>
14032int
14033main ()
14034{
14035void *x=resize_term
14036 ;
14037 return 0;
14038}
14039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014040if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014041
Matthias Kloseb9621712010-04-24 17:59:49 +000014042$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014043
Matthias Kloseb159a552010-04-25 21:00:44 +000014044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014045$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014046else
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14048$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014049
14050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14052
Matthias Kloseb9621712010-04-24 17:59:49 +000014053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14054$as_echo_n "checking for resizeterm... " >&6; }
14055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014056/* end confdefs.h. */
14057#include <curses.h>
14058int
14059main ()
14060{
14061void *x=resizeterm
14062 ;
14063 return 0;
14064}
14065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014066if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014067
Matthias Kloseb9621712010-04-24 17:59:49 +000014068$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014069
Matthias Kloseb159a552010-04-25 21:00:44 +000014070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014071$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014072else
Matthias Kloseb9621712010-04-24 17:59:49 +000014073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14074$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014075
14076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14078
Matthias Kloseb9621712010-04-24 17:59:49 +000014079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14080$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000014081
14082if test -r /dev/ptmx
14083then
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14085$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014086
Matthias Kloseb9621712010-04-24 17:59:49 +000014087$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014088
Thomas Wouters89f507f2006-12-13 04:49:30 +000014089else
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14091$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014092fi
14093
Matthias Kloseb9621712010-04-24 17:59:49 +000014094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14095$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000014096
14097if test -r /dev/ptc
14098then
Matthias Kloseb9621712010-04-24 17:59:49 +000014099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14100$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000014101
Matthias Kloseb9621712010-04-24 17:59:49 +000014102$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014103
Thomas Wouters89f507f2006-12-13 04:49:30 +000014104else
Matthias Kloseb9621712010-04-24 17:59:49 +000014105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14106$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000014107fi
14108
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014109if test "$have_long_long" = yes
14110then
Matthias Kloseb9621712010-04-24 17:59:49 +000014111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14112$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014113 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014114 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014115else
Matthias Kloseb9621712010-04-24 17:59:49 +000014116 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014117 ac_cv_have_long_long_format="cross -- assuming no"
14118 if test x$GCC = xyes; then
14119 save_CFLAGS=$CFLAGS
14120 CFLAGS="$CFLAGS -Werror -Wformat"
14121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14122/* end confdefs.h. */
14123
14124 #include <stdio.h>
14125 #include <stddef.h>
14126
14127int
14128main ()
14129{
14130
14131 char *buffer;
14132 sprintf(buffer, "%lld", (long long)123);
14133 sprintf(buffer, "%lld", (long long)-123);
14134 sprintf(buffer, "%llu", (unsigned long long)123);
14135
14136 ;
14137 return 0;
14138}
14139_ACEOF
14140if ac_fn_c_try_compile "$LINENO"; then :
14141 ac_cv_have_long_long_format=yes
14142
14143fi
14144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14145 CFLAGS=$save_CFLAGS
14146 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014147else
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014149/* end confdefs.h. */
14150
14151 #include <stdio.h>
14152 #include <stddef.h>
14153 #include <string.h>
14154
14155 #ifdef HAVE_SYS_TYPES_H
14156 #include <sys/types.h>
14157 #endif
14158
14159 int main()
14160 {
14161 char buffer[256];
14162
14163 if (sprintf(buffer, "%lld", (long long)123) < 0)
14164 return 1;
14165 if (strcmp(buffer, "123"))
14166 return 1;
14167
14168 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14169 return 1;
14170 if (strcmp(buffer, "-123"))
14171 return 1;
14172
14173 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14174 return 1;
14175 if (strcmp(buffer, "123"))
14176 return 1;
14177
14178 return 0;
14179 }
14180
14181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014182if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014183 ac_cv_have_long_long_format=yes
14184else
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014189fi
14190
14191
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014192fi
14193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14195$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014196fi
14197
Mark Dickinson89d7d412009-12-31 20:50:59 +000014198if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014199then
14200
Matthias Kloseb9621712010-04-24 17:59:49 +000014201$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014202
14203fi
14204
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014205if test $ac_sys_system = Darwin
14206then
14207 LIBS="$LIBS -framework CoreFoundation"
14208fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014209
Matthias Kloseb9621712010-04-24 17:59:49 +000014210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14211$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014212if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014214else
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014216 ac_cv_have_size_t_format="cross -- assuming yes"
14217
Thomas Wouters477c8d52006-05-27 19:21:47 +000014218else
Matthias Kloseb9621712010-04-24 17:59:49 +000014219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014220/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014221
Thomas Wouters477c8d52006-05-27 19:21:47 +000014222#include <stdio.h>
14223#include <stddef.h>
14224#include <string.h>
14225
Christian Heimes2c181612007-12-17 20:04:13 +000014226#ifdef HAVE_SYS_TYPES_H
14227#include <sys/types.h>
14228#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014229
14230#ifdef HAVE_SSIZE_T
14231typedef ssize_t Py_ssize_t;
14232#elif SIZEOF_VOID_P == SIZEOF_LONG
14233typedef long Py_ssize_t;
14234#else
14235typedef int Py_ssize_t;
14236#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014237
Christian Heimes2c181612007-12-17 20:04:13 +000014238int main()
14239{
14240 char buffer[256];
14241
Thomas Wouters477c8d52006-05-27 19:21:47 +000014242 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14243 return 1;
14244
Thomas Wouters89f507f2006-12-13 04:49:30 +000014245 if (strcmp(buffer, "123"))
14246 return 1;
14247
14248 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14249 return 1;
14250
14251 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014252 return 1;
14253
14254 return 0;
14255}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014256
Thomas Wouters477c8d52006-05-27 19:21:47 +000014257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014258if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014259 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014260else
Matthias Kloseb9621712010-04-24 17:59:49 +000014261 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014263rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14264 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014265fi
14266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14269$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014270if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014271
Matthias Kloseb9621712010-04-24 17:59:49 +000014272$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014273
14274fi
14275
Matthias Kloseb9621712010-04-24 17:59:49 +000014276ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014277#ifdef HAVE_SYS_TYPES_H
14278#include <sys/types.h>
14279#endif
14280#ifdef HAVE_SYS_SOCKET_H
14281#include <sys/socket.h>
14282#endif
14283
Matthias Kloseb9621712010-04-24 17:59:49 +000014284"
Victor Stinnere0be4232011-10-25 13:06:09 +020014285if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014286
Martin v. Löwis11437992002-04-12 09:54:03 +000014287else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014288
Matthias Kloseb9621712010-04-24 17:59:49 +000014289$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014290
14291fi
14292
Michael W. Hudson54241132001-12-07 15:38:26 +000014293
Matthias Kloseb9621712010-04-24 17:59:49 +000014294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14295$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014296if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014297 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014298else
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014300 ac_cv_broken_mbstowcs=no
14301else
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014303/* end confdefs.h. */
14304
14305#include<stdlib.h>
14306int main() {
14307 size_t len = -1;
14308 const char *str = "text";
14309 len = mbstowcs(NULL, str, 0);
14310 return (len != 4);
14311}
14312
14313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014314if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014315 ac_cv_broken_mbstowcs=no
14316else
Matthias Kloseb9621712010-04-24 17:59:49 +000014317 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14320 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014321fi
14322
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014323fi
14324
Matthias Kloseb9621712010-04-24 17:59:49 +000014325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14326$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014327if test "$ac_cv_broken_mbstowcs" = yes
14328then
14329
Matthias Kloseb9621712010-04-24 17:59:49 +000014330$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014331
14332fi
14333
Antoine Pitroub52ec782009-01-25 16:34:23 +000014334# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14336$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014337
14338# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014339if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014340 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014341if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014342then
14343
Matthias Kloseb9621712010-04-24 17:59:49 +000014344$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014345
Matthias Kloseb9621712010-04-24 17:59:49 +000014346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14347$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014348fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014349if test "$withval" = no
14350then
14351
14352$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14353
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14355$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014356fi
14357
Antoine Pitrou042b1282010-08-13 21:15:58 +000014358else
14359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14360$as_echo "no value specified" >&6; }
14361fi
14362
Antoine Pitroub52ec782009-01-25 16:34:23 +000014363
Matthias Kloseb17289e2012-03-15 19:51:34 +010014364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14365$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14366if ${ac_cv_computed_gotos+:} false; then :
14367 $as_echo_n "(cached) " >&6
14368else
14369 if test "$cross_compiling" = yes; then :
14370 if test "${with_computed_gotos+set}" = set; then
14371 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14372 else
14373 ac_cv_computed_gotos=no
14374 fi
14375else
14376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14377/* end confdefs.h. */
14378
14379int main(int argc, char **argv)
14380{
14381 static void *targets[1] = { &&LABEL1 };
14382 goto LABEL2;
14383LABEL1:
14384 return 0;
14385LABEL2:
14386 goto *targets[0];
14387 return 1;
14388}
14389
14390_ACEOF
14391if ac_fn_c_try_run "$LINENO"; then :
14392 ac_cv_computed_gotos=yes
14393else
14394 ac_cv_computed_gotos=no
14395fi
14396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14397 conftest.$ac_objext conftest.beam conftest.$ac_ext
14398fi
14399
14400fi
14401
14402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14403$as_echo "$ac_cv_computed_gotos" >&6; }
14404case "$ac_cv_computed_gotos" in yes*)
14405
14406$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14407
14408esac
14409
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014410case $ac_sys_system in
14411AIX*)
14412
14413$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14414 ;;
14415esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014416
Michael W. Hudson54241132001-12-07 15:38:26 +000014417
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014418
14419
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014420for h in `(cd $srcdir;echo Python/thread_*.h)`
14421do
14422 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14423done
14424
Michael W. Hudson54241132001-12-07 15:38:26 +000014425
Neal Norwitzd24499d2005-12-18 21:36:39 +000014426SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14428$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014429for dir in $SRCDIRS; do
14430 if test ! -d $dir; then
14431 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014432 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014433done
Matthias Kloseb9621712010-04-24 17:59:49 +000014434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14435$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014436
Stefan Krah1919b7e2012-03-21 18:25:23 +010014437# Availability of -O2:
14438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14439$as_echo_n "checking for -O2... " >&6; }
14440saved_cflags="$CFLAGS"
14441CFLAGS="-O2"
14442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14443/* end confdefs.h. */
14444
14445int
14446main ()
14447{
14448
14449
14450 ;
14451 return 0;
14452}
14453_ACEOF
14454if ac_fn_c_try_compile "$LINENO"; then :
14455 have_O2=yes
14456else
14457 have_O2=no
14458fi
14459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14461$as_echo "$have_O2" >&6; }
14462CFLAGS="$saved_cflags"
14463
14464# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14465# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14467$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14468saved_cflags="$CFLAGS"
14469CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14470if test "$have_O2" = no; then
14471 CFLAGS=""
14472fi
14473if test "$cross_compiling" = yes; then :
14474 have_glibc_memmove_bug=undefined
14475else
14476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14477/* end confdefs.h. */
14478
14479#include <stdio.h>
14480#include <stdlib.h>
14481#include <string.h>
14482void foo(void *p, void *q) { memmove(p, q, 19); }
14483int main() {
14484 char a[32] = "123456789000000000";
14485 foo(&a[9], a);
14486 if (strcmp(a, "123456789123456789000000000") != 0)
14487 return 1;
14488 foo(a, &a[9]);
14489 if (strcmp(a, "123456789000000000") != 0)
14490 return 1;
14491 return 0;
14492}
14493
14494_ACEOF
14495if ac_fn_c_try_run "$LINENO"; then :
14496 have_glibc_memmove_bug=no
14497else
14498 have_glibc_memmove_bug=yes
14499fi
14500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14501 conftest.$ac_objext conftest.beam conftest.$ac_ext
14502fi
14503
14504CFLAGS="$saved_cflags"
14505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
14506$as_echo "$have_glibc_memmove_bug" >&6; }
14507if test "$have_glibc_memmove_bug" = yes; then
14508
14509$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
14510
14511fi
14512
14513if test "$have_gcc_asm_for_x87" = yes; then
14514 # Some versions of gcc miscompile inline asm:
14515 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
14516 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
14517 case $CC in
14518 *gcc*)
14519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
14520$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
14521 saved_cflags="$CFLAGS"
14522 CFLAGS="-O2"
14523 if test "$cross_compiling" = yes; then :
14524 have_ipa_pure_const_bug=undefined
14525else
14526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14527/* end confdefs.h. */
14528
14529 __attribute__((noinline)) int
14530 foo(int *p) {
14531 int r;
14532 asm ( "movl \$6, (%1)\n\t"
14533 "xorl %0, %0\n\t"
14534 : "=r" (r) : "r" (p) : "memory"
14535 );
14536 return r;
14537 }
14538 int main() {
14539 int p = 8;
14540 if ((foo(&p) ? : p) != 6)
14541 return 1;
14542 return 0;
14543 }
14544
14545_ACEOF
14546if ac_fn_c_try_run "$LINENO"; then :
14547 have_ipa_pure_const_bug=no
14548else
14549 have_ipa_pure_const_bug=yes
14550fi
14551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14552 conftest.$ac_objext conftest.beam conftest.$ac_ext
14553fi
14554
14555 CFLAGS="$saved_cflags"
14556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
14557$as_echo "$have_ipa_pure_const_bug" >&6; }
14558 if test "$have_ipa_pure_const_bug" = yes; then
14559
14560$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
14561
14562 fi
14563 ;;
14564 esac
14565fi
14566
Guido van Rossum627b2d71993-12-24 10:39:16 +000014567# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000014568ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014569
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000014570ac_config_files="$ac_config_files Modules/ld_so_aix"
14571
Martin v. Löwis11437992002-04-12 09:54:03 +000014572cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014573# This file is a shell script that caches the results of configure
14574# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014575# scripts and configure runs, see configure's option --config-cache.
14576# It is not useful on other systems. If it contains results you don't
14577# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014578#
Martin v. Löwis11437992002-04-12 09:54:03 +000014579# config.status only pays attention to the cache file if you give it
14580# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014581#
Skip Montanaro6dead952003-09-25 14:50:04 +000014582# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014583# loading this file, other *unset* `ac_cv_foo' will be assigned the
14584# following values.
14585
14586_ACEOF
14587
Guido van Rossumf78abae1997-01-21 22:02:36 +000014588# The following way of writing the cache mishandles newlines in values,
14589# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014591# Ultrix sh set writes to stderr and can't be redirected directly,
14592# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014593(
14594 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14595 eval ac_val=\$$ac_var
14596 case $ac_val in #(
14597 *${as_nl}*)
14598 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14600$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014601 esac
14602 case $ac_var in #(
14603 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14605 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014606 esac ;;
14607 esac
14608 done
14609
Martin v. Löwis11437992002-04-12 09:54:03 +000014610 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14612 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000014613 # `set' does not quote correctly, so add quotes: double-quote
14614 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000014615 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014616 "s/'/'\\\\''/g;
14617 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014618 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000014619 *)
14620 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000014622 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623 esac |
14624 sort
14625) |
Martin v. Löwis11437992002-04-12 09:54:03 +000014626 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000014628 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014629 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000014630 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14631 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014632 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14633 :end' >>confcache
14634if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14635 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020014636 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14638$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020014639 if test ! -f "$cache_file" || test -h "$cache_file"; then
14640 cat confcache >"$cache_file"
14641 else
14642 case $cache_file in #(
14643 */* | ?:*)
14644 mv -f confcache "$cache_file"$$ &&
14645 mv -f "$cache_file"$$ "$cache_file" ;; #(
14646 *)
14647 mv -f confcache "$cache_file" ;;
14648 esac
14649 fi
14650 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014651 else
Matthias Kloseb9621712010-04-24 17:59:49 +000014652 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14653$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014654 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014655fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014656rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000014657
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014658test "x$prefix" = xNONE && prefix=$ac_default_prefix
14659# Let make expand exec_prefix.
14660test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000014661
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014662DEFS=-DHAVE_CONFIG_H
14663
Skip Montanaro6dead952003-09-25 14:50:04 +000014664ac_libobjs=
14665ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014666U=
Skip Montanaro6dead952003-09-25 14:50:04 +000014667for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14668 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000014670 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14672 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000014673 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14674 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000014675done
14676LIBOBJS=$ac_libobjs
14677
14678LTLIBOBJS=$ac_ltlibobjs
14679
14680
Martin v. Löwis11437992002-04-12 09:54:03 +000014681
Matthias Kloseb9621712010-04-24 17:59:49 +000014682
Victor Stinnere0be4232011-10-25 13:06:09 +020014683: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000014684ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000014685ac_clean_files_save=$ac_clean_files
14686ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014687{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14688$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14689as_write_fail=0
14690cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000014691#! $SHELL
14692# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014693# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014694# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000014695# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000014696
Martin v. Löwis11437992002-04-12 09:54:03 +000014697debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000014698ac_cs_recheck=false
14699ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000014700
Matthias Kloseb9621712010-04-24 17:59:49 +000014701SHELL=\${CONFIG_SHELL-$SHELL}
14702export SHELL
14703_ASEOF
14704cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14705## -------------------- ##
14706## M4sh Initialization. ##
14707## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000014708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014709# Be more Bourne compatible
14710DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000014711if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014712 emulate sh
14713 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000014714 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000014715 # is contrary to our usage. Disable this feature.
14716 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014718else
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 case `(set -o) 2>/dev/null` in #(
14720 *posix*) :
14721 set -o posix ;; #(
14722 *) :
14723 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014724esac
Michael W. Hudson54241132001-12-07 15:38:26 +000014725fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000014726
14727
Matthias Kloseb9621712010-04-24 17:59:49 +000014728as_nl='
14729'
14730export as_nl
14731# Printing a long string crashes Solaris 7 /usr/bin/printf.
14732as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14733as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14734as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14735# Prefer a ksh shell builtin over an external printf program on Solaris,
14736# but without wasting forks for bash or zsh.
14737if test -z "$BASH_VERSION$ZSH_VERSION" \
14738 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14739 as_echo='print -r --'
14740 as_echo_n='print -rn --'
14741elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14742 as_echo='printf %s\n'
14743 as_echo_n='printf %s'
14744else
14745 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14746 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14747 as_echo_n='/usr/ucb/echo -n'
14748 else
14749 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14750 as_echo_n_body='eval
14751 arg=$1;
14752 case $arg in #(
14753 *"$as_nl"*)
14754 expr "X$arg" : "X\\(.*\\)$as_nl";
14755 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14756 esac;
14757 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14758 '
14759 export as_echo_n_body
14760 as_echo_n='sh -c $as_echo_n_body as_echo'
14761 fi
14762 export as_echo_body
14763 as_echo='sh -c $as_echo_body as_echo'
14764fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014765
14766# The user is always right.
14767if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014768 PATH_SEPARATOR=:
14769 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14770 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14771 PATH_SEPARATOR=';'
14772 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014773fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775
14776# IFS
14777# We need space, tab and new line, in precisely that order. Quoting is
14778# there to prevent editors from complaining about space-tab.
14779# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14780# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781IFS=" "" $as_nl"
14782
14783# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020014784as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000014785case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014786 *[\\/]* ) as_myself=$0 ;;
14787 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000014788for as_dir in $PATH
14789do
14790 IFS=$as_save_IFS
14791 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14793 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014794IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000014795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014796 ;;
14797esac
14798# We did not find ourselves, most probably we were run as `sh COMMAND'
14799# in which case we are not to be found in the path.
14800if test "x$as_myself" = x; then
14801 as_myself=$0
14802fi
14803if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14805 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014806fi
14807
Matthias Kloseb9621712010-04-24 17:59:49 +000014808# Unset variables that we do not need and which cause bugs (e.g. in
14809# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14810# suppresses any "Segmentation fault" message there. '((' could
14811# trigger a bug in pdksh 5.2.14.
14812for as_var in BASH_ENV ENV MAIL MAILPATH
14813do eval test x\${$as_var+set} = xset \
14814 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815done
14816PS1='$ '
14817PS2='> '
14818PS4='+ '
14819
14820# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000014821LC_ALL=C
14822export LC_ALL
14823LANGUAGE=C
14824export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014825
Matthias Kloseb9621712010-04-24 17:59:49 +000014826# CDPATH.
14827(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14828
14829
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014830# as_fn_error STATUS ERROR [LINENO LOG_FD]
14831# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000014832# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14833# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014834# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000014835as_fn_error ()
14836{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014837 as_status=$1; test $as_status -eq 0 && as_status=1
14838 if test "$4"; then
14839 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14840 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000014841 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014842 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 as_fn_exit $as_status
14844} # as_fn_error
14845
14846
14847# as_fn_set_status STATUS
14848# -----------------------
14849# Set $? to STATUS, without forking.
14850as_fn_set_status ()
14851{
14852 return $1
14853} # as_fn_set_status
14854
14855# as_fn_exit STATUS
14856# -----------------
14857# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14858as_fn_exit ()
14859{
14860 set +e
14861 as_fn_set_status $1
14862 exit $1
14863} # as_fn_exit
14864
14865# as_fn_unset VAR
14866# ---------------
14867# Portably unset VAR.
14868as_fn_unset ()
14869{
14870 { eval $1=; unset $1;}
14871}
14872as_unset=as_fn_unset
14873# as_fn_append VAR VALUE
14874# ----------------------
14875# Append the text in VALUE to the end of the definition contained in VAR. Take
14876# advantage of any shell optimizations that allow amortized linear growth over
14877# repeated appends, instead of the typical quadratic growth present in naive
14878# implementations.
14879if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14880 eval 'as_fn_append ()
14881 {
14882 eval $1+=\$2
14883 }'
14884else
14885 as_fn_append ()
14886 {
14887 eval $1=\$$1\$2
14888 }
14889fi # as_fn_append
14890
14891# as_fn_arith ARG...
14892# ------------------
14893# Perform arithmetic evaluation on the ARGs, and store the result in the
14894# global $as_val. Take advantage of shells that can avoid forks. The arguments
14895# must be portable across $(()) and expr.
14896if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14897 eval 'as_fn_arith ()
14898 {
14899 as_val=$(( $* ))
14900 }'
14901else
14902 as_fn_arith ()
14903 {
14904 as_val=`expr "$@" || test $? -eq 1`
14905 }
14906fi # as_fn_arith
14907
14908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014909if expr a : '\(a\)' >/dev/null 2>&1 &&
14910 test "X`expr 00001 : '.*\(...\)'`" = X001; then
14911 as_expr=expr
14912else
14913 as_expr=false
14914fi
14915
14916if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14917 as_basename=basename
14918else
14919 as_basename=false
14920fi
14921
Matthias Kloseb9621712010-04-24 17:59:49 +000014922if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14923 as_dirname=dirname
14924else
14925 as_dirname=false
14926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014928as_me=`$as_basename -- "$0" ||
14929$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14930 X"$0" : 'X\(//\)$' \| \
14931 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000014932$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014933 sed '/^.*\/\([^/][^/]*\)\/*$/{
14934 s//\1/
14935 q
14936 }
14937 /^X\/\(\/\/\)$/{
14938 s//\1/
14939 q
14940 }
14941 /^X\/\(\/\).*/{
14942 s//\1/
14943 q
14944 }
14945 s/.*/./; q'`
14946
Matthias Kloseb9621712010-04-24 17:59:49 +000014947# Avoid depending upon Character Ranges.
14948as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14949as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14950as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14951as_cr_digits='0123456789'
14952as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953
14954ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000014955case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014956-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 xy) ECHO_C='\c';;
14960 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14961 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962 esac;;
14963*)
14964 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000014965esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014966
Martin v. Löwis11437992002-04-12 09:54:03 +000014967rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014968if test -d conf$$.dir; then
14969 rm -f conf$$.dir/conf$$.file
14970else
14971 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000014972 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014973fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014974if (echo >conf$$.file) 2>/dev/null; then
14975 if ln -s conf$$.file conf$$ 2>/dev/null; then
14976 as_ln_s='ln -s'
14977 # ... but there are two gotchas:
14978 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14979 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ned Deilycbfb9a52012-06-23 16:02:19 -070014980 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000014981 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ned Deilycbfb9a52012-06-23 16:02:19 -070014982 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014983 elif ln conf$$.file conf$$ 2>/dev/null; then
14984 as_ln_s=ln
14985 else
Ned Deilycbfb9a52012-06-23 16:02:19 -070014986 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000014987 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014988else
Ned Deilycbfb9a52012-06-23 16:02:19 -070014989 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000014990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14992rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000014993
Matthias Kloseb9621712010-04-24 17:59:49 +000014994
14995# as_fn_mkdir_p
14996# -------------
14997# Create "$as_dir" as a directory, including parents if necessary.
14998as_fn_mkdir_p ()
14999{
15000
15001 case $as_dir in #(
15002 -*) as_dir=./$as_dir;;
15003 esac
15004 test -d "$as_dir" || eval $as_mkdir_p || {
15005 as_dirs=
15006 while :; do
15007 case $as_dir in #(
15008 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15009 *) as_qdir=$as_dir;;
15010 esac
15011 as_dirs="'$as_qdir' $as_dirs"
15012 as_dir=`$as_dirname -- "$as_dir" ||
15013$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15014 X"$as_dir" : 'X\(//\)[^/]' \| \
15015 X"$as_dir" : 'X\(//\)$' \| \
15016 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15017$as_echo X"$as_dir" |
15018 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15019 s//\1/
15020 q
15021 }
15022 /^X\(\/\/\)[^/].*/{
15023 s//\1/
15024 q
15025 }
15026 /^X\(\/\/\)$/{
15027 s//\1/
15028 q
15029 }
15030 /^X\(\/\).*/{
15031 s//\1/
15032 q
15033 }
15034 s/.*/./; q'`
15035 test -d "$as_dir" && break
15036 done
15037 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015038 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015039
15040
15041} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015042if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015044else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015045 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015046 as_mkdir_p=false
15047fi
15048
Ned Deilycbfb9a52012-06-23 16:02:19 -070015049
15050# as_fn_executable_p FILE
15051# -----------------------
15052# Test if FILE is an executable regular file.
15053as_fn_executable_p ()
15054{
15055 test -f "$1" && test -x "$1"
15056} # as_fn_executable_p
15057as_test_x='test -x'
15058as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015059
15060# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015061as_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 +000015062
15063# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015064as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015065
15066
Martin v. Löwis11437992002-04-12 09:54:03 +000015067exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015068## ----------------------------------- ##
15069## Main body of $CONFIG_STATUS script. ##
15070## ----------------------------------- ##
15071_ASEOF
15072test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015073
Matthias Kloseb9621712010-04-24 17:59:49 +000015074cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15075# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015076# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015077# values after options handling.
15078ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015079This file was extended by python $as_me 3.3, which was
Ned Deilycbfb9a52012-06-23 16:02:19 -070015080generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015081
15082 CONFIG_FILES = $CONFIG_FILES
15083 CONFIG_HEADERS = $CONFIG_HEADERS
15084 CONFIG_LINKS = $CONFIG_LINKS
15085 CONFIG_COMMANDS = $CONFIG_COMMANDS
15086 $ $0 $@
15087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015088on `(hostname || uname -n) 2>/dev/null | sed 1q`
15089"
15090
Martin v. Löwis11437992002-04-12 09:54:03 +000015091_ACEOF
15092
Matthias Kloseb9621712010-04-24 17:59:49 +000015093case $ac_config_files in *"
15094"*) set x $ac_config_files; shift; ac_config_files=$*;;
15095esac
15096
15097case $ac_config_headers in *"
15098"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15099esac
15100
15101
15102cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015103# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015104config_files="$ac_config_files"
15105config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015107_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015108
Matthias Kloseb9621712010-04-24 17:59:49 +000015109cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015110ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015111\`$as_me' instantiates files and other configuration actions
15112from templates according to the current configuration. Unless the files
15113and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015114
Matthias Kloseb9621712010-04-24 17:59:49 +000015115Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015116
15117 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015118 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015119 --config print configuration, then exit
15120 -q, --quiet, --silent
15121 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 -d, --debug don't remove temporary files
15123 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 --file=FILE[:TEMPLATE]
15125 instantiate the configuration file FILE
15126 --header=FILE[:TEMPLATE]
15127 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015128
15129Configuration files:
15130$config_files
15131
15132Configuration headers:
15133$config_headers
15134
Matthias Kloseb9621712010-04-24 17:59:49 +000015135Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015138cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15139ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015140ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015141python config.status 3.3
Ned Deilycbfb9a52012-06-23 16:02:19 -070015142configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015144
Ned Deilycbfb9a52012-06-23 16:02:19 -070015145Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015146This config.status script is free software; the Free Software Foundation
15147gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148
15149ac_pwd='$ac_pwd'
15150srcdir='$srcdir'
15151INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015152MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015153test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015154_ACEOF
15155
Matthias Kloseb9621712010-04-24 17:59:49 +000015156cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15157# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015158ac_need_defaults=:
15159while test $# != 0
15160do
15161 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015162 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15164 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015165 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015167 --*=)
15168 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15169 ac_optarg=
15170 ac_shift=:
15171 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015173 ac_option=$1
15174 ac_optarg=$2
15175 ac_shift=shift
15176 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 esac
15178
Skip Montanaro6dead952003-09-25 14:50:04 +000015179 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015181 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15182 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015183 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 $as_echo "$ac_cs_version"; exit ;;
15185 --config | --confi | --conf | --con | --co | --c )
15186 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015187 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 debug=: ;;
15189 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015190 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015191 case $ac_optarg in
15192 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015193 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015194 esac
15195 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 ac_need_defaults=false;;
15197 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015198 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015199 case $ac_optarg in
15200 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15201 esac
15202 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204 --he | --h)
15205 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015206 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015207Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015210 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15211 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15212 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015213
15214 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015215 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015216Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015217
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015220
15221 esac
15222 shift
15223done
15224
Skip Montanaro6dead952003-09-25 14:50:04 +000015225ac_configure_extra_args=
15226
15227if $ac_cs_silent; then
15228 exec 6>/dev/null
15229 ac_configure_extra_args="$ac_configure_extra_args --silent"
15230fi
15231
15232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015233cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015234if \$ac_cs_recheck; then
Ned Deilycbfb9a52012-06-23 16:02:19 -070015235 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015236 shift
15237 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15238 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015239 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015240 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015241fi
15242
Martin v. Löwis11437992002-04-12 09:54:03 +000015243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015244cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245exec 5>>config.log
15246{
15247 echo
15248 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15249## Running $as_me. ##
15250_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015251 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015252} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015255cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015256_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015257
Matthias Kloseb9621712010-04-24 17:59:49 +000015258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259
15260# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015261for ac_config_target in $ac_config_targets
15262do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263 case $ac_config_target in
15264 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15265 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15266 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015267 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15268 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15270 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015271 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015272 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015273
Victor Stinnere0be4232011-10-25 13:06:09 +020015274 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015275 esac
15276done
15277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278
Martin v. Löwis11437992002-04-12 09:54:03 +000015279# If the user did not use the arguments to specify the items to instantiate,
15280# then the envvar interface is used. Set only those that are not.
15281# We use the long form for the default assignment because of an extremely
15282# bizarre bug on SunOS 4.1.3.
15283if $ac_need_defaults; then
15284 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15285 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15286fi
15287
Skip Montanaro6dead952003-09-25 14:50:04 +000015288# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015289# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015290# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015291# Hook for its removal unless debugging.
15292# Note that there is a small window in which the directory will not be cleaned:
15293# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015294$debug ||
15295{
Victor Stinnere0be4232011-10-25 13:06:09 +020015296 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015298 : "${ac_tmp:=$tmp}"
15299 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015300' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015301 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015302}
Martin v. Löwis11437992002-04-12 09:54:03 +000015303# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015304
Martin v. Löwis11437992002-04-12 09:54:03 +000015305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015307 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015308} ||
15309{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015310 tmp=./conf$$-$RANDOM
15311 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015312} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015313ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015314
Matthias Kloseb9621712010-04-24 17:59:49 +000015315# Set up the scripts for CONFIG_FILES section.
15316# No need to generate them if there are no CONFIG_FILES.
15317# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015318if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015319
Matthias Kloseb9621712010-04-24 17:59:49 +000015320
15321ac_cr=`echo X | tr X '\015'`
15322# On cygwin, bash can eat \r inside `` if the user requested igncr.
15323# But we know of no other shell where ac_cr would be empty at this
15324# point, so we can use a bashism as a fallback.
15325if test "x$ac_cr" = x; then
15326 eval ac_cr=\$\'\\r\'
15327fi
15328ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15329if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015330 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015331else
15332 ac_cs_awk_cr=$ac_cr
15333fi
15334
Victor Stinnere0be4232011-10-25 13:06:09 +020015335echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015336_ACEOF
15337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015338
Matthias Kloseb9621712010-04-24 17:59:49 +000015339{
15340 echo "cat >conf$$subs.awk <<_ACEOF" &&
15341 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15342 echo "_ACEOF"
15343} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015344 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15345ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346ac_delim='%!_!# '
15347for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015349 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015350
Matthias Kloseb9621712010-04-24 17:59:49 +000015351 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15352 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353 break
15354 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015355 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356 else
15357 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015358 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015359done
Matthias Kloseb9621712010-04-24 17:59:49 +000015360rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015363cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015365sed -n '
15366h
15367s/^/S["/; s/!.*/"]=/
15368p
15369g
15370s/^[^!]*!//
15371:repl
15372t repl
15373s/'"$ac_delim"'$//
15374t delim
15375:nl
15376h
15377s/\(.\{148\}\)..*/\1/
15378t more1
15379s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15380p
15381n
15382b repl
15383:more1
15384s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15385p
15386g
15387s/.\{148\}//
15388t nl
15389:delim
15390h
15391s/\(.\{148\}\)..*/\1/
15392t more2
15393s/["\\]/\\&/g; s/^/"/; s/$/"/
15394p
15395b
15396:more2
15397s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15398p
15399g
15400s/.\{148\}//
15401t delim
15402' <conf$$subs.awk | sed '
15403/^[^""]/{
15404 N
15405 s/\n//
15406}
15407' >>$CONFIG_STATUS || ac_write_fail=1
15408rm -f conf$$subs.awk
15409cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15410_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015411cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015412 for (key in S) S_is_set[key] = 1
15413 FS = ""
15414
15415}
15416{
15417 line = $ 0
15418 nfields = split(line, field, "@")
15419 substed = 0
15420 len = length(field[1])
15421 for (i = 2; i < nfields; i++) {
15422 key = field[i]
15423 keylen = length(key)
15424 if (S_is_set[key]) {
15425 value = S[key]
15426 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15427 len += length(value) + length(field[++i])
15428 substed = 1
15429 } else
15430 len += 1 + keylen
15431 }
15432
15433 print line
15434}
15435
15436_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015438cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15439if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15440 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15441else
15442 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015443fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015444 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015445_ACEOF
15446
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015447# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15448# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015449# trailing colons and then remove the whole line if VPATH becomes empty
15450# (actually we leave an empty line to preserve line numbers).
15451if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015452 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15453h
15454s///
15455s/^/:/
15456s/[ ]*$/:/
15457s/:\$(srcdir):/:/g
15458s/:\${srcdir}:/:/g
15459s/:@srcdir@:/:/g
15460s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015462x
15463s/\(=[ ]*\).*/\1/
15464G
15465s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015466s/^[^=]*=[ ]*$//
15467}'
15468fi
15469
Matthias Kloseb9621712010-04-24 17:59:49 +000015470cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015471fi # test -n "$CONFIG_FILES"
15472
Matthias Kloseb9621712010-04-24 17:59:49 +000015473# Set up the scripts for CONFIG_HEADERS section.
15474# No need to generate them if there are no CONFIG_HEADERS.
15475# This happens for instance with `./config.status Makefile'.
15476if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015477cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015478BEGIN {
15479_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480
Matthias Kloseb9621712010-04-24 17:59:49 +000015481# Transform confdefs.h into an awk script `defines.awk', embedded as
15482# here-document in config.status, that substitutes the proper values into
15483# config.h.in to produce config.h.
15484
15485# Create a delimiter string that does not exist in confdefs.h, to ease
15486# handling of long lines.
15487ac_delim='%!_!# '
15488for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020015489 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15490 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015491 break
15492 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015493 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015494 else
15495 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15496 fi
15497done
15498
15499# For the awk script, D is an array of macro values keyed by name,
15500# likewise P contains macro parameters if any. Preserve backslash
15501# newline sequences.
15502
15503ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15504sed -n '
15505s/.\{148\}/&'"$ac_delim"'/g
15506t rset
15507:rset
15508s/^[ ]*#[ ]*define[ ][ ]*/ /
15509t def
15510d
15511:def
15512s/\\$//
15513t bsnl
15514s/["\\]/\\&/g
15515s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15516D["\1"]=" \3"/p
15517s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15518d
15519:bsnl
15520s/["\\]/\\&/g
15521s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15522D["\1"]=" \3\\\\\\n"\\/p
15523t cont
15524s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15525t cont
15526d
15527:cont
15528n
15529s/.\{148\}/&'"$ac_delim"'/g
15530t clear
15531:clear
15532s/\\$//
15533t bsnlc
15534s/["\\]/\\&/g; s/^/"/; s/$/"/p
15535d
15536:bsnlc
15537s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15538b cont
15539' <confdefs.h | sed '
15540s/'"$ac_delim"'/"\\\
15541"/g' >>$CONFIG_STATUS || ac_write_fail=1
15542
15543cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15544 for (key in D) D_is_set[key] = 1
15545 FS = ""
15546}
15547/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15548 line = \$ 0
15549 split(line, arg, " ")
15550 if (arg[1] == "#") {
15551 defundef = arg[2]
15552 mac1 = arg[3]
15553 } else {
15554 defundef = substr(arg[1], 2)
15555 mac1 = arg[2]
15556 }
15557 split(mac1, mac2, "(") #)
15558 macro = mac2[1]
15559 prefix = substr(line, 1, index(line, defundef) - 1)
15560 if (D_is_set[macro]) {
15561 # Preserve the white space surrounding the "#".
15562 print prefix "define", macro P[macro] D[macro]
15563 next
15564 } else {
15565 # Replace #undef with comments. This is necessary, for example,
15566 # in the case of _POSIX_SOURCE, which is predefined and required
15567 # on some systems where configure will not decide to define it.
15568 if (defundef == "undef") {
15569 print "/*", prefix defundef, macro, "*/"
15570 next
15571 }
15572 }
15573}
15574{ print }
15575_ACAWK
15576_ACEOF
15577cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015578 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015579fi # test -n "$CONFIG_HEADERS"
15580
15581
15582eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15583shift
15584for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585do
15586 case $ac_tag in
15587 :[FHLC]) ac_mode=$ac_tag; continue;;
15588 esac
15589 case $ac_mode$ac_tag in
15590 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020015591 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015592 :[FH]-) ac_tag=-:-;;
15593 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15594 esac
15595 ac_save_IFS=$IFS
15596 IFS=:
15597 set x $ac_tag
15598 IFS=$ac_save_IFS
15599 shift
15600 ac_file=$1
15601 shift
15602
15603 case $ac_mode in
15604 :L) ac_source=$1;;
15605 :[FH])
15606 ac_file_inputs=
15607 for ac_f
15608 do
15609 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020015610 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611 *) # Look for the file first in the build tree, then in the source tree
15612 # (if the path is not absolute). The absolute path cannot be DOS-style,
15613 # because $ac_f cannot contain `:'.
15614 test -f "$ac_f" ||
15615 case $ac_f in
15616 [\\/$]*) false;;
15617 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15618 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020015619 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015620 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000015621 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
15622 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623 done
15624
15625 # Let's still pretend it is `configure' which instantiates (i.e., don't
15626 # use $as_me), people would be surprised to read:
15627 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000015628 configure_input='Generated from '`
15629 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15630 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015631 if test x"$ac_file" != x-; then
15632 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000015633 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15634$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015636 # Neutralize special characters interpreted by sed in replacement strings.
15637 case $configure_input in #(
15638 *\&* | *\|* | *\\* )
15639 ac_sed_conf_input=`$as_echo "$configure_input" |
15640 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15641 *) ac_sed_conf_input=$configure_input;;
15642 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015643
15644 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020015645 *:-:* | *:-) cat >"$ac_tmp/stdin" \
15646 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647 esac
15648 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015649 esac
15650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015651 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000015652$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015653 X"$ac_file" : 'X\(//\)[^/]' \| \
15654 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015655 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015656$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15658 s//\1/
15659 q
15660 }
15661 /^X\(\/\/\)[^/].*/{
15662 s//\1/
15663 q
15664 }
15665 /^X\(\/\/\)$/{
15666 s//\1/
15667 q
15668 }
15669 /^X\(\/\).*/{
15670 s//\1/
15671 q
15672 }
15673 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000015674 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 ac_builddir=.
15676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015677case "$ac_dir" in
15678.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15679*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015681 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000015682 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015683 case $ac_top_builddir_sub in
15684 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15685 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15686 esac ;;
15687esac
15688ac_abs_top_builddir=$ac_pwd
15689ac_abs_builddir=$ac_pwd$ac_dir_suffix
15690# for backward compatibility:
15691ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000015692
15693case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015694 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000015695 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015696 ac_top_srcdir=$ac_top_builddir_sub
15697 ac_abs_top_srcdir=$ac_pwd ;;
15698 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000015699 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015700 ac_top_srcdir=$srcdir
15701 ac_abs_top_srcdir=$srcdir ;;
15702 *) # Relative name.
15703 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15704 ac_top_srcdir=$ac_top_build_prefix$srcdir
15705 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015706esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015707ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000015708
Martin v. Löwis11437992002-04-12 09:54:03 +000015709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710 case $ac_mode in
15711 :F)
15712 #
15713 # CONFIG_FILE
15714 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015715
15716 case $INSTALL in
15717 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015718 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010015720 ac_MKDIR_P=$MKDIR_P
15721 case $MKDIR_P in
15722 [\\/$]* | ?:[\\/]* ) ;;
15723 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
15724 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000015725_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726
Matthias Kloseb9621712010-04-24 17:59:49 +000015727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015728# If the template does not know about datarootdir, expand it.
15729# FIXME: This hack should be removed a few years after 2.60.
15730ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000015731ac_sed_dataroot='
15732/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015733 p
15734 q
15735}
15736/@datadir@/p
15737/@docdir@/p
15738/@infodir@/p
15739/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000015740/@mandir@/p'
15741case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742*datarootdir*) ac_datarootdir_seen=yes;;
15743*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15745$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015747cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748 ac_datarootdir_hack='
15749 s&@datadir@&$datadir&g
15750 s&@docdir@&$docdir&g
15751 s&@infodir@&$infodir&g
15752 s&@localedir@&$localedir&g
15753 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000015754 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015755esac
15756_ACEOF
15757
15758# Neutralize VPATH when `$srcdir' = `.'.
15759# Shell code in configure.ac might set extrasub.
15760# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000015761cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15762ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000015763$extrasub
15764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015765cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015766:t
15767/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000015768s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000015770s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015771s&@srcdir@&$ac_srcdir&;t t
15772s&@abs_srcdir@&$ac_abs_srcdir&;t t
15773s&@top_srcdir@&$ac_top_srcdir&;t t
15774s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15775s&@builddir@&$ac_builddir&;t t
15776s&@abs_builddir@&$ac_abs_builddir&;t t
15777s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15778s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010015779s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015780$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000015781"
Victor Stinnere0be4232011-10-25 13:06:09 +020015782eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15783 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015785test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015786 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15787 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
15788 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015790which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015791$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015792which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000015793
Victor Stinnere0be4232011-10-25 13:06:09 +020015794 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000015795 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020015796 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15797 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000015798 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015799 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800 ;;
15801 :H)
15802 #
15803 # CONFIG_HEADER
15804 #
Martin v. Löwis11437992002-04-12 09:54:03 +000015805 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015806 {
15807 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015808 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15809 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015810 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015811 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015812 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15813$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015814 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015815 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020015816 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015817 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015818 fi
15819 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015820 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020015821 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015822 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000015823 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000015825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015826
15827 esac
15828
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015829
15830 case $ac_file$ac_mode in
15831 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
15832
15833 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015834done # for ac_tag
15835
Guido van Rossum627b2d71993-12-24 10:39:16 +000015836
Matthias Kloseb9621712010-04-24 17:59:49 +000015837as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000015838_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015839ac_clean_files=$ac_clean_files_save
15840
Matthias Kloseb9621712010-04-24 17:59:49 +000015841test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015842 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000015843
Martin v. Löwis11437992002-04-12 09:54:03 +000015844
15845# configure is writing to config.log, and then calls config.status.
15846# config.status does its own redirection, appending to config.log.
15847# Unfortunately, on DOS this fails, as config.log is still kept open
15848# by configure, so config.status won't be able to write to it; its
15849# output is simply discarded. So we exec the FD to /dev/null,
15850# effectively closing config.log, so it can be properly (re)opened and
15851# appended to by config.status. When coming back to configure, we
15852# need to make the FD available again.
15853if test "$no_create" != yes; then
15854 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000015855 ac_config_status_args=
15856 test "$silent" = yes &&
15857 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000015858 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000015859 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000015860 exec 5>>config.log
15861 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15862 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015863 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000015864fi
15865if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15867$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000015868fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000015869
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015870
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015871echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015872if test ! -f Modules/Setup
15873then
15874 cp $srcdir/Modules/Setup.dist Modules/Setup
15875fi
15876
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015877echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015878if test ! -f Modules/Setup.local
15879then
15880 echo "# Edit this file for local setup changes" >Modules/Setup.local
15881fi
15882
15883echo "creating Makefile"
15884$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
15885 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000015886 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000015887mv config.c Modules