blob: 4a861ed2c9574b4405a05f77f42cb1686cf6719f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00003# Generated by GNU Autoconf 2.69 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: http://bugs.python.org/ about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000583PACKAGE_VERSION='3.3'
584PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000626SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000627THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000628SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000629LIBC
630LIBM
631HAVE_GETHOSTBYNAME
632HAVE_GETHOSTBYNAME_R
633HAVE_GETHOSTBYNAME_R_3_ARG
634HAVE_GETHOSTBYNAME_R_5_ARG
635HAVE_GETHOSTBYNAME_R_6_ARG
636LIBOBJS
637TRUE
638MACHDEP_OBJS
639DYNLOADFILE
640DLINCLDIR
641THREADOBJ
642LDLAST
643USE_THREAD_MODULE
644SIGNAL_OBJS
645USE_SIGNAL_MODULE
646LIBFFI_INCLUDEDIR
647PKG_CONFIG
648SHLIBS
649CFLAGSFORSHARED
650LINKFORSHARED
651CCSHARED
652BLDSHARED
653LDCXXSHARED
654LDSHARED
655SO
656LIBTOOL_CRUFT
657OTHER_LIBTOOL_OPT
658UNIVERSAL_ARCH_FLAGS
659BASECFLAGS
660OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000661ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100663MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000664INSTALL_DATA
665INSTALL_SCRIPT
666INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200667PYTHON
668ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200669ac_ct_READELF
670READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000671ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200672ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000673AR
674RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000675USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000676GNULD
677LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000678LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000679RUNSHARED
680INSTSONAME
681LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000682PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000683BLDLIBRARY
684DLLLIBRARY
685LDLIBRARY
686LIBRARY
687BUILDEXEEXT
688EGREP
689GREP
690CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200691NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200692ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000693MAINCC
694CXX
695OBJEXT
696EXEEXT
697ac_ct_CC
698CPPFLAGS
699LDFLAGS
700CFLAGS
701CC
702EXPORT_MACOSX_DEPLOYMENT_TARGET
703CONFIGURE_MACOSX_DEPLOYMENT_TARGET
704SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200705_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000706MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000707FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000708FRAMEWORKUNIXTOOLSPREFIX
709FRAMEWORKALTINSTALLLAST
710FRAMEWORKALTINSTALLFIRST
711FRAMEWORKINSTALLLAST
712FRAMEWORKINSTALLFIRST
713PYTHONFRAMEWORKINSTALLDIR
714PYTHONFRAMEWORKPREFIX
715PYTHONFRAMEWORKDIR
716PYTHONFRAMEWORKIDENTIFIER
717PYTHONFRAMEWORK
718LIPO_32BIT_FLAGS
719ARCH_RUN_32BIT
720UNIVERSALSDK
721CONFIG_ARGS
722SOVERSION
723VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200724PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100725host_os
726host_vendor
727host_cpu
728host
729build_os
730build_vendor
731build_cpu
732build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500733HAS_HG
734HGBRANCH
735HGTAG
736HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400737BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000738target_alias
739host_alias
740build_alias
741LIBS
742ECHO_T
743ECHO_N
744ECHO_C
745DEFS
746mandir
747localedir
748libdir
749psdir
750pdfdir
751dvidir
752htmldir
753infodir
754docdir
755oldincludedir
756includedir
757localstatedir
758sharedstatedir
759sysconfdir
760datadir
761datarootdir
762libexecdir
763sbindir
764bindir
765program_transform_name
766prefix
767exec_prefix
768PACKAGE_URL
769PACKAGE_BUGREPORT
770PACKAGE_STRING
771PACKAGE_VERSION
772PACKAGE_TARNAME
773PACKAGE_NAME
774PATH_SEPARATOR
775SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000776ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000777ac_user_opts='
778enable_option_checking
779enable_universalsdk
780with_universal_archs
781with_framework_name
782enable_framework
783with_gcc
784with_cxx_main
785with_suffix
786enable_shared
787enable_profiling
788with_pydebug
789with_libs
790with_system_expat
791with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100792with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000793enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000794with_dbmliborder
795with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000796with_threads
797with_thread
798enable_ipv6
799with_doc_strings
800with_tsc
801with_pymalloc
802with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000803with_fpectl
804with_libm
805with_libc
806enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_computed_gotos
808'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000809 ac_precious_vars='build_alias
810host_alias
811target_alias
812CC
813CFLAGS
814LDFLAGS
815LIBS
816CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200817CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000818
Guido van Rossum627b2d71993-12-24 10:39:16 +0000819
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000821ac_init_help=
822ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000823ac_unrecognized_opts=
824ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825# The variables have the same names as the options, with
826# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000827cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830no_recursion=
831prefix=NONE
832program_prefix=NONE
833program_suffix=NONE
834program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000836site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839x_includes=NONE
840x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000841
842# Installation directory options.
843# These are left unexpanded so users can "make install exec_prefix=/foo"
844# and all the variables that are supposed to be based on exec_prefix
845# by default will actually change.
846# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000848bindir='${exec_prefix}/bin'
849sbindir='${exec_prefix}/sbin'
850libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851datarootdir='${prefix}/share'
852datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000853sysconfdir='${prefix}/etc'
854sharedstatedir='${prefix}/com'
855localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000856includedir='${prefix}/include'
857oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
859infodir='${datarootdir}/info'
860htmldir='${docdir}'
861dvidir='${docdir}'
862pdfdir='${docdir}'
863psdir='${docdir}'
864libdir='${exec_prefix}/lib'
865localedir='${datarootdir}/locale'
866mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872 # If the previous option needs an argument, assign it.
873 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 ac_prev=
876 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000877 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200880 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
881 *=) ac_optarg= ;;
882 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Accept the important Cygnus configure options, so we can diagnose typos.
886
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887 case $ac_dashdash$ac_option in
888 --)
889 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891 -bindir | --bindir | --bindi | --bind | --bin | --bi)
892 ac_prev=bindir ;;
893 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000894 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895
896 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901 -cache-file | --cache-file | --cache-fil | --cache-fi \
902 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
903 ac_prev=cache_file ;;
904 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
905 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 cache_file=$ac_optarg ;;
907
908 --config-cache | -C)
909 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
917 | --dataroo | --dataro | --datar)
918 ac_prev=datarootdir ;;
919 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
920 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
921 datarootdir=$ac_optarg ;;
922
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000924 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000926 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200927 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000928 ac_useropt_orig=$ac_useropt
929 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
930 case $ac_user_opts in
931 *"
932"enable_$ac_useropt"
933"*) ;;
934 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
935 ac_unrecognized_sep=', ';;
936 esac
937 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938
939 -docdir | --docdir | --docdi | --doc | --do)
940 ac_prev=docdir ;;
941 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
942 docdir=$ac_optarg ;;
943
944 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
945 ac_prev=dvidir ;;
946 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
947 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
949 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000950 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000952 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200953 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000954 ac_useropt_orig=$ac_useropt
955 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
956 case $ac_user_opts in
957 *"
958"enable_$ac_useropt"
959"*) ;;
960 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
961 ac_unrecognized_sep=', ';;
962 esac
963 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
966 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
967 | --exec | --exe | --ex)
968 ac_prev=exec_prefix ;;
969 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
970 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
971 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
974 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975 # Obsolete; use --with-gas.
976 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 -help | --help | --hel | --he | -h)
979 ac_init_help=long ;;
980 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
981 ac_init_help=recursive ;;
982 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
983 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000990 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
991 ac_prev=htmldir ;;
992 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
993 | --ht=*)
994 htmldir=$ac_optarg ;;
995
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996 -includedir | --includedir | --includedi | --included | --include \
997 | --includ | --inclu | --incl | --inc)
998 ac_prev=includedir ;;
999 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1000 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001002
1003 -infodir | --infodir | --infodi | --infod | --info | --inf)
1004 ac_prev=infodir ;;
1005 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007
1008 -libdir | --libdir | --libdi | --libd)
1009 ac_prev=libdir ;;
1010 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
1013 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1014 | --libexe | --libex | --libe)
1015 ac_prev=libexecdir ;;
1016 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1017 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001020 -localedir | --localedir | --localedi | --localed | --locale)
1021 ac_prev=localedir ;;
1022 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1023 localedir=$ac_optarg ;;
1024
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001026 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 ac_prev=localstatedir ;;
1028 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031
1032 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1033 ac_prev=mandir ;;
1034 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 # Obsolete; use --without-fp.
1039 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040
1041 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 no_create=yes ;;
1044
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1046 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1047 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1050 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1051 | --oldin | --oldi | --old | --ol | --o)
1052 ac_prev=oldincludedir ;;
1053 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1054 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1055 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1059 ac_prev=prefix ;;
1060 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1064 | --program-pre | --program-pr | --program-p)
1065 ac_prev=program_prefix ;;
1066 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1067 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
1070 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1071 | --program-suf | --program-su | --program-s)
1072 ac_prev=program_suffix ;;
1073 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1074 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -program-transform-name | --program-transform-name \
1078 | --program-transform-nam | --program-transform-na \
1079 | --program-transform-n | --program-transform- \
1080 | --program-transform | --program-transfor \
1081 | --program-transfo | --program-transf \
1082 | --program-trans | --program-tran \
1083 | --progr-tra | --program-tr | --program-t)
1084 ac_prev=program_transform_name ;;
1085 -program-transform-name=* | --program-transform-name=* \
1086 | --program-transform-nam=* | --program-transform-na=* \
1087 | --program-transform-n=* | --program-transform-=* \
1088 | --program-transform=* | --program-transfor=* \
1089 | --program-transfo=* | --program-transf=* \
1090 | --program-trans=* | --program-tran=* \
1091 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001094 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1095 ac_prev=pdfdir ;;
1096 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1097 pdfdir=$ac_optarg ;;
1098
1099 -psdir | --psdir | --psdi | --psd | --ps)
1100 ac_prev=psdir ;;
1101 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1102 psdir=$ac_optarg ;;
1103
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1105 | -silent | --silent | --silen | --sile | --sil)
1106 silent=yes ;;
1107
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1109 ac_prev=sbindir ;;
1110 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1111 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113
1114 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1115 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1116 | --sharedst | --shareds | --shared | --share | --shar \
1117 | --sha | --sh)
1118 ac_prev=sharedstatedir ;;
1119 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1120 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1121 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1122 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001124
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125 -site | --site | --sit)
1126 ac_prev=site ;;
1127 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001129
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1131 ac_prev=srcdir ;;
1132 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001135 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1136 | --syscon | --sysco | --sysc | --sys | --sy)
1137 ac_prev=sysconfdir ;;
1138 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1139 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001141
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146
1147 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1148 verbose=yes ;;
1149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 -version | --version | --versio | --versi | --vers | -V)
1151 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152
1153 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001154 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001156 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001157 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001158 ac_useropt_orig=$ac_useropt
1159 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1160 case $ac_user_opts in
1161 *"
1162"with_$ac_useropt"
1163"*) ;;
1164 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1165 ac_unrecognized_sep=', ';;
1166 esac
1167 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
1169 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001173 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 ac_useropt_orig=$ac_useropt
1175 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1176 case $ac_user_opts in
1177 *"
1178"with_$ac_useropt"
1179"*) ;;
1180 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1181 ac_unrecognized_sep=', ';;
1182 esac
1183 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185 --x)
1186 # Obsolete; use --with-x.
1187 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1190 | --x-incl | --x-inc | --x-in | --x-i)
1191 ac_prev=x_includes ;;
1192 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1193 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1197 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1198 ac_prev=x_libraries ;;
1199 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1200 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001203 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1204Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205 ;;
1206
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 *=*)
1208 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1209 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 case $ac_envvar in #(
1211 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001212 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001214 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 export $ac_envvar ;;
1216
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001217 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001222 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223 ;;
1224
1225 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001226done
1227
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001230 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231fi
1232
Matthias Kloseb9621712010-04-24 17:59:49 +00001233if test -n "$ac_unrecognized_opts"; then
1234 case $enable_option_checking in
1235 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001236 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001237 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1238 esac
1239fi
1240
1241# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001242for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1243 datadir sysconfdir sharedstatedir localstatedir includedir \
1244 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1245 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001246do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 # Remove trailing slashes.
1249 case $ac_val in
1250 */ )
1251 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1252 eval $ac_var=\$ac_val;;
1253 esac
1254 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 [\\/$]* | ?:[\\/]* ) continue;;
1257 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001260done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261
Martin v. Löwis11437992002-04-12 09:54:03 +00001262# There might be people who depend on the old broken behavior: `$host'
1263# used to hold the argument of --host etc.
1264# FIXME: To remove some day.
1265build=$build_alias
1266host=$host_alias
1267target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269# FIXME: To remove some day.
1270if test "x$host_alias" != x; then
1271 if test "x$build_alias" = x; then
1272 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 elif test "x$build_alias" != "x$host_alias"; then
1274 cross_compiling=yes
1275 fi
1276fi
1277
1278ac_tool_prefix=
1279test -n "$host_alias" && ac_tool_prefix=$host_alias-
1280
1281test "$silent" = yes && exec 6>/dev/null
1282
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284ac_pwd=`pwd` && test -n "$ac_pwd" &&
1285ac_ls_di=`ls -di .` &&
1286ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001287 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290
1291
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292# Find the source files, if location was not specified.
1293if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001294 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001296 ac_confdir=`$as_dirname -- "$as_myself" ||
1297$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1298 X"$as_myself" : 'X\(//\)[^/]' \| \
1299 X"$as_myself" : 'X\(//\)$' \| \
1300 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1301$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1303 s//\1/
1304 q
1305 }
1306 /^X\(\/\/\)[^/].*/{
1307 s//\1/
1308 q
1309 }
1310 /^X\(\/\/\)$/{
1311 s//\1/
1312 q
1313 }
1314 /^X\(\/\).*/{
1315 s//\1/
1316 q
1317 }
1318 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001319 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001320 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321 srcdir=..
1322 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001323else
1324 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326if test ! -r "$srcdir/$ac_unique_file"; then
1327 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1331ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333 pwd)`
1334# When building in place, set srcdir=.
1335if test "$ac_abs_confdir" = "$ac_pwd"; then
1336 srcdir=.
1337fi
1338# Remove unnecessary trailing slashes from srcdir.
1339# Double slashes in file names in object file debugging info
1340# mess up M-x gdb in Emacs.
1341case $srcdir in
1342*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1343esac
1344for ac_var in $ac_precious_vars; do
1345 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1346 eval ac_env_${ac_var}_value=\$${ac_var}
1347 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1348 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1349done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001350
Martin v. Löwis11437992002-04-12 09:54:03 +00001351#
1352# Report the --help message.
1353#
1354if test "$ac_init_help" = "long"; then
1355 # Omit some internal or obsolete options to make the list less imposing.
1356 # This message is too long to be a string in the A/UX 3.1 sh.
1357 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001358\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001359
1360Usage: $0 [OPTION]... [VAR=VALUE]...
1361
1362To assign environment variables (e.g., CC, CFLAGS...), specify them as
1363VAR=VALUE. See below for descriptions of some of the useful variables.
1364
1365Defaults for the options are specified in brackets.
1366
1367Configuration:
1368 -h, --help display this help and exit
1369 --help=short display options specific to this package
1370 --help=recursive display the short help of all the included packages
1371 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001372 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 --cache-file=FILE cache test results in FILE [disabled]
1374 -C, --config-cache alias for \`--cache-file=config.cache'
1375 -n, --no-create do not create output files
1376 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1377
Martin v. Löwis11437992002-04-12 09:54:03 +00001378Installation directories:
1379 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001380 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001381 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001382 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001383
1384By default, \`make install' will install all the files in
1385\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1386an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1387for instance \`--prefix=\$HOME'.
1388
1389For better control, use the options below.
1390
1391Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001392 --bindir=DIR user executables [EPREFIX/bin]
1393 --sbindir=DIR system admin executables [EPREFIX/sbin]
1394 --libexecdir=DIR program executables [EPREFIX/libexec]
1395 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1396 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1397 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1398 --libdir=DIR object code libraries [EPREFIX/lib]
1399 --includedir=DIR C header files [PREFIX/include]
1400 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1401 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1402 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1403 --infodir=DIR info documentation [DATAROOTDIR/info]
1404 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1405 --mandir=DIR man documentation [DATAROOTDIR/man]
1406 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1407 --htmldir=DIR html documentation [DOCDIR]
1408 --dvidir=DIR dvi documentation [DOCDIR]
1409 --pdfdir=DIR pdf documentation [DOCDIR]
1410 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001411_ACEOF
1412
1413 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001414
1415System types:
1416 --build=BUILD configure for building on BUILD [guessed]
1417 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001418_ACEOF
1419fi
1420
1421if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001422 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001423 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001424 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 cat <<\_ACEOF
1426
1427Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1430 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001431 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001432 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001433 --enable-framework[=INSTALLDIR]
1434 Build (MacOSX|Darwin) framework
1435 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001436 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001437 --enable-loadable-sqlite-extensions
1438 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001439 --enable-ipv6 Enable ipv6 (with ipv4) support
1440 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001441 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444Optional Packages:
1445 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1446 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001447 --with-universal-archs=ARCH
1448 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001449 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001450 --with-framework-name=FRAMEWORK
1451 specify an alternate name of the framework built
1452 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001454 --with-cxx-main=<compiler>
1455 compile main() and link python executable with C++
1456 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001457 --with-suffix=.exe set executable suffix
1458 --with-pydebug build with Py_DEBUG defined
1459 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001460 --with-system-expat build pyexpat module using an installed expat
1461 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001462 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001463 --with-system-libmpdec build _decimal module using an installed libmpdec
1464 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001465 --with-dbmliborder=db1:db2:...
1466 order to check db backends for dbm. Valid value is a
1467 colon separated string with the backend names
1468 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001469 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001470 --with(out)-threads[=DIRECTORY]
1471 disable/enable thread support
1472 --with(out)-thread[=DIRECTORY]
1473 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001475 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001477 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-fpectl enable SIGFPE catching
1479 --with-libm=STRING math library
1480 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001481 --with(out)-computed-gotos
1482 Use computed gotos in evaluation loop (enabled by
1483 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001484
1485Some influential environment variables:
1486 CC C compiler command
1487 CFLAGS C compiler flags
1488 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1489 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001490 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001491 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001493 CPP C preprocessor
1494
1495Use these variables to override the choices made by `configure' or to help
1496it to find libraries and programs with nonstandard names/locations.
1497
Georg Brandle2e15612009-05-20 18:25:10 +00001498Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001499_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001501fi
1502
1503if test "$ac_init_help" = "recursive"; then
1504 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001505 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001506 test -d "$ac_dir" ||
1507 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1508 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 ac_builddir=.
1510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511case "$ac_dir" in
1512.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1513*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001514 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001516 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 case $ac_top_builddir_sub in
1518 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1519 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1520 esac ;;
1521esac
1522ac_abs_top_builddir=$ac_pwd
1523ac_abs_builddir=$ac_pwd$ac_dir_suffix
1524# for backward compatibility:
1525ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001526
1527case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001529 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 ac_top_srcdir=$ac_top_builddir_sub
1531 ac_abs_top_srcdir=$ac_pwd ;;
1532 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534 ac_top_srcdir=$srcdir
1535 ac_abs_top_srcdir=$srcdir ;;
1536 *) # Relative name.
1537 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1538 ac_top_srcdir=$ac_top_build_prefix$srcdir
1539 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001540esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001541ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001543 cd "$ac_dir" || { ac_status=$?; continue; }
1544 # Check for guested configure.
1545 if test -f "$ac_srcdir/configure.gnu"; then
1546 echo &&
1547 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1548 elif test -f "$ac_srcdir/configure"; then
1549 echo &&
1550 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001552 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 fi || ac_status=$?
1554 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 done
1556fi
1557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001559if $ac_init_version; then
1560 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001561python configure 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001562generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001564Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001565This configure script is free software; the Free Software Foundation
1566gives unlimited permission to copy, distribute and modify it.
1567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001570
1571## ------------------------ ##
1572## Autoconf initialization. ##
1573## ------------------------ ##
1574
1575# ac_fn_c_try_compile LINENO
1576# --------------------------
1577# Try to compile conftest.$ac_ext, and return whether this succeeded.
1578ac_fn_c_try_compile ()
1579{
1580 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1581 rm -f conftest.$ac_objext
1582 if { { ac_try="$ac_compile"
1583case "(($ac_try" in
1584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1585 *) ac_try_echo=$ac_try;;
1586esac
1587eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1588$as_echo "$ac_try_echo"; } >&5
1589 (eval "$ac_compile") 2>conftest.err
1590 ac_status=$?
1591 if test -s conftest.err; then
1592 grep -v '^ *+' conftest.err >conftest.er1
1593 cat conftest.er1 >&5
1594 mv -f conftest.er1 conftest.err
1595 fi
1596 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1597 test $ac_status = 0; } && {
1598 test -z "$ac_c_werror_flag" ||
1599 test ! -s conftest.err
1600 } && test -s conftest.$ac_objext; then :
1601 ac_retval=0
1602else
1603 $as_echo "$as_me: failed program was:" >&5
1604sed 's/^/| /' conftest.$ac_ext >&5
1605
1606 ac_retval=1
1607fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001608 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001609 as_fn_set_status $ac_retval
1610
1611} # ac_fn_c_try_compile
1612
Matthias Kloseb9621712010-04-24 17:59:49 +00001613# ac_fn_c_try_link LINENO
1614# -----------------------
1615# Try to link conftest.$ac_ext, and return whether this succeeded.
1616ac_fn_c_try_link ()
1617{
1618 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1619 rm -f conftest.$ac_objext conftest$ac_exeext
1620 if { { ac_try="$ac_link"
1621case "(($ac_try" in
1622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1623 *) ac_try_echo=$ac_try;;
1624esac
1625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1626$as_echo "$ac_try_echo"; } >&5
1627 (eval "$ac_link") 2>conftest.err
1628 ac_status=$?
1629 if test -s conftest.err; then
1630 grep -v '^ *+' conftest.err >conftest.er1
1631 cat conftest.er1 >&5
1632 mv -f conftest.er1 conftest.err
1633 fi
1634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1635 test $ac_status = 0; } && {
1636 test -z "$ac_c_werror_flag" ||
1637 test ! -s conftest.err
1638 } && test -s conftest$ac_exeext && {
1639 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001640 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001641 }; then :
1642 ac_retval=0
1643else
1644 $as_echo "$as_me: failed program was:" >&5
1645sed 's/^/| /' conftest.$ac_ext >&5
1646
1647 ac_retval=1
1648fi
1649 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1650 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1651 # interfere with the next link command; also delete a directory that is
1652 # left behind by Apple's compiler. We do this before executing the actions.
1653 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001654 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001655 as_fn_set_status $ac_retval
1656
1657} # ac_fn_c_try_link
1658
Matthias Kloseb9621712010-04-24 17:59:49 +00001659# ac_fn_c_try_cpp LINENO
1660# ----------------------
1661# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1662ac_fn_c_try_cpp ()
1663{
1664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1665 if { { ac_try="$ac_cpp conftest.$ac_ext"
1666case "(($ac_try" in
1667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1668 *) ac_try_echo=$ac_try;;
1669esac
1670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1671$as_echo "$ac_try_echo"; } >&5
1672 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1673 ac_status=$?
1674 if test -s conftest.err; then
1675 grep -v '^ *+' conftest.err >conftest.er1
1676 cat conftest.er1 >&5
1677 mv -f conftest.er1 conftest.err
1678 fi
1679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001680 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1682 test ! -s conftest.err
1683 }; then :
1684 ac_retval=0
1685else
1686 $as_echo "$as_me: failed program was:" >&5
1687sed 's/^/| /' conftest.$ac_ext >&5
1688
1689 ac_retval=1
1690fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001691 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001692 as_fn_set_status $ac_retval
1693
1694} # ac_fn_c_try_cpp
1695
1696# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1697# -------------------------------------------------------
1698# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1699# the include files in INCLUDES and setting the cache variable VAR
1700# accordingly.
1701ac_fn_c_check_header_mongrel ()
1702{
1703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001704 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1706$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001707if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001708 $as_echo_n "(cached) " >&6
1709fi
1710eval ac_res=\$$3
1711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1712$as_echo "$ac_res" >&6; }
1713else
1714 # Is the header compilable?
1715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1716$as_echo_n "checking $2 usability... " >&6; }
1717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1718/* end confdefs.h. */
1719$4
1720#include <$2>
1721_ACEOF
1722if ac_fn_c_try_compile "$LINENO"; then :
1723 ac_header_compiler=yes
1724else
1725 ac_header_compiler=no
1726fi
1727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1729$as_echo "$ac_header_compiler" >&6; }
1730
1731# Is the header present?
1732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1733$as_echo_n "checking $2 presence... " >&6; }
1734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1735/* end confdefs.h. */
1736#include <$2>
1737_ACEOF
1738if ac_fn_c_try_cpp "$LINENO"; then :
1739 ac_header_preproc=yes
1740else
1741 ac_header_preproc=no
1742fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001743rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1745$as_echo "$ac_header_preproc" >&6; }
1746
1747# So? What about this header?
1748case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1749 yes:no: )
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1751$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1753$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1754 ;;
1755 no:yes:* )
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1757$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1759$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1761$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1763$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1765$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001766( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001767## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001768## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001769 ) | sed "s/^/$as_me: WARNING: /" >&2
1770 ;;
1771esac
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1773$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001774if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001775 $as_echo_n "(cached) " >&6
1776else
1777 eval "$3=\$ac_header_compiler"
1778fi
1779eval ac_res=\$$3
1780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1781$as_echo "$ac_res" >&6; }
1782fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001783 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001784
1785} # ac_fn_c_check_header_mongrel
1786
1787# ac_fn_c_try_run LINENO
1788# ----------------------
1789# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1790# that executables *can* be run.
1791ac_fn_c_try_run ()
1792{
1793 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1794 if { { ac_try="$ac_link"
1795case "(($ac_try" in
1796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1797 *) ac_try_echo=$ac_try;;
1798esac
1799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1800$as_echo "$ac_try_echo"; } >&5
1801 (eval "$ac_link") 2>&5
1802 ac_status=$?
1803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1805 { { case "(($ac_try" in
1806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1807 *) ac_try_echo=$ac_try;;
1808esac
1809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1810$as_echo "$ac_try_echo"; } >&5
1811 (eval "$ac_try") 2>&5
1812 ac_status=$?
1813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1814 test $ac_status = 0; }; }; then :
1815 ac_retval=0
1816else
1817 $as_echo "$as_me: program exited with status $ac_status" >&5
1818 $as_echo "$as_me: failed program was:" >&5
1819sed 's/^/| /' conftest.$ac_ext >&5
1820
1821 ac_retval=$ac_status
1822fi
1823 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001824 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001825 as_fn_set_status $ac_retval
1826
1827} # ac_fn_c_try_run
1828
1829# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1830# -------------------------------------------------------
1831# Tests whether HEADER exists and can be compiled using the include files in
1832# INCLUDES, setting the cache variable VAR accordingly.
1833ac_fn_c_check_header_compile ()
1834{
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1837$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001838if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 $as_echo_n "(cached) " >&6
1840else
1841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1842/* end confdefs.h. */
1843$4
1844#include <$2>
1845_ACEOF
1846if ac_fn_c_try_compile "$LINENO"; then :
1847 eval "$3=yes"
1848else
1849 eval "$3=no"
1850fi
1851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_compile
1859
Matthias Kloseb9621712010-04-24 17:59:49 +00001860# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1861# -------------------------------------------
1862# Tests whether TYPE exists after having included INCLUDES, setting cache
1863# variable VAR accordingly.
1864ac_fn_c_check_type ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1868$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001869if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001870 $as_echo_n "(cached) " >&6
1871else
1872 eval "$3=no"
1873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1874/* end confdefs.h. */
1875$4
1876int
1877main ()
1878{
1879if (sizeof ($2))
1880 return 0;
1881 ;
1882 return 0;
1883}
1884_ACEOF
1885if ac_fn_c_try_compile "$LINENO"; then :
1886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1887/* end confdefs.h. */
1888$4
1889int
1890main ()
1891{
1892if (sizeof (($2)))
1893 return 0;
1894 ;
1895 return 0;
1896}
1897_ACEOF
1898if ac_fn_c_try_compile "$LINENO"; then :
1899
1900else
1901 eval "$3=yes"
1902fi
1903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1904fi
1905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1906fi
1907eval ac_res=\$$3
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1909$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001910 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001911
1912} # ac_fn_c_check_type
1913
1914# ac_fn_c_find_uintX_t LINENO BITS VAR
1915# ------------------------------------
1916# Finds an unsigned integer type with width BITS, setting cache variable VAR
1917# accordingly.
1918ac_fn_c_find_uintX_t ()
1919{
1920 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1922$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001923if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001924 $as_echo_n "(cached) " >&6
1925else
1926 eval "$3=no"
1927 # Order is important - never check a type that is potentially smaller
1928 # than half of the expected target width.
1929 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1930 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1932/* end confdefs.h. */
1933$ac_includes_default
1934int
1935main ()
1936{
1937static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001938test_array [0] = 0;
1939return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001940
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_compile "$LINENO"; then :
1946 case $ac_type in #(
1947 uint$2_t) :
1948 eval "$3=yes" ;; #(
1949 *) :
1950 eval "$3=\$ac_type" ;;
1951esac
1952fi
1953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001954 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001955
1956else
1957 break
1958fi
1959 done
1960fi
1961eval ac_res=\$$3
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1963$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001964 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001965
1966} # ac_fn_c_find_uintX_t
1967
1968# ac_fn_c_find_intX_t LINENO BITS VAR
1969# -----------------------------------
1970# Finds a signed integer type with width BITS, setting cache variable VAR
1971# accordingly.
1972ac_fn_c_find_intX_t ()
1973{
1974 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1976$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001977if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001978 $as_echo_n "(cached) " >&6
1979else
1980 eval "$3=no"
1981 # Order is important - never check a type that is potentially smaller
1982 # than half of the expected target width.
1983 for ac_type in int$2_t 'int' 'long int' \
1984 'long long int' 'short int' 'signed char'; do
1985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1986/* end confdefs.h. */
1987$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001988 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001989int
1990main ()
1991{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001992static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001993test_array [0] = 0;
1994return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001995
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002004 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002005int
2006main ()
2007{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002008static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002009 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002010test_array [0] = 0;
2011return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002012
2013 ;
2014 return 0;
2015}
2016_ACEOF
2017if ac_fn_c_try_compile "$LINENO"; then :
2018
2019else
2020 case $ac_type in #(
2021 int$2_t) :
2022 eval "$3=yes" ;; #(
2023 *) :
2024 eval "$3=\$ac_type" ;;
2025esac
2026fi
2027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2028fi
2029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002030 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002031
2032else
2033 break
2034fi
2035 done
2036fi
2037eval ac_res=\$$3
2038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2039$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002040 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002041
2042} # ac_fn_c_find_intX_t
2043
2044# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2045# --------------------------------------------
2046# Tries to find the compile-time value of EXPR in a program that includes
2047# INCLUDES, setting VAR accordingly. Returns whether the value could be
2048# computed
2049ac_fn_c_compute_int ()
2050{
2051 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2052 if test "$cross_compiling" = yes; then
2053 # Depending upon the size, compute the lo and hi bounds.
2054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002061test_array [0] = 0;
2062return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=0 ac_mid=0
2070 while :; do
2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2072/* end confdefs.h. */
2073$4
2074int
2075main ()
2076{
2077static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002078test_array [0] = 0;
2079return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002080
2081 ;
2082 return 0;
2083}
2084_ACEOF
2085if ac_fn_c_try_compile "$LINENO"; then :
2086 ac_hi=$ac_mid; break
2087else
2088 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2089 if test $ac_lo -le $ac_mid; then
2090 ac_lo= ac_hi=
2091 break
2092 fi
2093 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096 done
2097else
2098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099/* end confdefs.h. */
2100$4
2101int
2102main ()
2103{
2104static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002105test_array [0] = 0;
2106return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002107
2108 ;
2109 return 0;
2110}
2111_ACEOF
2112if ac_fn_c_try_compile "$LINENO"; then :
2113 ac_hi=-1 ac_mid=-1
2114 while :; do
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118int
2119main ()
2120{
2121static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002122test_array [0] = 0;
2123return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002124
2125 ;
2126 return 0;
2127}
2128_ACEOF
2129if ac_fn_c_try_compile "$LINENO"; then :
2130 ac_lo=$ac_mid; break
2131else
2132 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2133 if test $ac_mid -le $ac_hi; then
2134 ac_lo= ac_hi=
2135 break
2136 fi
2137 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2138fi
2139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2140 done
2141else
2142 ac_lo= ac_hi=
2143fi
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145fi
2146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147# Binary search between lo and hi bounds.
2148while test "x$ac_lo" != "x$ac_hi"; do
2149 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151/* end confdefs.h. */
2152$4
2153int
2154main ()
2155{
2156static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002157test_array [0] = 0;
2158return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_compile "$LINENO"; then :
2165 ac_hi=$ac_mid
2166else
2167 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2168fi
2169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170done
2171case $ac_lo in #((
2172?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2173'') ac_retval=1 ;;
2174esac
2175 else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178$4
2179static long int longval () { return $2; }
2180static unsigned long int ulongval () { return $2; }
2181#include <stdio.h>
2182#include <stdlib.h>
2183int
2184main ()
2185{
2186
2187 FILE *f = fopen ("conftest.val", "w");
2188 if (! f)
2189 return 1;
2190 if (($2) < 0)
2191 {
2192 long int i = longval ();
2193 if (i != ($2))
2194 return 1;
2195 fprintf (f, "%ld", i);
2196 }
2197 else
2198 {
2199 unsigned long int i = ulongval ();
2200 if (i != ($2))
2201 return 1;
2202 fprintf (f, "%lu", i);
2203 }
2204 /* Do not output a trailing newline, as this causes \r\n confusion
2205 on some platforms. */
2206 return ferror (f) || fclose (f) != 0;
2207
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_run "$LINENO"; then :
2213 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2214else
2215 ac_retval=1
2216fi
2217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2218 conftest.$ac_objext conftest.beam conftest.$ac_ext
2219rm -f conftest.val
2220
2221 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002222 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002223 as_fn_set_status $ac_retval
2224
2225} # ac_fn_c_compute_int
2226
2227# ac_fn_c_check_func LINENO FUNC VAR
2228# ----------------------------------
2229# Tests whether FUNC exists, setting the cache variable VAR accordingly
2230ac_fn_c_check_func ()
2231{
2232 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2234$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002235if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002236 $as_echo_n "(cached) " >&6
2237else
2238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239/* end confdefs.h. */
2240/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2241 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2242#define $2 innocuous_$2
2243
2244/* System header to define __stub macros and hopefully few prototypes,
2245 which can conflict with char $2 (); below.
2246 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2247 <limits.h> exists even on freestanding compilers. */
2248
2249#ifdef __STDC__
2250# include <limits.h>
2251#else
2252# include <assert.h>
2253#endif
2254
2255#undef $2
2256
2257/* Override any GCC internal prototype to avoid an error.
2258 Use char because int might match the return type of a GCC
2259 builtin and then its argument prototype would still apply. */
2260#ifdef __cplusplus
2261extern "C"
2262#endif
2263char $2 ();
2264/* The GNU C library defines this for functions which it implements
2265 to always fail with ENOSYS. Some functions are actually named
2266 something starting with __ and the normal name is an alias. */
2267#if defined __stub_$2 || defined __stub___$2
2268choke me
2269#endif
2270
2271int
2272main ()
2273{
2274return $2 ();
2275 ;
2276 return 0;
2277}
2278_ACEOF
2279if ac_fn_c_try_link "$LINENO"; then :
2280 eval "$3=yes"
2281else
2282 eval "$3=no"
2283fi
2284rm -f core conftest.err conftest.$ac_objext \
2285 conftest$ac_exeext conftest.$ac_ext
2286fi
2287eval ac_res=\$$3
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2289$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002290 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002291
2292} # ac_fn_c_check_func
2293
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002294# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2295# ---------------------------------------------
2296# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2297# accordingly.
2298ac_fn_c_check_decl ()
2299{
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301 as_decl_name=`echo $2|sed 's/ *(.*//'`
2302 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2304$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2305if eval \${$3+:} false; then :
2306 $as_echo_n "(cached) " >&6
2307else
2308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h. */
2310$4
2311int
2312main ()
2313{
2314#ifndef $as_decl_name
2315#ifdef __cplusplus
2316 (void) $as_decl_use;
2317#else
2318 (void) $as_decl_name;
2319#endif
2320#endif
2321
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326if ac_fn_c_try_compile "$LINENO"; then :
2327 eval "$3=yes"
2328else
2329 eval "$3=no"
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$3
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
2336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2337
2338} # ac_fn_c_check_decl
2339
Matthias Kloseb9621712010-04-24 17:59:49 +00002340# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2341# ----------------------------------------------------
2342# Tries to find if the field MEMBER exists in type AGGR, after including
2343# INCLUDES, setting cache variable VAR accordingly.
2344ac_fn_c_check_member ()
2345{
2346 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2348$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002349if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002350 $as_echo_n "(cached) " >&6
2351else
2352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353/* end confdefs.h. */
2354$5
2355int
2356main ()
2357{
2358static $2 ac_aggr;
2359if (ac_aggr.$3)
2360return 0;
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365if ac_fn_c_try_compile "$LINENO"; then :
2366 eval "$4=yes"
2367else
2368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2369/* end confdefs.h. */
2370$5
2371int
2372main ()
2373{
2374static $2 ac_aggr;
2375if (sizeof ac_aggr.$3)
2376return 0;
2377 ;
2378 return 0;
2379}
2380_ACEOF
2381if ac_fn_c_try_compile "$LINENO"; then :
2382 eval "$4=yes"
2383else
2384 eval "$4=no"
2385fi
2386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2387fi
2388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2389fi
2390eval ac_res=\$$4
2391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2392$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002393 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002394
2395} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002396cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002397This file contains any messages produced by compilers while
2398running configure, to aid debugging if configure makes a mistake.
2399
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002400It was created by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002401generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
2403 $ $0 $@
2404
2405_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002406exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002407{
2408cat <<_ASUNAME
2409## --------- ##
2410## Platform. ##
2411## --------- ##
2412
2413hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2414uname -m = `(uname -m) 2>/dev/null || echo unknown`
2415uname -r = `(uname -r) 2>/dev/null || echo unknown`
2416uname -s = `(uname -s) 2>/dev/null || echo unknown`
2417uname -v = `(uname -v) 2>/dev/null || echo unknown`
2418
2419/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2420/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2421
2422/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2423/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2424/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002425/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002426/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2427/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2428/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2429
2430_ASUNAME
2431
2432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2433for as_dir in $PATH
2434do
2435 IFS=$as_save_IFS
2436 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 $as_echo "PATH: $as_dir"
2438 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441} >&5
2442
2443cat >&5 <<_ACEOF
2444
2445
2446## ----------- ##
2447## Core tests. ##
2448## ----------- ##
2449
2450_ACEOF
2451
2452
2453# Keep a trace of the command line.
2454# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002455# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002456# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002457# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002458ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002459ac_configure_args0=
2460ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002461ac_must_keep_next=false
2462for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002463do
Skip Montanaro6dead952003-09-25 14:50:04 +00002464 for ac_arg
2465 do
2466 case $ac_arg in
2467 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2468 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2469 | -silent | --silent | --silen | --sile | --sil)
2470 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002473 esac
2474 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002477 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002479 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002481 case $ac_arg in
2482 *=* | --config-cache | -C | -disable-* | --disable-* \
2483 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2484 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2485 | -with-* | --with-* | -without-* | --without-* | --x)
2486 case "$ac_configure_args0 " in
2487 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2488 esac
2489 ;;
2490 -* ) ac_must_keep_next=true ;;
2491 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 ;;
2495 esac
2496 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002497done
Matthias Kloseb9621712010-04-24 17:59:49 +00002498{ ac_configure_args0=; unset ac_configure_args0;}
2499{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002500
2501# When interrupted or exit'd, cleanup temporary files, and complete
2502# config.log. We remove comments because anyway the quotes in there
2503# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504# WARNING: Use '\'' to represent an apostrophe within the trap.
2505# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002506trap 'exit_status=$?
2507 # Save into config.log some information that might help in debugging.
2508 {
2509 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002510
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002511 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002512## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 echo
2515 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516(
2517 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2518 eval ac_val=\$$ac_var
2519 case $ac_val in #(
2520 *${as_nl}*)
2521 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2523$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 esac
2525 case $ac_var in #(
2526 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2528 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002529 esac ;;
2530 esac
2531 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2534 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 "s/'\''/'\''\\\\'\'''\''/g;
2537 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2538 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002539 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002541 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542 esac |
2543 sort
2544)
Martin v. Löwis11437992002-04-12 09:54:03 +00002545 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002546
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002547 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002548## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002549## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002550 echo
2551 for ac_var in $ac_subst_vars
2552 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002553 eval ac_val=\$$ac_var
2554 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002555 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002557 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002558 done | sort
2559 echo
2560
2561 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002562 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002564## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002565 echo
2566 for ac_var in $ac_subst_files
2567 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 eval ac_val=\$$ac_var
2569 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002570 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002572 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002573 done | sort
2574 echo
2575 fi
2576
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002579## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002581 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 echo
2584 fi
2585 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 $as_echo "$as_me: caught signal $ac_signal"
2587 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002588 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589 rm -f core *.core core.conftest.* &&
2590 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002593for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002595done
2596ac_signal=0
2597
2598# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002600
Matthias Kloseb9621712010-04-24 17:59:49 +00002601$as_echo "/* confdefs.h */" > confdefs.h
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603# Predefined preprocessor variables.
2604
2605cat >>confdefs.h <<_ACEOF
2606#define PACKAGE_NAME "$PACKAGE_NAME"
2607_ACEOF
2608
Martin v. Löwis11437992002-04-12 09:54:03 +00002609cat >>confdefs.h <<_ACEOF
2610#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2611_ACEOF
2612
Martin v. Löwis11437992002-04-12 09:54:03 +00002613cat >>confdefs.h <<_ACEOF
2614#define PACKAGE_VERSION "$PACKAGE_VERSION"
2615_ACEOF
2616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617cat >>confdefs.h <<_ACEOF
2618#define PACKAGE_STRING "$PACKAGE_STRING"
2619_ACEOF
2620
Martin v. Löwis11437992002-04-12 09:54:03 +00002621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2623_ACEOF
2624
Matthias Kloseb9621712010-04-24 17:59:49 +00002625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_URL "$PACKAGE_URL"
2627_ACEOF
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629
2630# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002631# Prefer an explicitly selected file to automatically selected ones.
2632ac_site_file1=NONE
2633ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002635 # We do not want a PATH search for config.site.
2636 case $CONFIG_SITE in #((
2637 -*) ac_site_file1=./$CONFIG_SITE;;
2638 */*) ac_site_file1=$CONFIG_SITE;;
2639 *) ac_site_file1=./$CONFIG_SITE;;
2640 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 ac_site_file1=$prefix/share/config.site
2643 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644else
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 ac_site_file1=$ac_default_prefix/share/config.site
2646 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002648for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002649do
Matthias Kloseb9621712010-04-24 17:59:49 +00002650 test "x$ac_site_file" = xNONE && continue
2651 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2653$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002655 . "$ac_site_file" \
2656 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2658as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002659See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002660 fi
2661done
2662
2663if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 # Some versions of bash will fail to source /dev/null (special files
2665 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2666 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2667 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2668$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2671 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 esac
2673 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674else
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2676$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 >$cache_file
2678fi
2679
2680# Check that the precious variables saved in the cache have kept the same
2681# value.
2682ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2685 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2687 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 case $ac_old_set,$ac_new_set in
2689 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2691$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 ac_cache_corrupted=: ;;
2693 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002694 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2695$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 ac_cache_corrupted=: ;;
2697 ,);;
2698 *)
2699 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002700 # differences in whitespace do not lead to failure.
2701 ac_old_val_w=`echo x $ac_old_val`
2702 ac_new_val_w=`echo x $ac_new_val`
2703 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2705$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2706 ac_cache_corrupted=:
2707 else
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2709$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2710 eval $ac_var=\$ac_old_val
2711 fi
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2713$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2715$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 fi;;
2717 esac
2718 # Pass precious variables to config.status.
2719 if test "$ac_new_set" = set; then
2720 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002721 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 *) ac_arg=$ac_var=$ac_new_val ;;
2723 esac
2724 case " $ac_configure_args " in
2725 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 esac
2728 fi
2729done
2730if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002731 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2734$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002735 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002737## -------------------- ##
2738## Main body of script. ##
2739## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002740
Guido van Rossum7f43da71994-08-01 12:15:30 +00002741ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002742ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002743ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2744ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2745ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002746
Guido van Rossum627b2d71993-12-24 10:39:16 +00002747
Michael W. Hudson54241132001-12-07 15:38:26 +00002748
Trent Nelson4d4ec652012-10-16 08:51:24 -04002749
Trent Nelson5595ab52012-10-17 04:47:31 -04002750if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002751 # If we're building out-of-tree, we need to make sure the following
2752 # resources get picked up before their $srcdir counterparts.
2753 # Objects/ -> typeslots.inc
2754 # Include/ -> Python-ast.h, graminit.h
2755 # Python/ -> importlib.h
2756 # (A side effect of this is that these resources will automatically be
2757 # regenerated when building out-of-tree, regardless of whether or not
2758 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2759 # off.)
2760 BASECPPFLAGS="-IObjects -IInclude -IPython"
2761else
2762 BASECPPFLAGS=""
2763fi
2764
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765
2766
2767
2768
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002769if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770then
2771# Extract the first word of "hg", so it can be a program name with args.
2772set dummy hg; ac_word=$2
2773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2774$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002775if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002776 $as_echo_n "(cached) " >&6
2777else
2778 if test -n "$HAS_HG"; then
2779 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2780else
2781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782for as_dir in $PATH
2783do
2784 IFS=$as_save_IFS
2785 test -z "$as_dir" && as_dir=.
2786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002788 ac_cv_prog_HAS_HG="found"
2789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2790 break 2
2791 fi
2792done
2793 done
2794IFS=$as_save_IFS
2795
2796 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2797fi
2798fi
2799HAS_HG=$ac_cv_prog_HAS_HG
2800if test -n "$HAS_HG"; then
2801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2802$as_echo "$HAS_HG" >&6; }
2803else
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2805$as_echo "no" >&6; }
2806fi
2807
2808
2809else
2810HAS_HG=no-repository
2811fi
2812if test $HAS_HG = found
2813then
2814 HGVERSION="hg id -i \$(srcdir)"
2815 HGTAG="hg id -t \$(srcdir)"
2816 HGBRANCH="hg id -b \$(srcdir)"
2817else
2818 HGVERSION=""
2819 HGTAG=""
2820 HGBRANCH=""
2821fi
2822
2823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002824ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002825
2826
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002827ac_aux_dir=
2828for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2829 if test -f "$ac_dir/install-sh"; then
2830 ac_aux_dir=$ac_dir
2831 ac_install_sh="$ac_aux_dir/install-sh -c"
2832 break
2833 elif test -f "$ac_dir/install.sh"; then
2834 ac_aux_dir=$ac_dir
2835 ac_install_sh="$ac_aux_dir/install.sh -c"
2836 break
2837 elif test -f "$ac_dir/shtool"; then
2838 ac_aux_dir=$ac_dir
2839 ac_install_sh="$ac_aux_dir/shtool install -c"
2840 break
2841 fi
2842done
2843if test -z "$ac_aux_dir"; then
2844 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2845fi
2846
2847# These three variables are undocumented and unsupported,
2848# and are intended to be withdrawn in a future Autoconf release.
2849# They can cause serious problems if a builder's source tree is in a directory
2850# whose full name contains unusual characters.
2851ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2852ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2853ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2854
2855
2856# Make sure we can run config.sub.
2857$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2858 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2859
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2861$as_echo_n "checking build system type... " >&6; }
2862if ${ac_cv_build+:} false; then :
2863 $as_echo_n "(cached) " >&6
2864else
2865 ac_build_alias=$build_alias
2866test "x$ac_build_alias" = x &&
2867 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2868test "x$ac_build_alias" = x &&
2869 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2870ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2871 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2872
2873fi
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2875$as_echo "$ac_cv_build" >&6; }
2876case $ac_cv_build in
2877*-*-*) ;;
2878*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2879esac
2880build=$ac_cv_build
2881ac_save_IFS=$IFS; IFS='-'
2882set x $ac_cv_build
2883shift
2884build_cpu=$1
2885build_vendor=$2
2886shift; shift
2887# Remember, the first character of IFS is used to create $*,
2888# except with old shells:
2889build_os=$*
2890IFS=$ac_save_IFS
2891case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2892
2893
2894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2895$as_echo_n "checking host system type... " >&6; }
2896if ${ac_cv_host+:} false; then :
2897 $as_echo_n "(cached) " >&6
2898else
2899 if test "x$host_alias" = x; then
2900 ac_cv_host=$ac_cv_build
2901else
2902 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2903 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2904fi
2905
2906fi
2907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2908$as_echo "$ac_cv_host" >&6; }
2909case $ac_cv_host in
2910*-*-*) ;;
2911*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2912esac
2913host=$ac_cv_host
2914ac_save_IFS=$IFS; IFS='-'
2915set x $ac_cv_host
2916shift
2917host_cpu=$1
2918host_vendor=$2
2919shift; shift
2920# Remember, the first character of IFS is used to create $*,
2921# except with old shells:
2922host_os=$*
2923IFS=$ac_save_IFS
2924case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2925
2926
2927
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002928if test "$cross_compiling" = yes; then
2929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2930$as_echo_n "checking for python interpreter for cross build... " >&6; }
2931 if test -z "$PYTHON_FOR_BUILD"; then
2932 for interp in python$PACKAGE_VERSION python3 python; do
2933 which $interp >/dev/null 2>&1 || continue
2934 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2935 break
2936 fi
2937 interp=
2938 done
2939 if test x$interp = x; then
2940 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2941 fi
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2943$as_echo "$interp" >&6; }
doko@ubuntu.com7e6c2e22012-06-30 22:35:00 +02002944 PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002945 fi
2946else
2947 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2948fi
2949
2950
Martin v. Löwis11437992002-04-12 09:54:03 +00002951
Benjamin Petersond23f8222009-04-05 19:13:16 +00002952if test "$prefix" != "/"; then
2953 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2954fi
2955
2956
Martin v. Löwis11437992002-04-12 09:54:03 +00002957
2958
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002959# We don't use PACKAGE_ variables, and they cause conflicts
2960# with other autoconf-based packages that include Python.h
2961grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2962rm confdefs.h
2963mv confdefs.h.new confdefs.h
2964
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002965
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002966VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002967
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002968# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002969
2970SOVERSION=1.0
2971
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002972# The later defininition of _XOPEN_SOURCE disables certain features
2973# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002976
2977
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2979# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2980# them.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002983
2984
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2986# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2987# them.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002990
2991
Martin v. Löwisd6320502004-08-12 13:45:08 +00002992# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2993# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2994
Matthias Kloseb9621712010-04-24 17:59:49 +00002995$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002996
2997
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002998# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2999# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3000# them.
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003003
3004
3005
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003006define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003007
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003008# Arguments passed to configure.
3009
3010CONFIG_ARGS="$ac_configure_args"
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3013$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003014# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003015if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003017 case $enableval in
3018 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003019 # Locate the best usable SDK, see Mac/README.txt for more
3020 # information
3021 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3022 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003023 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003024 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3025 if test ! -d "${enableval}"
3026 then
3027 enableval=/
3028 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003029 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003030 ;;
3031 esac
3032 case $enableval in
3033 no)
3034 UNIVERSALSDK=
3035 enable_universalsdk=
3036 ;;
3037 *)
3038 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039 if test ! -d "${UNIVERSALSDK}"
3040 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003041 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003042 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003043 ;;
3044 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003045
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047else
3048
3049 UNIVERSALSDK=
3050 enable_universalsdk=
3051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003052fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003053
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054if test -n "${UNIVERSALSDK}"
3055then
Matthias Kloseb9621712010-04-24 17:59:49 +00003056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3057$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003058else
Matthias Kloseb9621712010-04-24 17:59:49 +00003059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3060$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003061fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003063
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003064
3065
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066# For backward compatibility reasons we prefer to select '32-bit' if available,
3067# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069if test "`uname -s`" = "Darwin"
3070then
3071 if test -n "${UNIVERSALSDK}"
3072 then
3073 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3074 then
3075 UNIVERSAL_ARCHS="intel"
3076 fi
3077 fi
3078fi
3079
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003080
Matthias Kloseb9621712010-04-24 17:59:49 +00003081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3082$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083
3084# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003085if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3088$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089 UNIVERSAL_ARCHS="$withval"
3090
3091else
3092
Ned Deilycbfb9a52012-06-23 16:02:19 -07003093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3094$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095
3096fi
3097
3098
3099
3100
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003101
3102# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003103if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003104 withval=$with_framework_name;
3105 PYTHONFRAMEWORK=${withval}
3106 PYTHONFRAMEWORKDIR=${withval}.framework
3107 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3108
3109else
3110
3111 PYTHONFRAMEWORK=Python
3112 PYTHONFRAMEWORKDIR=Python.framework
3113 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3114
3115fi
3116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003117# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003118if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003119 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003120 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003121 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003122 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003123 esac
3124 case $enableval in
3125 no)
3126 PYTHONFRAMEWORK=
3127 PYTHONFRAMEWORKDIR=no-framework
3128 PYTHONFRAMEWORKPREFIX=
3129 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003130 FRAMEWORKINSTALLFIRST=
3131 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003132 FRAMEWORKALTINSTALLFIRST=
3133 FRAMEWORKALTINSTALLLAST=
3134 if test "x${prefix}" = "xNONE"; then
3135 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3136 else
3137 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3138 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003140 ;;
3141 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003143 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003144 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003145 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003146 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3147 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003149
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003150 if test "x${prefix}" = "xNONE" ; then
3151 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003152
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003153 else
3154 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3155 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003156
3157 case "${enableval}" in
3158 /System*)
3159 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3160 if test "${prefix}" = "NONE" ; then
3161 # See below
3162 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3163 fi
3164 ;;
3165
3166 /Library*)
3167 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3168 ;;
3169
3170 */Library/Frameworks)
3171 MDIR="`dirname "${enableval}"`"
3172 MDIR="`dirname "${MDIR}"`"
3173 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3174
3175 if test "${prefix}" = "NONE"; then
3176 # User hasn't specified the
3177 # --prefix option, but wants to install
3178 # the framework in a non-default location,
3179 # ensure that the compatibility links get
3180 # installed relative to that prefix as well
3181 # instead of in /usr/local.
3182 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3183 fi
3184 ;;
3185
3186 *)
3187 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3188 ;;
3189 esac
3190
Jack Jansen127e56e2001-09-11 14:41:54 +00003191 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003193 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003194 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003195 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003196
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003197 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003198
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003199 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3200
3201 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3202
Jack Jansene578a632001-08-15 01:27:14 +00003203 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003204
Guido van Rossum563e7081996-09-10 18:20:48 +00003205else
Martin v. Löwis11437992002-04-12 09:54:03 +00003206
Jack Jansene578a632001-08-15 01:27:14 +00003207 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003208 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003209 PYTHONFRAMEWORKPREFIX=
3210 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003211 FRAMEWORKINSTALLFIRST=
3212 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003213 FRAMEWORKALTINSTALLFIRST=
3214 FRAMEWORKALTINSTALLLAST=
3215 if test "x${prefix}" = "xNONE" ; then
3216 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3217 else
3218 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3219 fi
Jack Jansene578a632001-08-15 01:27:14 +00003220 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003221
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003223fi
3224
Thomas Wouters477c8d52006-05-27 19:21:47 +00003225
3226
Michael W. Hudson54241132001-12-07 15:38:26 +00003227
3228
3229
3230
Jack Jansene578a632001-08-15 01:27:14 +00003231
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003232
3233
3234
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003235
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003236
Jack Jansene578a632001-08-15 01:27:14 +00003237##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003238## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003239## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003240##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241# Set name for machine-dependent library files
3242
Matthias Kloseb9621712010-04-24 17:59:49 +00003243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3244$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003245if test -z "$MACHDEP"
3246then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003247 # avoid using uname for cross builds
3248 if test "$cross_compiling" = yes; then
3249 # ac_sys_system and ac_sys_release are only used for setting
3250 # `define_xopen_source' in the case statement below. For the
3251 # current supported cross builds, this macro is not adjusted.
3252 case "$host" in
3253 *-*-linux*)
3254 ac_sys_system=Linux
3255 ;;
3256 *-*-cygwin*)
3257 ac_sys_system=Cygwin
3258 ;;
3259 *)
3260 # for now, limit cross builds to known configurations
3261 MACHDEP="unknown"
3262 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3263 esac
3264 ac_sys_release=
3265 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003266 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003267 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003268 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003273 fi
3274 ac_md_system=`echo $ac_sys_system |
3275 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3276 ac_md_release=`echo $ac_sys_release |
3277 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3278 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003279
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003280 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003281 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003282 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003283 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003284 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003285 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287fi
Guido van Rossum91922671997-10-09 20:24:13 +00003288
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003289
3290if test "$cross_compiling" = yes; then
3291 case "$host" in
3292 *-*-linux*)
3293 case "$host_cpu" in
3294 arm*)
3295 _host_cpu=arm
3296 ;;
3297 *)
3298 _host_cpu=$host_cpu
3299 esac
3300 ;;
3301 *-*-cygwin*)
3302 _host_cpu=
3303 ;;
3304 *)
3305 # for now, limit cross builds to known configurations
3306 MACHDEP="unknown"
3307 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3308 esac
3309 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3310fi
3311
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003312# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3313# disable features if it is defined, without any means to access these
3314# features as extensions. For these systems, we skip the definition of
3315# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3316# some feature, make sure there is no alternative way to access this
3317# feature. Also, when using wildcards, make sure you have verified the
3318# need for not defining _XOPEN_SOURCE on all systems matching the
3319# wildcard, and that the wildcard does not include future systems
3320# (which may remove their limitations).
3321case $ac_sys_system/$ac_sys_release in
3322 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3323 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003324 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003325 # In addition, Stefan Krah confirms that issue #1244610 exists through
3326 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003327 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003328 define_xopen_source=no
3329 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3330 # also defined. This can be overridden by defining _BSD_SOURCE
3331 # As this has a different meaning on Linux, only define it on OpenBSD
3332
Matthias Kloseb9621712010-04-24 17:59:49 +00003333$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003334
3335 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003342
3343 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003344 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3345 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3346 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003347 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 +00003348 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003349 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3350 # request to enable features supported by the standard as a request
3351 # to disable features not supported by the standard. The best way
3352 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3353 # entirely and define __EXTENSIONS__ instead.
3354 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003355 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003356 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3357 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003358 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003359 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 define_xopen_source=no;;
3361 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003362 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003364 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003365 # On FreeBSD 4, the math functions C89 does not cover are never defined
3366 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3367 FreeBSD/4.*)
3368 define_xopen_source=no;;
3369 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3370 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3371 # identifies itself as Darwin/7.*
3372 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # disables platform specific features beyond repair.
3374 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # has no effect, don't bother defining them
3376 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003377 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003378 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003379 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003380 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3381 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3382 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003383 AIX/4)
3384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 AIX/5)
3386 if test `uname -r` -eq 1; then
3387 define_xopen_source=no
3388 fi
3389 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003390 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3391 # defining NI_NUMERICHOST.
3392 QNX/6.3.2)
3393 define_xopen_source=no
3394 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396esac
3397
3398if test $define_xopen_source = yes
3399then
Victor Stinner14d098d2011-09-07 22:29:43 +02003400 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Victor Stinner14d098d2011-09-07 22:29:43 +02003402$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3406 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3407 # several APIs are not declared. Since this is also needed in some
3408 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003414$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003416fi
3417
Guido van Rossum91922671997-10-09 20:24:13 +00003418#
3419# SGI compilers allow the specification of the both the ABI and the
3420# ISA on the command line. Depending on the values of these switches,
3421# different and often incompatable code will be generated.
3422#
3423# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3424# thus supply support for various ABI/ISA combinations. The MACHDEP
3425# variable is also adjusted.
3426#
3427
3428if test ! -z "$SGI_ABI"
3429then
3430 CC="cc $SGI_ABI"
3431 LDFLAGS="$SGI_ABI $LDFLAGS"
3432 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3435$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003436
Jack Jansen6b08a402004-06-03 12:41:45 +00003437# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3438# it may influence the way we can build extensions, so distutils
3439# needs to check it
3440
Thomas Wouters477c8d52006-05-27 19:21:47 +00003441
Jack Jansen6b08a402004-06-03 12:41:45 +00003442CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003443EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003444
Guido van Rossum627b2d71993-12-24 10:39:16 +00003445# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003446
3447# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3448# for debug/optimization stuff. BASECFLAGS is for flags that are required
3449# just to get things to compile and link. Users are free to override OPT
3450# when running configure or make. The build should not break if they do.
3451# BASECFLAGS should generally not be messed with, however.
3452
3453# XXX shouldn't some/most/all of this code be merged with the stuff later
3454# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3456$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003457
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003458# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003459if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003460 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003461 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003462 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003463 without_gcc=yes;;
3464 yes) CC=gcc
3465 without_gcc=no;;
3466 *) CC=$withval
3467 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003468 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003469else
Martin v. Löwis11437992002-04-12 09:54:03 +00003470
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003471 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003472 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003473 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003474 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003475 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476fi
3477
Matthias Kloseb9621712010-04-24 17:59:49 +00003478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3479$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003480
Guido van Rossum8b131c51995-03-09 14:10:13 +00003481# If the user switches compilers, we can't believe the cache
3482if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3483then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003484 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003485(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003486fi
3487
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003488# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3489# when the compiler supports them, but we don't always want -O2, and
3490# we set -g later.
3491if test -z "$CFLAGS"; then
3492 CFLAGS=
3493fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003494
3495if test "$ac_sys_system" = "Darwin"
3496then
3497 # Compiler selection on MacOSX is more complicated than
3498 # AC_PROG_CC can handle, see Mac/README.txt for more
3499 # information
3500 if test -z "${CC}"
3501 then
3502 found_gcc=
3503 found_clang=
3504 as_save_IFS=$IFS; IFS=:
3505 for as_dir in $PATH
3506 do
3507 IFS=$as_save_IFS
3508 if test -x $as_dir/gcc; then
3509 if test -z "${found_gcc}"; then
3510 found_gcc=$as_dir/gcc
3511 fi
3512 fi
3513 if test -x $as_dir/clang; then
3514 if test -z "${found_clang}"; then
3515 found_clang=$as_dir/clang
3516 fi
3517 fi
3518 done
3519 IFS=$as_save_IFS
3520
3521 if test -n "$found_gcc" -a -n "$found_clang"
3522 then
3523 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3524 then
3525 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3526$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3527 CC="$found_clang"
3528 CXX="$found_clang++"
3529 fi
3530
3531
3532 elif test -z "$found_gcc" -a -n "$found_clang"
3533 then
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3535$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3536 CC="$found_clang"
3537 CXX="$found_clang++"
3538
3539 elif test -z "$found_gcc" -a -z "$found_clang"
3540 then
3541 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3542 if test -n "${found_clang}"
3543 then
3544 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3545$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3546 CC="${found_clang}"
3547 CXX="`/usr/bin/xcrun -find clang++`"
3548
3549 # else: use default behaviour
3550 fi
3551 fi
3552 fi
3553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003554ac_ext=c
3555ac_cpp='$CPP $CPPFLAGS'
3556ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3557ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3558ac_compiler_gnu=$ac_cv_c_compiler_gnu
3559if test -n "$ac_tool_prefix"; then
3560 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3561set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3563$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003564if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003565 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003566else
3567 if test -n "$CC"; then
3568 ac_cv_prog_CC="$CC" # Let the user override the test.
3569else
Martin v. Löwis11437992002-04-12 09:54:03 +00003570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3571for as_dir in $PATH
3572do
3573 IFS=$as_save_IFS
3574 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003575 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003576 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003578 $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 +00003579 break 2
3580 fi
3581done
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003583IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003584
Jack Jansendd19cf82001-12-06 22:36:17 +00003585fi
3586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003587CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003588if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3590$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003591else
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3593$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003594fi
3595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003596
Martin v. Löwis11437992002-04-12 09:54:03 +00003597fi
3598if test -z "$ac_cv_prog_CC"; then
3599 ac_ct_CC=$CC
3600 # Extract the first word of "gcc", so it can be a program name with args.
3601set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3603$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003604if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003606else
3607 if test -n "$ac_ct_CC"; then
3608 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3609else
3610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3611for as_dir in $PATH
3612do
3613 IFS=$as_save_IFS
3614 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003616 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 $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 +00003619 break 2
3620 fi
3621done
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003623IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003624
3625fi
3626fi
3627ac_ct_CC=$ac_cv_prog_ac_ct_CC
3628if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3630$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003631else
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3633$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003634fi
3635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003636 if test "x$ac_ct_CC" = x; then
3637 CC=""
3638 else
3639 case $cross_compiling:$ac_tool_warned in
3640yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003641{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3642$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643ac_tool_warned=yes ;;
3644esac
3645 CC=$ac_ct_CC
3646 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003647else
3648 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003649fi
3650
Jack Jansendd19cf82001-12-06 22:36:17 +00003651if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652 if test -n "$ac_tool_prefix"; then
3653 # 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 +00003654set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3656$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003657if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003659else
3660 if test -n "$CC"; then
3661 ac_cv_prog_CC="$CC" # Let the user override the test.
3662else
Martin v. Löwis11437992002-04-12 09:54:03 +00003663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3664for as_dir in $PATH
3665do
3666 IFS=$as_save_IFS
3667 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003670 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 $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 +00003672 break 2
3673 fi
3674done
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003677
3678fi
3679fi
3680CC=$ac_cv_prog_CC
3681if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3683$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003684else
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3686$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003687fi
3688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003691fi
3692if test -z "$CC"; then
3693 # Extract the first word of "cc", so it can be a program name with args.
3694set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3696$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003697if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003699else
3700 if test -n "$CC"; then
3701 ac_cv_prog_CC="$CC" # Let the user override the test.
3702else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003703 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3705for as_dir in $PATH
3706do
3707 IFS=$as_save_IFS
3708 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003711 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3712 ac_prog_rejected=yes
3713 continue
3714 fi
3715 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 $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 +00003717 break 2
3718 fi
3719done
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003722
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003723if test $ac_prog_rejected = yes; then
3724 # We found a bogon in the path, so make sure we never use it.
3725 set dummy $ac_cv_prog_CC
3726 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003728 # We chose a different compiler from the bogus one.
3729 # However, it has the same basename, so the bogon will be chosen
3730 # first if we set CC to just the basename; use the full file name.
3731 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003732 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003733 fi
3734fi
3735fi
3736fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003737CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003738if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3740$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741else
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3743$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744fi
3745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003746
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
3748if test -z "$CC"; then
3749 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003751 do
3752 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3753set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3755$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003756if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003758else
3759 if test -n "$CC"; then
3760 ac_cv_prog_CC="$CC" # Let the user override the test.
3761else
Martin v. Löwis11437992002-04-12 09:54:03 +00003762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3763for as_dir in $PATH
3764do
3765 IFS=$as_save_IFS
3766 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 $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 +00003771 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003772 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003773done
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003776
3777fi
3778fi
3779CC=$ac_cv_prog_CC
3780if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3782$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003783else
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3785$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003786fi
3787
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 test -n "$CC" && break
3790 done
3791fi
3792if test -z "$CC"; then
3793 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003795do
3796 # Extract the first word of "$ac_prog", so it can be a program name with args.
3797set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3799$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003800if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003801 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003802else
3803 if test -n "$ac_ct_CC"; then
3804 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3805else
3806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3807for as_dir in $PATH
3808do
3809 IFS=$as_save_IFS
3810 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003812 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003813 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 $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 +00003815 break 2
3816 fi
3817done
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003819IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003820
Martin v. Löwis11437992002-04-12 09:54:03 +00003821fi
3822fi
3823ac_ct_CC=$ac_cv_prog_ac_ct_CC
3824if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3826$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003827else
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3829$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003830fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003831
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832
Martin v. Löwis11437992002-04-12 09:54:03 +00003833 test -n "$ac_ct_CC" && break
3834done
Michael W. Hudson54241132001-12-07 15:38:26 +00003835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836 if test "x$ac_ct_CC" = x; then
3837 CC=""
3838 else
3839 case $cross_compiling:$ac_tool_warned in
3840yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003841{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3842$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843ac_tool_warned=yes ;;
3844esac
3845 CC=$ac_ct_CC
3846 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003847fi
3848
3849fi
3850
3851
Matthias Kloseb9621712010-04-24 17:59:49 +00003852test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003854as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003855See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003856
3857# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003858$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3859set X $ac_compile
3860ac_compiler=$2
3861for ac_option in --version -v -V -qversion; do
3862 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863case "(($ac_try" in
3864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3865 *) ac_try_echo=$ac_try;;
3866esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003867eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3868$as_echo "$ac_try_echo"; } >&5
3869 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003870 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003871 if test -s conftest.err; then
3872 sed '10a\
3873... rest of stderr output deleted ...
3874 10q' conftest.err >conftest.er1
3875 cat conftest.er1 >&5
3876 fi
3877 rm -f conftest.er1 conftest.err
3878 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3879 test $ac_status = 0; }
3880done
Martin v. Löwis11437992002-04-12 09:54:03 +00003881
Matthias Kloseb9621712010-04-24 17:59:49 +00003882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003883/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003884
Martin v. Löwis11437992002-04-12 09:54:03 +00003885int
3886main ()
3887{
3888
3889 ;
3890 return 0;
3891}
3892_ACEOF
3893ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003894ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003895# Try to create an executable without -o first, disregard a.out.
3896# It will help us diagnose broken compilers, and finding out an intuition
3897# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3899$as_echo_n "checking whether the C compiler works... " >&6; }
3900ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3901
3902# The possible output files:
3903ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3904
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905ac_rmfiles=
3906for ac_file in $ac_files
3907do
3908 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3911 esac
3912done
3913rm -f $ac_rmfiles
3914
Matthias Kloseb9621712010-04-24 17:59:49 +00003915if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916case "(($ac_try" in
3917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3918 *) ac_try_echo=$ac_try;;
3919esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003920eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3921$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003923 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003924 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3925 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3927# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3928# in a Makefile. We should not override ac_cv_exeext if it was cached,
3929# so that the user can short-circuit this test for compilers unknown to
3930# Autoconf.
3931for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003932do
3933 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003935 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003936 ;;
3937 [ab].out )
3938 # We found the default executable, but exeext='' is most
3939 # certainly right.
3940 break;;
3941 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943 then :; else
3944 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3945 fi
3946 # We set ac_cv_exeext here because the later test for it is not
3947 # safe: cross compilers may not add the suffix if given an `-o'
3948 # argument, so we may need to know it at that point already.
3949 # Even if this section looks crufty: it has the advantage of
3950 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003951 break;;
3952 * )
3953 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 esac
3955done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956test "$ac_cv_exeext" = no && ac_cv_exeext=
3957
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003958else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 ac_file=''
3960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003961if test -z "$ac_file"; then :
3962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3963$as_echo "no" >&6; }
3964$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003965sed 's/^/| /' conftest.$ac_ext >&5
3966
Matthias Kloseb9621712010-04-24 17:59:49 +00003967{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003969as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003970See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003971else
3972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3973$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3976$as_echo_n "checking for C compiler default output file name... " >&6; }
3977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3978$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003979ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003980
Matthias Kloseb9621712010-04-24 17:59:49 +00003981rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3984$as_echo_n "checking for suffix of executables... " >&6; }
3985if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986case "(($ac_try" in
3987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3988 *) ac_try_echo=$ac_try;;
3989esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003990eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3991$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003993 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003994 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3995 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3997# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3998# work properly (i.e., refer to `conftest.exe'), while it won't with
3999# `rm'.
4000for ac_file in conftest.exe conftest conftest.*; do
4001 test -f "$ac_file" || continue
4002 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004003 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4005 break;;
4006 * ) break;;
4007 esac
4008done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004009else
Matthias Kloseb9621712010-04-24 17:59:49 +00004010 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004012as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004013See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004015rm -f conftest conftest$ac_cv_exeext
4016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4017$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018
4019rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004020EXEEXT=$ac_cv_exeext
4021ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4023/* end confdefs.h. */
4024#include <stdio.h>
4025int
4026main ()
4027{
4028FILE *f = fopen ("conftest.out", "w");
4029 return ferror (f) || fclose (f) != 0;
4030
4031 ;
4032 return 0;
4033}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004035ac_clean_files="$ac_clean_files conftest.out"
4036# Check that the compiler produces executables we can run. If not, either
4037# the compiler is broken, or we cross compile.
4038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4039$as_echo_n "checking whether we are cross compiling... " >&6; }
4040if test "$cross_compiling" != yes; then
4041 { { ac_try="$ac_link"
4042case "(($ac_try" in
4043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4044 *) ac_try_echo=$ac_try;;
4045esac
4046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4047$as_echo "$ac_try_echo"; } >&5
4048 (eval "$ac_link") 2>&5
4049 ac_status=$?
4050 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4051 test $ac_status = 0; }
4052 if { ac_try='./conftest$ac_cv_exeext'
4053 { { case "(($ac_try" in
4054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4055 *) ac_try_echo=$ac_try;;
4056esac
4057eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4058$as_echo "$ac_try_echo"; } >&5
4059 (eval "$ac_try") 2>&5
4060 ac_status=$?
4061 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4062 test $ac_status = 0; }; }; then
4063 cross_compiling=no
4064 else
4065 if test "$cross_compiling" = maybe; then
4066 cross_compiling=yes
4067 else
4068 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4069$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004070as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004071If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004072See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 fi
4074 fi
4075fi
4076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4077$as_echo "$cross_compiling" >&6; }
4078
4079rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4080ac_clean_files=$ac_clean_files_save
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4082$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004083if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004084 $as_echo_n "(cached) " >&6
4085else
4086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004087/* end confdefs.h. */
4088
4089int
4090main ()
4091{
4092
4093 ;
4094 return 0;
4095}
4096_ACEOF
4097rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004098if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004099case "(($ac_try" in
4100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4101 *) ac_try_echo=$ac_try;;
4102esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4104$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004105 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004106 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004107 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4108 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109 for ac_file in conftest.o conftest.obj conftest.*; do
4110 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004111 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4114 break;;
4115 esac
4116done
4117else
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004119sed 's/^/| /' conftest.$ac_ext >&5
4120
Matthias Kloseb9621712010-04-24 17:59:49 +00004121{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004123as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004124See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004125fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004126rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4129$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004130OBJEXT=$ac_cv_objext
4131ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4133$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004134if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004135 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004136else
Matthias Kloseb9621712010-04-24 17:59:49 +00004137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004139
Martin v. Löwis11437992002-04-12 09:54:03 +00004140int
4141main ()
4142{
4143#ifndef __GNUC__
4144 choke me
4145#endif
4146
4147 ;
4148 return 0;
4149}
4150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004151if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 ac_compiler_gnu=yes
4153else
Matthias Kloseb9621712010-04-24 17:59:49 +00004154 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004157ac_cv_c_compiler_gnu=$ac_compiler_gnu
4158
4159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4161$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4162if test $ac_compiler_gnu = yes; then
4163 GCC=yes
4164else
4165 GCC=
4166fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004167ac_test_CFLAGS=${CFLAGS+set}
4168ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4170$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004171if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004173else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174 ac_save_c_werror_flag=$ac_c_werror_flag
4175 ac_c_werror_flag=yes
4176 ac_cv_prog_cc_g=no
4177 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004180
Martin v. Löwis11437992002-04-12 09:54:03 +00004181int
4182main ()
4183{
4184
4185 ;
4186 return 0;
4187}
4188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004190 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004191else
Matthias Kloseb9621712010-04-24 17:59:49 +00004192 CFLAGS=""
4193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194/* end confdefs.h. */
4195
4196int
4197main ()
4198{
4199
4200 ;
4201 return 0;
4202}
4203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004204if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205
Matthias Kloseb9621712010-04-24 17:59:49 +00004206else
4207 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004208 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210/* end confdefs.h. */
4211
4212int
4213main ()
4214{
4215
4216 ;
4217 return 0;
4218}
4219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004220if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4228 ac_c_werror_flag=$ac_save_c_werror_flag
4229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4231$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004232if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004233 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004234elif test $ac_cv_prog_cc_g = yes; then
4235 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004236 CFLAGS="-g -O2"
4237 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004238 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004239 fi
4240else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004241 if test "$GCC" = yes; then
4242 CFLAGS="-O2"
4243 else
4244 CFLAGS=
4245 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4248$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004249if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004251else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004253ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004255/* end confdefs.h. */
4256#include <stdarg.h>
4257#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004258struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004259/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4260struct buf { int x; };
4261FILE * (*rcsopen) (struct buf *, struct stat *, int);
4262static char *e (p, i)
4263 char **p;
4264 int i;
4265{
4266 return p[i];
4267}
4268static char *f (char * (*g) (char **, int), char **p, ...)
4269{
4270 char *s;
4271 va_list v;
4272 va_start (v,p);
4273 s = g (p, va_arg (v,int));
4274 va_end (v);
4275 return s;
4276}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004277
4278/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4279 function prototypes and stuff, but not '\xHH' hex character constants.
4280 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004282 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4283 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004285int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4286
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4288 inside strings and character constants. */
4289#define FOO(x) 'x'
4290int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4291
Skip Montanaro6dead952003-09-25 14:50:04 +00004292int test (int i, double x);
4293struct s1 {int (*f) (int a);};
4294struct s2 {int (*f) (double a);};
4295int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4296int argc;
4297char **argv;
4298int
4299main ()
4300{
4301return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4302 ;
4303 return 0;
4304}
4305_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4307 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004308do
4309 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004310 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313rm -f core conftest.err conftest.$ac_objext
4314 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004315done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004317CC=$ac_save_CC
4318
4319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320# AC_CACHE_VAL
4321case "x$ac_cv_prog_cc_c89" in
4322 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4324$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4327$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004328 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4331$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004332esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004333if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004334
Matthias Kloseb9621712010-04-24 17:59:49 +00004335fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004336
Martin v. Löwis11437992002-04-12 09:54:03 +00004337ac_ext=c
4338ac_cpp='$CPP $CPPFLAGS'
4339ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4340ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4341ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004342
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004343
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004344
4345
Matthias Kloseb9621712010-04-24 17:59:49 +00004346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4347$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004350if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004352
4353 case $withval in
4354 no) with_cxx_main=no
4355 MAINCC='$(CC)';;
4356 yes) with_cxx_main=yes
4357 MAINCC='$(CXX)';;
4358 *) with_cxx_main=yes
4359 MAINCC=$withval
4360 if test -z "$CXX"
4361 then
4362 CXX=$withval
4363 fi;;
4364 esac
4365else
4366
4367 with_cxx_main=no
4368 MAINCC='$(CC)'
4369
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370fi
4371
Matthias Kloseb9621712010-04-24 17:59:49 +00004372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4373$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004374
4375preset_cxx="$CXX"
4376if test -z "$CXX"
4377then
4378 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004379 gcc) if test -n "$ac_tool_prefix"; then
4380 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4381set dummy ${ac_tool_prefix}g++; ac_word=$2
4382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4383$as_echo_n "checking for $ac_word... " >&6; }
4384if ${ac_cv_path_CXX+:} false; then :
4385 $as_echo_n "(cached) " >&6
4386else
4387 case $CXX in
4388 [\\/]* | ?:[\\/]*)
4389 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4390 ;;
4391 *)
4392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4393for as_dir in notfound
4394do
4395 IFS=$as_save_IFS
4396 test -z "$as_dir" && as_dir=.
4397 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004398 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004399 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4400 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4401 break 2
4402 fi
4403done
4404 done
4405IFS=$as_save_IFS
4406
4407 ;;
4408esac
4409fi
4410CXX=$ac_cv_path_CXX
4411if test -n "$CXX"; then
4412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4413$as_echo "$CXX" >&6; }
4414else
4415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4416$as_echo "no" >&6; }
4417fi
4418
4419
4420fi
4421if test -z "$ac_cv_path_CXX"; then
4422 ac_pt_CXX=$CXX
4423 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004424set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4426$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004427if ${ac_cv_path_ac_pt_CXX+:} false; then :
4428 $as_echo_n "(cached) " >&6
4429else
4430 case $ac_pt_CXX in
4431 [\\/]* | ?:[\\/]*)
4432 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4433 ;;
4434 *)
4435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4436for as_dir in notfound
4437do
4438 IFS=$as_save_IFS
4439 test -z "$as_dir" && as_dir=.
4440 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004441 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004442 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4443 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4444 break 2
4445 fi
4446done
4447 done
4448IFS=$as_save_IFS
4449
4450 ;;
4451esac
4452fi
4453ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4454if test -n "$ac_pt_CXX"; then
4455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4456$as_echo "$ac_pt_CXX" >&6; }
4457else
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4459$as_echo "no" >&6; }
4460fi
4461
4462 if test "x$ac_pt_CXX" = x; then
4463 CXX="g++"
4464 else
4465 case $cross_compiling:$ac_tool_warned in
4466yes:)
4467{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4468$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4469ac_tool_warned=yes ;;
4470esac
4471 CXX=$ac_pt_CXX
4472 fi
4473else
4474 CXX="$ac_cv_path_CXX"
4475fi
4476 ;;
4477 cc) if test -n "$ac_tool_prefix"; then
4478 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4479set dummy ${ac_tool_prefix}c++; ac_word=$2
4480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4481$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004482if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004483 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004484else
4485 case $CXX in
4486 [\\/]* | ?:[\\/]*)
4487 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4488 ;;
4489 *)
4490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4491for as_dir in notfound
4492do
4493 IFS=$as_save_IFS
4494 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004495 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004496 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004497 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004498 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004499 break 2
4500 fi
4501done
Matthias Kloseb9621712010-04-24 17:59:49 +00004502 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004503IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004504
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004505 ;;
4506esac
4507fi
4508CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004509if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4511$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004512else
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4514$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004516
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004517
4518fi
4519if test -z "$ac_cv_path_CXX"; then
4520 ac_pt_CXX=$CXX
4521 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004522set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4524$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004525if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004526 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004527else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004528 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004529 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004530 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004531 ;;
4532 *)
4533 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4534for as_dir in notfound
4535do
4536 IFS=$as_save_IFS
4537 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004538 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004539 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004540 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004542 break 2
4543 fi
4544done
Matthias Kloseb9621712010-04-24 17:59:49 +00004545 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004546IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004547
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004548 ;;
4549esac
4550fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004551ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4552if test -n "$ac_pt_CXX"; then
4553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4554$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004555else
Matthias Kloseb9621712010-04-24 17:59:49 +00004556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4557$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004559
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004560 if test "x$ac_pt_CXX" = x; then
4561 CXX="c++"
4562 else
4563 case $cross_compiling:$ac_tool_warned in
4564yes:)
4565{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4566$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4567ac_tool_warned=yes ;;
4568esac
4569 CXX=$ac_pt_CXX
4570 fi
4571else
4572 CXX="$ac_cv_path_CXX"
4573fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004574 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004575 clang|*/clang) if test -n "$ac_tool_prefix"; then
4576 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4577set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4579$as_echo_n "checking for $ac_word... " >&6; }
4580if ${ac_cv_path_CXX+:} false; then :
4581 $as_echo_n "(cached) " >&6
4582else
4583 case $CXX in
4584 [\\/]* | ?:[\\/]*)
4585 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4586 ;;
4587 *)
4588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4589for as_dir in notfound
4590do
4591 IFS=$as_save_IFS
4592 test -z "$as_dir" && as_dir=.
4593 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004595 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4597 break 2
4598 fi
4599done
4600 done
4601IFS=$as_save_IFS
4602
Ned Deilycbfb9a52012-06-23 16:02:19 -07004603 ;;
4604esac
4605fi
4606CXX=$ac_cv_path_CXX
4607if test -n "$CXX"; then
4608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4609$as_echo "$CXX" >&6; }
4610else
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4612$as_echo "no" >&6; }
4613fi
4614
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004615
4616fi
4617if test -z "$ac_cv_path_CXX"; then
4618 ac_pt_CXX=$CXX
4619 # Extract the first word of "clang++", so it can be a program name with args.
4620set dummy clang++; ac_word=$2
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4622$as_echo_n "checking for $ac_word... " >&6; }
4623if ${ac_cv_path_ac_pt_CXX+:} false; then :
4624 $as_echo_n "(cached) " >&6
4625else
4626 case $ac_pt_CXX in
4627 [\\/]* | ?:[\\/]*)
4628 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4629 ;;
4630 *)
4631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4632for as_dir in notfound
4633do
4634 IFS=$as_save_IFS
4635 test -z "$as_dir" && as_dir=.
4636 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004637 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004638 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4639 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4640 break 2
4641 fi
4642done
4643 done
4644IFS=$as_save_IFS
4645
4646 ;;
4647esac
4648fi
4649ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4650if test -n "$ac_pt_CXX"; then
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4652$as_echo "$ac_pt_CXX" >&6; }
4653else
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4655$as_echo "no" >&6; }
4656fi
4657
4658 if test "x$ac_pt_CXX" = x; then
4659 CXX="clang++"
4660 else
4661 case $cross_compiling:$ac_tool_warned in
4662yes:)
4663{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4664$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4665ac_tool_warned=yes ;;
4666esac
4667 CXX=$ac_pt_CXX
4668 fi
4669else
4670 CXX="$ac_cv_path_CXX"
4671fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004672 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004673 esac
4674 if test "$CXX" = "notfound"
4675 then
4676 CXX=""
4677 fi
4678fi
4679if test -z "$CXX"
4680then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004681 if test -n "$ac_tool_prefix"; then
4682 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4683 do
4684 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4685set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4687$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004688if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004689 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004690else
4691 if test -n "$CXX"; then
4692 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4693else
4694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4695for as_dir in $PATH
4696do
4697 IFS=$as_save_IFS
4698 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004699 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004701 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004703 break 2
4704 fi
4705done
Matthias Kloseb9621712010-04-24 17:59:49 +00004706 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004707IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004708
4709fi
4710fi
4711CXX=$ac_cv_prog_CXX
4712if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4714$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004715else
Matthias Kloseb9621712010-04-24 17:59:49 +00004716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004718fi
4719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004720
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004721 test -n "$CXX" && break
4722 done
4723fi
4724if test -z "$CXX"; then
4725 ac_ct_CXX=$CXX
4726 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4727do
4728 # Extract the first word of "$ac_prog", so it can be a program name with args.
4729set dummy $ac_prog; ac_word=$2
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4731$as_echo_n "checking for $ac_word... " >&6; }
4732if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4733 $as_echo_n "(cached) " >&6
4734else
4735 if test -n "$ac_ct_CXX"; then
4736 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4737else
4738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739for as_dir in $PATH
4740do
4741 IFS=$as_save_IFS
4742 test -z "$as_dir" && as_dir=.
4743 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004745 ac_cv_prog_ac_ct_CXX="$ac_prog"
4746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4747 break 2
4748 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004750 done
4751IFS=$as_save_IFS
4752
4753fi
4754fi
4755ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4756if test -n "$ac_ct_CXX"; then
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4758$as_echo "$ac_ct_CXX" >&6; }
4759else
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
4762fi
4763
4764
4765 test -n "$ac_ct_CXX" && break
4766done
4767
4768 if test "x$ac_ct_CXX" = x; then
4769 CXX="notfound"
4770 else
4771 case $cross_compiling:$ac_tool_warned in
4772yes:)
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4774$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4775ac_tool_warned=yes ;;
4776esac
4777 CXX=$ac_ct_CXX
4778 fi
4779fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004780
4781 if test "$CXX" = "notfound"
4782 then
4783 CXX=""
4784 fi
4785fi
4786if test "$preset_cxx" != "$CXX"
4787then
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789
4790 By default, distutils will build C++ extension modules with \"$CXX\".
4791 If this is not intended, then set CXX on the configure command line.
4792 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004793$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794
4795 By default, distutils will build C++ extension modules with \"$CXX\".
4796 If this is not intended, then set CXX on the configure command line.
4797 " >&2;}
4798fi
4799
4800
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4802$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4803save_LDFLAGS="$LDFLAGS"
4804LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004805
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4807/* end confdefs.h. */
4808
4809int
4810main ()
4811{
4812
4813 ;
4814 return 0;
4815}
4816_ACEOF
4817if ac_fn_c_try_link "$LINENO"; then :
4818 NO_AS_NEEDED="-Wl,--no-as-needed"
4819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4820$as_echo "yes" >&6; }
4821else
4822 NO_AS_NEEDED=""
4823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4824$as_echo "no" >&6; }
4825fi
4826rm -f core conftest.err conftest.$ac_objext \
4827 conftest$ac_exeext conftest.$ac_ext
4828LDFLAGS="$save_LDFLAGS"
4829
4830
4831
4832# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004833ac_ext=c
4834ac_cpp='$CPP $CPPFLAGS'
4835ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4836ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4837ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4839$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004840# On Suns, sometimes $CPP names a directory.
4841if test -n "$CPP" && test -d "$CPP"; then
4842 CPP=
4843fi
4844if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004845 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004846 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004847else
Martin v. Löwis11437992002-04-12 09:54:03 +00004848 # Double quotes because CPP needs to be expanded
4849 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4850 do
4851 ac_preproc_ok=false
4852for ac_c_preproc_warn_flag in '' yes
4853do
4854 # Use a header file that comes with gcc, so configuring glibc
4855 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004856 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4857 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004858 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004859 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004861/* end confdefs.h. */
4862#ifdef __STDC__
4863# include <limits.h>
4864#else
4865# include <assert.h>
4866#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004867 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004869if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004870
Matthias Kloseb9621712010-04-24 17:59:49 +00004871else
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 # Broken: fails on valid input.
4873continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004874fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004875rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004877 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004878 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004881#include <ac_nonexistent.h>
4882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004883if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004884 # Broken: success on invalid input.
4885continue
4886else
Martin v. Löwis11437992002-04-12 09:54:03 +00004887 # Passes both tests.
4888ac_preproc_ok=:
4889break
4890fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004891rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004892
4893done
4894# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004895rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004896if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004897 break
4898fi
4899
4900 done
4901 ac_cv_prog_CPP=$CPP
4902
4903fi
4904 CPP=$ac_cv_prog_CPP
4905else
4906 ac_cv_prog_CPP=$CPP
4907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4909$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004910ac_preproc_ok=false
4911for ac_c_preproc_warn_flag in '' yes
4912do
4913 # Use a header file that comes with gcc, so configuring glibc
4914 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004915 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4916 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004917 # On the NeXT, cc -E runs the code through the compiler's parser,
4918 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004920/* end confdefs.h. */
4921#ifdef __STDC__
4922# include <limits.h>
4923#else
4924# include <assert.h>
4925#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004926 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004928if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004929
Matthias Kloseb9621712010-04-24 17:59:49 +00004930else
Martin v. Löwis11437992002-04-12 09:54:03 +00004931 # Broken: fails on valid input.
4932continue
4933fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004934rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004936 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004937 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004939/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004940#include <ac_nonexistent.h>
4941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004942if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004943 # Broken: success on invalid input.
4944continue
4945else
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 # Passes both tests.
4947ac_preproc_ok=:
4948break
4949fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004950rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004951
4952done
4953# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004954rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004955if $ac_preproc_ok; then :
4956
Martin v. Löwis11437992002-04-12 09:54:03 +00004957else
Matthias Kloseb9621712010-04-24 17:59:49 +00004958 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4959$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004960as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004961See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004962fi
4963
4964ac_ext=c
4965ac_cpp='$CPP $CPPFLAGS'
4966ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4967ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4968ac_compiler_gnu=$ac_cv_c_compiler_gnu
4969
4970
Matthias Kloseb9621712010-04-24 17:59:49 +00004971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4972$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004973if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004975else
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004977 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 # Loop through the user's path and test for each of PROGNAME-LIST
4979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004980for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4981do
4982 IFS=$as_save_IFS
4983 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 for ac_prog in grep ggrep; do
4985 for ac_exec_ext in '' $ac_executable_extensions; do
4986 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004987 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004988# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004989 # Check for GNU $ac_path_GREP
4990case `"$ac_path_GREP" --version 2>&1` in
4991*GNU*)
4992 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4993*)
4994 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00004995 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004996 while :
4997 do
4998 cat "conftest.in" "conftest.in" >"conftest.tmp"
4999 mv "conftest.tmp" "conftest.in"
5000 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005001 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005002 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5003 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005005 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5006 # Best one so far, save it but keep looking for a better one
5007 ac_cv_path_GREP="$ac_path_GREP"
5008 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005009 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005010 # 10*(2^10) chars as input seems more than enough
5011 test $ac_count -gt 10 && break
5012 done
5013 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5014esac
5015
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 $ac_path_GREP_found && break 3
5017 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005018 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005020IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005022 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 +00005023 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005024else
5025 ac_cv_path_GREP=$GREP
5026fi
5027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5030$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005031 GREP="$ac_cv_path_GREP"
5032
5033
Matthias Kloseb9621712010-04-24 17:59:49 +00005034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5035$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005036if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005038else
5039 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5040 then ac_cv_path_EGREP="$GREP -E"
5041 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005043 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 # Loop through the user's path and test for each of PROGNAME-LIST
5045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5047do
5048 IFS=$as_save_IFS
5049 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 for ac_prog in egrep; do
5051 for ac_exec_ext in '' $ac_executable_extensions; do
5052 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005053 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005054# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055 # Check for GNU $ac_path_EGREP
5056case `"$ac_path_EGREP" --version 2>&1` in
5057*GNU*)
5058 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5059*)
5060 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005062 while :
5063 do
5064 cat "conftest.in" "conftest.in" >"conftest.tmp"
5065 mv "conftest.tmp" "conftest.in"
5066 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005068 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5069 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005071 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5072 # Best one so far, save it but keep looking for a better one
5073 ac_cv_path_EGREP="$ac_path_EGREP"
5074 ac_path_EGREP_max=$ac_count
5075 fi
5076 # 10*(2^10) chars as input seems more than enough
5077 test $ac_count -gt 10 && break
5078 done
5079 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5080esac
5081
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 $ac_path_EGREP_found && break 3
5083 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005084 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005086IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005088 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 +00005089 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005090else
5091 ac_cv_path_EGREP=$EGREP
5092fi
5093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094 fi
5095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5097$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005098 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005099
5100
Matthias Kloseb9621712010-04-24 17:59:49 +00005101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5102$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005103if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 $as_echo_n "(cached) " >&6
5105else
5106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005107/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005108#include <stdlib.h>
5109#include <stdarg.h>
5110#include <string.h>
5111#include <float.h>
5112
5113int
5114main ()
5115{
5116
5117 ;
5118 return 0;
5119}
5120_ACEOF
5121if ac_fn_c_try_compile "$LINENO"; then :
5122 ac_cv_header_stdc=yes
5123else
5124 ac_cv_header_stdc=no
5125fi
5126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5127
5128if test $ac_cv_header_stdc = yes; then
5129 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5131/* end confdefs.h. */
5132#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005133
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005134_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005137
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005138else
Matthias Kloseb9621712010-04-24 17:59:49 +00005139 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005140fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005141rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142
Matthias Kloseb9621712010-04-24 17:59:49 +00005143fi
5144
5145if test $ac_cv_header_stdc = yes; then
5146 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5148/* end confdefs.h. */
5149#include <stdlib.h>
5150
5151_ACEOF
5152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5153 $EGREP "free" >/dev/null 2>&1; then :
5154
5155else
5156 ac_cv_header_stdc=no
5157fi
5158rm -f conftest*
5159
5160fi
5161
5162if test $ac_cv_header_stdc = yes; then
5163 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5164 if test "$cross_compiling" = yes; then :
5165 :
5166else
5167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5168/* end confdefs.h. */
5169#include <ctype.h>
5170#include <stdlib.h>
5171#if ((' ' & 0x0FF) == 0x020)
5172# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5173# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5174#else
5175# define ISLOWER(c) \
5176 (('a' <= (c) && (c) <= 'i') \
5177 || ('j' <= (c) && (c) <= 'r') \
5178 || ('s' <= (c) && (c) <= 'z'))
5179# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5180#endif
5181
5182#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5183int
5184main ()
5185{
5186 int i;
5187 for (i = 0; i < 256; i++)
5188 if (XOR (islower (i), ISLOWER (i))
5189 || toupper (i) != TOUPPER (i))
5190 return 2;
5191 return 0;
5192}
5193_ACEOF
5194if ac_fn_c_try_run "$LINENO"; then :
5195
5196else
5197 ac_cv_header_stdc=no
5198fi
5199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5200 conftest.$ac_objext conftest.beam conftest.$ac_ext
5201fi
5202
5203fi
5204fi
5205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5206$as_echo "$ac_cv_header_stdc" >&6; }
5207if test $ac_cv_header_stdc = yes; then
5208
5209$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5210
5211fi
5212
5213# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5214for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5215 inttypes.h stdint.h unistd.h
5216do :
5217 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5218ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5219"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005220if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005221 cat >>confdefs.h <<_ACEOF
5222#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5223_ACEOF
5224
5225fi
5226
5227done
5228
5229
5230
5231 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 +02005232if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005233 MINIX=yes
5234else
5235 MINIX=
5236fi
5237
5238
5239 if test "$MINIX" = yes; then
5240
5241$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5242
5243
5244$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5245
5246
5247$as_echo "#define _MINIX 1" >>confdefs.h
5248
5249 fi
5250
5251
5252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5253$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005254if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005255 $as_echo_n "(cached) " >&6
5256else
5257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5258/* end confdefs.h. */
5259
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005260# define __EXTENSIONS__ 1
5261 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005262int
5263main ()
5264{
5265
5266 ;
5267 return 0;
5268}
5269_ACEOF
5270if ac_fn_c_try_compile "$LINENO"; then :
5271 ac_cv_safe_to_define___extensions__=yes
5272else
5273 ac_cv_safe_to_define___extensions__=no
5274fi
5275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5276fi
5277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5278$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5279 test $ac_cv_safe_to_define___extensions__ = yes &&
5280 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5281
5282 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5283
5284 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5285
5286 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5287
5288 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5289
5290
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005291
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005292# Check for unsupported systems
5293case $ac_sys_system/$ac_sys_release in
5294atheos*|Linux*/1*)
5295 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5296 echo See README for details.
5297 exit 1;;
5298esac
5299
5300
Matthias Kloseb9621712010-04-24 17:59:49 +00005301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5302$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005303
5304# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005305if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005306 withval=$with_suffix;
5307 case $withval in
5308 no) EXEEXT=;;
5309 yes) EXEEXT=.exe;;
5310 *) EXEEXT=$withval;;
5311 esac
5312fi
5313
Matthias Kloseb9621712010-04-24 17:59:49 +00005314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5315$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005316
5317# Test whether we're running on a non-case-sensitive system, in which
5318# case we give a warning if no ext is given
5319
Matthias Kloseb9621712010-04-24 17:59:49 +00005320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5321$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322if test ! -d CaseSensitiveTestDir; then
5323mkdir CaseSensitiveTestDir
5324fi
5325
5326if test -d casesensitivetestdir
5327then
Matthias Kloseb9621712010-04-24 17:59:49 +00005328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5329$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005330 BUILDEXEEXT=.exe
5331else
Matthias Kloseb9621712010-04-24 17:59:49 +00005332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5333$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334 BUILDEXEEXT=$EXEEXT
5335fi
5336rmdir CaseSensitiveTestDir
5337
5338case $MACHDEP in
5339bsdos*)
5340 case $CC in
5341 gcc) CC="$CC -D_HAVE_BSDI";;
5342 esac;;
5343esac
5344
5345case $ac_sys_system in
5346hp*|HP*)
5347 case $CC in
5348 cc|*/cc) CC="$CC -Ae";;
5349 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005350esac
5351
5352
5353
Matthias Kloseb9621712010-04-24 17:59:49 +00005354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5355$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005356if test -z "$LIBRARY"
5357then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005358 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5361$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363# LDLIBRARY is the name of the library to link against (as opposed to the
5364# name of the library into which to insert object files). BLDLIBRARY is also
5365# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5366# is blank as the main program is not linked directly against LDLIBRARY.
5367# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5368# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5369# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5370# DLLLIBRARY is the shared (i.e., DLL) library.
5371#
5372# RUNSHARED is used to run shared python without installed libraries
5373#
5374# INSTSONAME is the name of the shared library that will be use to install
5375# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005376#
5377# LDVERSION is the shared library version number, normally the Python version
5378# with the ABI build flags appended.
5379
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380
5381
5382
5383
5384
5385
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005386
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005387LDLIBRARY="$LIBRARY"
5388BLDLIBRARY='$(LDLIBRARY)'
5389INSTSONAME='$(LDLIBRARY)'
5390DLLLIBRARY=''
5391LDLIBRARYDIR=''
5392RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005393LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005394
5395# LINKCC is the command that links the python executable -- default is $(CC).
5396# If CXX is set, and if it is needed to link a main function that was
5397# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5398# python might then depend on the C++ runtime
5399# This is altered for AIX in order to build the export list before
5400# linking.
5401
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5403$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404if test -z "$LINKCC"
5405then
5406 LINKCC='$(PURIFY) $(MAINCC)'
5407 case $ac_sys_system in
5408 AIX*)
5409 exp_extra="\"\""
5410 if test $ac_sys_release -ge 5 -o \
5411 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5412 exp_extra="."
5413 fi
5414 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415 QNX*)
5416 # qcc must be used because the other compilers do not
5417 # support -N.
5418 LINKCC=qcc;;
5419 esac
5420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5422$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005423
5424# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5425# make sure we default having it set to "no": this is used by
5426# distutils.unixccompiler to know if it should add --enable-new-dtags
5427# to linker command lines, and failing to detect GNU ld simply results
5428# in the same bahaviour as before.
5429
Matthias Kloseb9621712010-04-24 17:59:49 +00005430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5431$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432ac_prog=ld
5433if test "$GCC" = yes; then
5434 ac_prog=`$CC -print-prog-name=ld`
5435fi
5436case `"$ac_prog" -V 2>&1 < /dev/null` in
5437 *GNU*)
5438 GNULD=yes;;
5439 *)
5440 GNULD=no;;
5441esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5443$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5446$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005447if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005448 $as_echo_n "(cached) " >&6
5449else
5450 ac_cv_c_inline=no
5451for ac_kw in inline __inline__ __inline; do
5452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5453/* end confdefs.h. */
5454#ifndef __cplusplus
5455typedef int foo_t;
5456static $ac_kw foo_t static_foo () {return 0; }
5457$ac_kw foo_t foo () {return 0; }
5458#endif
5459
5460_ACEOF
5461if ac_fn_c_try_compile "$LINENO"; then :
5462 ac_cv_c_inline=$ac_kw
5463fi
5464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5465 test "$ac_cv_c_inline" != no && break
5466done
5467
5468fi
5469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5470$as_echo "$ac_cv_c_inline" >&6; }
5471
5472case $ac_cv_c_inline in
5473 inline | yes) ;;
5474 *)
5475 case $ac_cv_c_inline in
5476 no) ac_val=;;
5477 *) ac_val=$ac_cv_c_inline;;
5478 esac
5479 cat >>confdefs.h <<_ACEOF
5480#ifndef __cplusplus
5481#define inline $ac_val
5482#endif
5483_ACEOF
5484 ;;
5485esac
5486
5487if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005488
5489$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005490
5491
5492fi
5493
5494
Matthias Kloseb9621712010-04-24 17:59:49 +00005495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5496$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005497# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005498if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499 enableval=$enable_shared;
5500fi
5501
5502
5503if test -z "$enable_shared"
5504then
5505 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005506 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507 enable_shared="yes";;
5508 *)
5509 enable_shared="no";;
5510 esac
5511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5513$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514
Matthias Kloseb9621712010-04-24 17:59:49 +00005515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5516$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005518if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005519 enableval=$enable_profiling;
5520fi
5521
5522if test "x$enable_profiling" = xyes; then
5523 ac_save_cc="$CC"
5524 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526/* end confdefs.h. */
5527int main() { return 0; }
5528_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005529if ac_fn_c_try_link "$LINENO"; then :
5530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005531else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005532 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005534rm -f core conftest.err conftest.$ac_objext \
5535 conftest$ac_exeext conftest.$ac_ext
5536 CC="$ac_save_cc"
5537else
5538 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5541$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005542
doko@ubuntu.comba015832012-06-30 16:52:05 +02005543if test "x$enable_profiling" = xyes; then
5544 BASECFLAGS="-pg $BASECFLAGS"
5545 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546fi
5547
Matthias Kloseb9621712010-04-24 17:59:49 +00005548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5549$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550
5551# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5552# library that we build, but we do not want to link against it (we
5553# will find it with a -framework option). For this reason there is an
5554# extra variable BLDLIBRARY against which Python and the extension
5555# modules are linked, BLDLIBRARY. This is normally the same as
5556# LDLIBRARY, but empty for MacOSX framework builds.
5557if test "$enable_framework"
5558then
5559 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5560 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5561 BLDLIBRARY=''
5562else
5563 BLDLIBRARY='$(LDLIBRARY)'
5564fi
5565
5566# Other platforms follow
5567if test $enable_shared = "yes"; then
5568
Matthias Kloseb9621712010-04-24 17:59:49 +00005569$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570
5571 case $ac_sys_system in
5572 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005573 LDLIBRARY='libpython$(LDVERSION).dll.a'
5574 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575 ;;
5576 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005577 LDLIBRARY='libpython$(LDVERSION).so'
5578 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5580 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005581 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005582 then
5583 PY3LIBRARY=libpython3.so
5584 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005586 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005587 LDLIBRARY='libpython$(LDVERSION).so'
5588 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5590 case $ac_sys_system in
5591 FreeBSD*)
5592 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5593 ;;
5594 esac
5595 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005596 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005597 then
5598 PY3LIBRARY=libpython3.so
5599 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005600 ;;
5601 hp*|HP*)
5602 case `uname -m` in
5603 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005604 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605 ;;
5606 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005607 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608 ;;
5609 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005610 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5612 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005614 LDLIBRARY='libpython$(LDVERSION).dylib'
5615 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5617 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005618 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005619 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005620 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5621 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622
5623 esac
5624else # shared is disabled
5625 case $ac_sys_system in
5626 CYGWIN*)
5627 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005628 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629 ;;
5630 esac
5631fi
5632
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005633if test "$cross_compiling" = yes; then
5634 RUNSHARED=
5635fi
5636
Matthias Kloseb9621712010-04-24 17:59:49 +00005637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5638$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639
5640if test -n "$ac_tool_prefix"; then
5641 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5642set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5644$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005645if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005646 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647else
5648 if test -n "$RANLIB"; then
5649 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5650else
5651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5652for as_dir in $PATH
5653do
5654 IFS=$as_save_IFS
5655 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005656 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005659 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 break 2
5661 fi
5662done
Matthias Kloseb9621712010-04-24 17:59:49 +00005663 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664IFS=$as_save_IFS
5665
5666fi
5667fi
5668RANLIB=$ac_cv_prog_RANLIB
5669if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5671$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672else
Matthias Kloseb9621712010-04-24 17:59:49 +00005673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5674$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675fi
5676
5677
5678fi
5679if test -z "$ac_cv_prog_RANLIB"; then
5680 ac_ct_RANLIB=$RANLIB
5681 # Extract the first word of "ranlib", so it can be a program name with args.
5682set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5684$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005685if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005686 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687else
5688 if test -n "$ac_ct_RANLIB"; then
5689 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5690else
5691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5692for as_dir in $PATH
5693do
5694 IFS=$as_save_IFS
5695 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005699 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700 break 2
5701 fi
5702done
Matthias Kloseb9621712010-04-24 17:59:49 +00005703 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704IFS=$as_save_IFS
5705
5706fi
5707fi
5708ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5709if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5711$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712else
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5714$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715fi
5716
5717 if test "x$ac_ct_RANLIB" = x; then
5718 RANLIB=":"
5719 else
5720 case $cross_compiling:$ac_tool_warned in
5721yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005722{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5723$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724ac_tool_warned=yes ;;
5725esac
5726 RANLIB=$ac_ct_RANLIB
5727 fi
5728else
5729 RANLIB="$ac_cv_prog_RANLIB"
5730fi
5731
5732
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005733if test -n "$ac_tool_prefix"; then
5734 for ac_prog in ar aal
5735 do
5736 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5737set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5739$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005740if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742else
5743 if test -n "$AR"; then
5744 ac_cv_prog_AR="$AR" # Let the user override the test.
5745else
5746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5747for as_dir in $PATH
5748do
5749 IFS=$as_save_IFS
5750 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005751 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005753 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755 break 2
5756 fi
5757done
Matthias Kloseb9621712010-04-24 17:59:49 +00005758 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759IFS=$as_save_IFS
5760
5761fi
5762fi
5763AR=$ac_cv_prog_AR
5764if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5766$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767else
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5769$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770fi
5771
5772
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005773 test -n "$AR" && break
5774 done
5775fi
5776if test -z "$AR"; then
5777 ac_ct_AR=$AR
5778 for ac_prog in ar aal
5779do
5780 # Extract the first word of "$ac_prog", so it can be a program name with args.
5781set dummy $ac_prog; ac_word=$2
5782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5783$as_echo_n "checking for $ac_word... " >&6; }
5784if ${ac_cv_prog_ac_ct_AR+:} false; then :
5785 $as_echo_n "(cached) " >&6
5786else
5787 if test -n "$ac_ct_AR"; then
5788 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5789else
5790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793 IFS=$as_save_IFS
5794 test -z "$as_dir" && as_dir=.
5795 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005797 ac_cv_prog_ac_ct_AR="$ac_prog"
5798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799 break 2
5800 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005802 done
5803IFS=$as_save_IFS
5804
5805fi
5806fi
5807ac_ct_AR=$ac_cv_prog_ac_ct_AR
5808if test -n "$ac_ct_AR"; then
5809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5810$as_echo "$ac_ct_AR" >&6; }
5811else
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5813$as_echo "no" >&6; }
5814fi
5815
5816
5817 test -n "$ac_ct_AR" && break
5818done
5819
5820 if test "x$ac_ct_AR" = x; then
5821 AR="ar"
5822 else
5823 case $cross_compiling:$ac_tool_warned in
5824yes:)
5825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5827ac_tool_warned=yes ;;
5828esac
5829 AR=$ac_ct_AR
5830 fi
5831fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832
5833
5834# tweak ARFLAGS only if the user didn't set it on the command line
5835
5836if test -z "$ARFLAGS"
5837then
5838 ARFLAGS="rc"
5839fi
5840
doko@ubuntu.com58844492012-06-30 18:25:32 +02005841if test -n "$ac_tool_prefix"; then
5842 for ac_prog in readelf
5843 do
5844 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5845set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5847$as_echo_n "checking for $ac_word... " >&6; }
5848if ${ac_cv_prog_READELF+:} false; then :
5849 $as_echo_n "(cached) " >&6
5850else
5851 if test -n "$READELF"; then
5852 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5853else
5854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5855for as_dir in $PATH
5856do
5857 IFS=$as_save_IFS
5858 test -z "$as_dir" && as_dir=.
5859 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005861 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5862 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5863 break 2
5864 fi
5865done
5866 done
5867IFS=$as_save_IFS
5868
5869fi
5870fi
5871READELF=$ac_cv_prog_READELF
5872if test -n "$READELF"; then
5873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5874$as_echo "$READELF" >&6; }
5875else
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5877$as_echo "no" >&6; }
5878fi
5879
5880
5881 test -n "$READELF" && break
5882 done
5883fi
5884if test -z "$READELF"; then
5885 ac_ct_READELF=$READELF
5886 for ac_prog in readelf
5887do
5888 # Extract the first word of "$ac_prog", so it can be a program name with args.
5889set dummy $ac_prog; ac_word=$2
5890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5891$as_echo_n "checking for $ac_word... " >&6; }
5892if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5893 $as_echo_n "(cached) " >&6
5894else
5895 if test -n "$ac_ct_READELF"; then
5896 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5897else
5898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5899for as_dir in $PATH
5900do
5901 IFS=$as_save_IFS
5902 test -z "$as_dir" && as_dir=.
5903 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005905 ac_cv_prog_ac_ct_READELF="$ac_prog"
5906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5907 break 2
5908 fi
5909done
5910 done
5911IFS=$as_save_IFS
5912
5913fi
5914fi
5915ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5916if test -n "$ac_ct_READELF"; then
5917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5918$as_echo "$ac_ct_READELF" >&6; }
5919else
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5921$as_echo "no" >&6; }
5922fi
5923
5924
5925 test -n "$ac_ct_READELF" && break
5926done
5927
5928 if test "x$ac_ct_READELF" = x; then
5929 READELF=":"
5930 else
5931 case $cross_compiling:$ac_tool_warned in
5932yes:)
5933{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5934$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5935ac_tool_warned=yes ;;
5936esac
5937 READELF=$ac_ct_READELF
5938 fi
5939fi
5940
5941if test "$cross_compiling" = yes; then
5942 case "$READELF" in
5943 readelf|:)
5944 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5945 ;;
5946 esac
5947fi
5948
5949
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950
Matthias Klosec4c48422012-10-21 23:05:35 +02005951for ac_prog in python$PACKAGE_VERSION python3 python
5952do
5953 # Extract the first word of "$ac_prog", so it can be a program name with args.
5954set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5956$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005957if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005958 $as_echo_n "(cached) " >&6
5959else
Matthias Klosec4c48422012-10-21 23:05:35 +02005960 if test -n "$PYTHON"; then
5961 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005962else
5963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5964for as_dir in $PATH
5965do
5966 IFS=$as_save_IFS
5967 test -z "$as_dir" && as_dir=.
5968 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005969 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005970 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5972 break 2
5973 fi
5974done
5975 done
5976IFS=$as_save_IFS
5977
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005978fi
5979fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005980PYTHON=$ac_cv_prog_PYTHON
5981if test -n "$PYTHON"; then
5982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5983$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005984else
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986$as_echo "no" >&6; }
5987fi
5988
5989
Matthias Klosec4c48422012-10-21 23:05:35 +02005990 test -n "$PYTHON" && break
5991done
5992test -n "$PYTHON" || PYTHON="not-found"
5993
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005994if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005995 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
5996else
5997 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005998fi
5999
6000
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001case $MACHDEP in
6002bsdos*|hp*|HP*)
6003 # install -d does not work on BSDI or HP-UX
6004 if test -z "$INSTALL"
6005 then
6006 INSTALL="${srcdir}/install-sh -c"
6007 fi
6008esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009# Find a good install program. We prefer a C program (faster),
6010# so one script is as good as another. But avoid the broken or
6011# incompatible versions:
6012# SysV /etc/install, /usr/sbin/install
6013# SunOS /usr/etc/install
6014# IRIX /sbin/install
6015# AIX /bin/install
6016# AmigaOS /C/install, which installs bootblocks on floppy discs
6017# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6018# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6019# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6020# OS/2's system install, which has a completely different semantic
6021# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006022# Reject install programs that cannot install multiple files.
6023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6024$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006026if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006027 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028else
6029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6030for as_dir in $PATH
6031do
6032 IFS=$as_save_IFS
6033 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 # Account for people who put trailing slashes in PATH elements.
6035case $as_dir/ in #((
6036 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039 /usr/ucb/* ) ;;
6040 *)
6041 # OSF1 and SCO ODT 3.0 have their own names for install.
6042 # Don't use installbsd from OSF since it installs stuff as root
6043 # by default.
6044 for ac_prog in ginstall scoinst install; do
6045 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006046 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047 if test $ac_prog = install &&
6048 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6049 # AIX install. It has an incompatible calling convention.
6050 :
6051 elif test $ac_prog = install &&
6052 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6053 # program-specific install script used by HP pwplus--don't use.
6054 :
6055 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 rm -rf conftest.one conftest.two conftest.dir
6057 echo one > conftest.one
6058 echo two > conftest.two
6059 mkdir conftest.dir
6060 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6061 test -s conftest.one && test -s conftest.two &&
6062 test -s conftest.dir/conftest.one &&
6063 test -s conftest.dir/conftest.two
6064 then
6065 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6066 break 3
6067 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068 fi
6069 fi
6070 done
6071 done
6072 ;;
6073esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006074
6075 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076IFS=$as_save_IFS
6077
Matthias Kloseb9621712010-04-24 17:59:49 +00006078rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079
6080fi
6081 if test "${ac_cv_path_install+set}" = set; then
6082 INSTALL=$ac_cv_path_install
6083 else
6084 # As a last resort, use the slow shell script. Don't cache a
6085 # value for INSTALL within a source directory, because that will
6086 # break other packages using the cache if that directory is
6087 # removed, or if the value is a relative name.
6088 INSTALL=$ac_install_sh
6089 fi
6090fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6092$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093
6094# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6095# It thinks the first close brace ends the variable substitution.
6096test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6097
6098test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6099
6100test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6101
Matthias Klose93a0ef12012-03-15 18:08:34 +01006102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6103$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6104if test -z "$MKDIR_P"; then
6105 if ${ac_cv_path_mkdir+:} false; then :
6106 $as_echo_n "(cached) " >&6
6107else
6108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6109for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6110do
6111 IFS=$as_save_IFS
6112 test -z "$as_dir" && as_dir=.
6113 for ac_prog in mkdir gmkdir; do
6114 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006115 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006116 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6117 'mkdir (GNU coreutils) '* | \
6118 'mkdir (coreutils) '* | \
6119 'mkdir (fileutils) '4.1*)
6120 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6121 break 3;;
6122 esac
6123 done
6124 done
6125 done
6126IFS=$as_save_IFS
6127
6128fi
6129
6130 test -d ./--version && rmdir ./--version
6131 if test "${ac_cv_path_mkdir+set}" = set; then
6132 MKDIR_P="$ac_cv_path_mkdir -p"
6133 else
6134 # As a last resort, use the slow shell script. Don't cache a
6135 # value for MKDIR_P within a source directory, because that will
6136 # break other packages using the cache if that directory is
6137 # removed, or if the value is a relative name.
6138 MKDIR_P="$ac_install_sh -d"
6139 fi
6140fi
6141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6142$as_echo "$MKDIR_P" >&6; }
6143
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144
6145# Not every filesystem supports hard links
6146
6147if test -z "$LN" ; then
6148 case $ac_sys_system in
6149 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006150 *) LN=ln;;
6151 esac
6152fi
6153
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006154# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006155
6156ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006157
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6160$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161
6162# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006163if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164 withval=$with_pydebug;
6165if test "$withval" != no
6166then
6167
Matthias Kloseb9621712010-04-24 17:59:49 +00006168$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169
Matthias Kloseb9621712010-04-24 17:59:49 +00006170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6171$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006173 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006174else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6175$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176fi
6177else
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6179$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180fi
6181
6182
6183# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6184# merged with this chunk of code?
6185
6186# Optimizer/debugger flags
6187# ------------------------
6188# (The following bit of code is complicated enough - please keep things
6189# indented properly. Just pretend you're editing Python code. ;-)
6190
6191# There are two parallel sets of case statements below, one that checks to
6192# see if OPT was set and one that does BASECFLAGS setting based upon
6193# compiler and platform. BASECFLAGS tweaks need to be made even if the
6194# user set OPT.
6195
6196# tweak OPT based on compiler and platform, only if the user didn't set
6197# it on the command line
6198
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006199if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200then
6201 case $GCC in
6202 yes)
6203 if test "$CC" != 'g++' ; then
6204 STRICT_PROTO="-Wstrict-prototypes"
6205 fi
6206 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6207 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6208 WRAP="-fwrapv"
6209 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006210
6211 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006212 case $CC in
6213 *clang*) WRAP="-fwrapv"
6214 ;;
6215 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006216
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006217 case $ac_cv_prog_cc_g in
6218 yes)
6219 if test "$Py_DEBUG" = 'true' ; then
6220 # Optimization messes up debuggers, so turn it off for
6221 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006222 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223 else
6224 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6225 fi
6226 ;;
6227 *)
6228 OPT="-O3 -Wall $STRICT_PROTO"
6229 ;;
6230 esac
6231 case $ac_sys_system in
6232 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6233 ;;
6234 esac
6235 ;;
6236
6237 *)
6238 OPT="-O"
6239 ;;
6240 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006241fi
6242
6243
6244
6245# The -arch flags for universal builds on OSX
6246UNIVERSAL_ARCH_FLAGS=
6247
6248
6249# tweak BASECFLAGS based on compiler and platform
6250case $GCC in
6251yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006252 # Python doesn't violate C99 aliasing rules, but older versions of
6253 # GCC produce warnings for legal Python code. Enable
6254 # -fno-strict-aliasing on versions of GCC that support but produce
6255 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6257$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006258 ac_save_cc="$CC"
6259 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006260 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006261 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006262 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006263else
Matthias Kloseb9621712010-04-24 17:59:49 +00006264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006265/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006266
Matthias Kloseb159a552010-04-25 21:00:44 +00006267
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006268int
6269main ()
6270{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006271
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006272 ;
6273 return 0;
6274}
Matthias Kloseb159a552010-04-25 21:00:44 +00006275
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006277if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006278
6279 CC="$ac_save_cc -fstrict-aliasing"
6280 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006282/* end confdefs.h. */
6283
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006284 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006285int
6286main ()
6287{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006288double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006289 ;
6290 return 0;
6291}
Matthias Kloseb159a552010-04-25 21:00:44 +00006292
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006294if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006295
6296 ac_cv_no_strict_aliasing=no
6297
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006298else
Matthias Kloseb159a552010-04-25 21:00:44 +00006299
6300 ac_cv_no_strict_aliasing=yes
6301
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006302fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006304
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006305else
Matthias Kloseb159a552010-04-25 21:00:44 +00006306
6307 ac_cv_no_strict_aliasing=no
6308
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006311fi
6312
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006313 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6316$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006317 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318 then
6319 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6320 fi
6321
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6323$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6324 ac_save_cc="$CC"
6325 CC="$CC -Wunused-result -Werror"
6326 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006327 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006328 $as_echo_n "(cached) " >&6
6329else
6330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6331/* end confdefs.h. */
6332
6333
6334int
6335main ()
6336{
6337
6338 ;
6339 return 0;
6340}
6341
6342_ACEOF
6343if ac_fn_c_try_compile "$LINENO"; then :
6344
6345 ac_cv_disable_unused_result_warning=yes
6346
6347else
6348
6349 ac_cv_disable_unused_result_warning=no
6350
6351fi
6352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6353fi
6354
6355 CFLAGS="$save_CFLAGS"
6356 CC="$ac_save_cc"
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6358$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6359
6360 if test $ac_cv_disable_unused_result_warning = yes
6361 then
6362 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6363 fi
6364
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6366 # support. Without this, treatment of subnormals doesn't follow
6367 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006368 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369 alpha*)
6370 BASECFLAGS="$BASECFLAGS -mieee"
6371 ;;
6372 esac
6373
6374 case $ac_sys_system in
6375 SCO_SV*)
6376 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6377 ;;
6378 # is there any other compiler on Darwin besides gcc?
6379 Darwin*)
6380 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6381 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006382 if test "${CC}" = gcc
6383 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6385$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006386 case "${UNIVERSALSDK}" in
6387 */MacOSX10.4u.sdk)
6388 # Build using 10.4 SDK, force usage of gcc when the
6389 # compiler is gcc, otherwise the user will get very
6390 # confusing error messages when building on OSX 10.6
6391 CC=gcc-4.0
6392 CPP=cpp-4.0
6393 ;;
6394 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6396$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006397 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006398
6399
6400 if test "${enable_universalsdk}"; then
6401 UNIVERSAL_ARCH_FLAGS=""
6402 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6403 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6404 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006405 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006406 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6407 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006408 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006409 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006410
6411 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6412 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006413 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006414 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006416 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6417 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006418 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006419 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006420
6421 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6422 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006423 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006424 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006425
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006427 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 +00006428
6429 fi
6430
6431
Ronald Oussoren666028b2010-04-18 19:07:43 +00006432 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6433 if test "${UNIVERSALSDK}" != "/"
6434 then
6435 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6436 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006437 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438 fi
6439 fi
6440
6441 # Calculate the right deployment target for this build.
6442 #
6443 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006444 if test ${cur_target} '>' 10.2 && \
6445 test ${cur_target} '<' 10.6
6446 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006448 if test ${enable_universalsdk}; then
6449 if test "${UNIVERSAL_ARCHS}" = "all"; then
6450 # Ensure that the default platform for a
6451 # 4-way universal build is OSX 10.5,
6452 # that's the first OS release where
6453 # 4-way builds make sense.
6454 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006455
6456 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6457 cur_target='10.5'
6458
6459 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6460 cur_target='10.5'
6461
6462 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6463 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006464 fi
6465 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006466 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006467 # On Intel macs default to a deployment
6468 # target of 10.4, that's the first OSX
6469 # release with Intel support.
6470 cur_target="10.4"
6471 fi
6472 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006473 fi
6474 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6475
6476 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6477 # environment with a value that is the same as what we'll use
6478 # in the Makefile to ensure that we'll get the same compiler
6479 # environment during configure and build time.
6480 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6481 export MACOSX_DEPLOYMENT_TARGET
6482 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6483
6484 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006485 esac
6486 ;;
6487
6488*)
6489 case $ac_sys_system in
6490 OpenUNIX*|UnixWare*)
6491 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6492 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006493 SCO_SV*)
6494 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6495 ;;
6496 esac
6497 ;;
6498esac
6499
6500if test "$Py_DEBUG" = 'true'; then
6501 :
6502else
6503 OPT="-DNDEBUG $OPT"
6504fi
6505
6506if test "$ac_arch_flags"
6507then
6508 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6509fi
6510
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006511# Check whether GCC supports PyArg_ParseTuple format
6512if test "$GCC" = "yes"
6513then
Matthias Kloseb9621712010-04-24 17:59:49 +00006514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6515$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006516 save_CFLAGS=$CFLAGS
6517 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006519/* end confdefs.h. */
6520
6521 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006522int
6523main ()
6524{
6525
6526 ;
6527 return 0;
6528}
Matthias Kloseb159a552010-04-25 21:00:44 +00006529
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006531if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532
Matthias Kloseb159a552010-04-25 21:00:44 +00006533
Matthias Kloseb9621712010-04-24 17:59:49 +00006534$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006535
Matthias Kloseb159a552010-04-25 21:00:44 +00006536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006537$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006538
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006539else
Matthias Kloseb159a552010-04-25 21:00:44 +00006540
6541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006542$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006543
6544fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6546 CFLAGS=$save_CFLAGS
6547fi
6548
6549# On some compilers, pthreads are available without further options
6550# (e.g. MacOS X). On some of these systems, the compiler will not
6551# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6552# So we have to see first whether pthreads are available without
6553# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6555$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006556if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006557 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006558else
Matthias Kloseb9621712010-04-24 17:59:49 +00006559 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006560 ac_cv_pthread_is_default=no
6561else
Matthias Kloseb9621712010-04-24 17:59:49 +00006562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006563/* end confdefs.h. */
6564
6565#include <pthread.h>
6566
6567void* routine(void* p){return NULL;}
6568
6569int main(){
6570 pthread_t p;
6571 if(pthread_create(&p,NULL,routine,NULL)!=0)
6572 return 1;
6573 (void)pthread_detach(p);
6574 return 0;
6575}
6576
6577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006578if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006579
6580 ac_cv_pthread_is_default=yes
6581 ac_cv_kthread=no
6582 ac_cv_pthread=no
6583
6584else
Matthias Kloseb9621712010-04-24 17:59:49 +00006585 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6588 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006589fi
6590
6591
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006592fi
6593
Matthias Kloseb9621712010-04-24 17:59:49 +00006594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6595$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006596
6597
6598if test $ac_cv_pthread_is_default = yes
6599then
6600 ac_cv_kpthread=no
6601else
6602# -Kpthread, if available, provides the right #defines
6603# and linker options to make pthread_create available
6604# Some compilers won't report that they do not support -Kpthread,
6605# so we need to run a program to see whether it really made the
6606# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6608$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006609if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006610 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006611else
6612 ac_save_cc="$CC"
6613CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006614if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006615 ac_cv_kpthread=no
6616else
Matthias Kloseb9621712010-04-24 17:59:49 +00006617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006618/* end confdefs.h. */
6619
6620#include <pthread.h>
6621
6622void* routine(void* p){return NULL;}
6623
6624int main(){
6625 pthread_t p;
6626 if(pthread_create(&p,NULL,routine,NULL)!=0)
6627 return 1;
6628 (void)pthread_detach(p);
6629 return 0;
6630}
6631
6632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006633if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006634 ac_cv_kpthread=yes
6635else
Matthias Kloseb9621712010-04-24 17:59:49 +00006636 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6639 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640fi
6641
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006642CC="$ac_save_cc"
6643fi
6644
Matthias Kloseb9621712010-04-24 17:59:49 +00006645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6646$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006647fi
6648
6649if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6650then
6651# -Kthread, if available, provides the right #defines
6652# and linker options to make pthread_create available
6653# Some compilers won't report that they do not support -Kthread,
6654# so we need to run a program to see whether it really made the
6655# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6657$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006658if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006659 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006660else
6661 ac_save_cc="$CC"
6662CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006663if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006664 ac_cv_kthread=no
6665else
Matthias Kloseb9621712010-04-24 17:59:49 +00006666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006667/* end confdefs.h. */
6668
6669#include <pthread.h>
6670
6671void* routine(void* p){return NULL;}
6672
6673int main(){
6674 pthread_t p;
6675 if(pthread_create(&p,NULL,routine,NULL)!=0)
6676 return 1;
6677 (void)pthread_detach(p);
6678 return 0;
6679}
6680
6681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006682if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006683 ac_cv_kthread=yes
6684else
Matthias Kloseb9621712010-04-24 17:59:49 +00006685 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006689fi
6690
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691CC="$ac_save_cc"
6692fi
6693
Matthias Kloseb9621712010-04-24 17:59:49 +00006694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6695$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006696fi
6697
6698if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6699then
6700# -pthread, if available, provides the right #defines
6701# and linker options to make pthread_create available
6702# Some compilers won't report that they do not support -pthread,
6703# so we need to run a program to see whether it really made the
6704# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6706$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006707if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006708 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709else
6710 ac_save_cc="$CC"
6711CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006712if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006713 ac_cv_pthread=no
6714else
Matthias Kloseb9621712010-04-24 17:59:49 +00006715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716/* end confdefs.h. */
6717
6718#include <pthread.h>
6719
6720void* routine(void* p){return NULL;}
6721
6722int main(){
6723 pthread_t p;
6724 if(pthread_create(&p,NULL,routine,NULL)!=0)
6725 return 1;
6726 (void)pthread_detach(p);
6727 return 0;
6728}
6729
6730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006731if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006732 ac_cv_pthread=yes
6733else
Matthias Kloseb9621712010-04-24 17:59:49 +00006734 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6737 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738fi
6739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740CC="$ac_save_cc"
6741fi
6742
Matthias Kloseb9621712010-04-24 17:59:49 +00006743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6744$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006745fi
6746
6747# If we have set a CC compiler flag for thread support then
6748# check if it works for CXX, too.
6749ac_cv_cxx_thread=no
6750if test ! -z "$CXX"
6751then
Matthias Kloseb9621712010-04-24 17:59:49 +00006752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6753$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006754ac_save_cxx="$CXX"
6755
6756if test "$ac_cv_kpthread" = "yes"
6757then
6758 CXX="$CXX -Kpthread"
6759 ac_cv_cxx_thread=yes
6760elif test "$ac_cv_kthread" = "yes"
6761then
6762 CXX="$CXX -Kthread"
6763 ac_cv_cxx_thread=yes
6764elif test "$ac_cv_pthread" = "yes"
6765then
6766 CXX="$CXX -pthread"
6767 ac_cv_cxx_thread=yes
6768fi
6769
6770if test $ac_cv_cxx_thread = yes
6771then
6772 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6773 $CXX -c conftest.$ac_ext 2>&5
6774 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6775 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6776 then
6777 ac_cv_cxx_thread=yes
6778 else
6779 ac_cv_cxx_thread=no
6780 fi
6781 rm -fr conftest*
6782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6784$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006785fi
6786CXX="$ac_save_cxx"
6787
6788
6789# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6791$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006792if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006793 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006794else
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796/* end confdefs.h. */
6797#include <stdlib.h>
6798#include <stdarg.h>
6799#include <string.h>
6800#include <float.h>
6801
6802int
6803main ()
6804{
6805
6806 ;
6807 return 0;
6808}
6809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006810if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006811 ac_cv_header_stdc=yes
6812else
Matthias Kloseb9621712010-04-24 17:59:49 +00006813 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006814fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6816
6817if test $ac_cv_header_stdc = yes; then
6818 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006820/* end confdefs.h. */
6821#include <string.h>
6822
6823_ACEOF
6824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 $EGREP "memchr" >/dev/null 2>&1; then :
6826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827else
6828 ac_cv_header_stdc=no
6829fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006830rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831
6832fi
6833
6834if test $ac_cv_header_stdc = yes; then
6835 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837/* end confdefs.h. */
6838#include <stdlib.h>
6839
6840_ACEOF
6841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006842 $EGREP "free" >/dev/null 2>&1; then :
6843
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006844else
6845 ac_cv_header_stdc=no
6846fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006847rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006848
6849fi
6850
6851if test $ac_cv_header_stdc = yes; then
6852 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006853 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854 :
6855else
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857/* end confdefs.h. */
6858#include <ctype.h>
6859#include <stdlib.h>
6860#if ((' ' & 0x0FF) == 0x020)
6861# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6862# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6863#else
6864# define ISLOWER(c) \
6865 (('a' <= (c) && (c) <= 'i') \
6866 || ('j' <= (c) && (c) <= 'r') \
6867 || ('s' <= (c) && (c) <= 'z'))
6868# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6869#endif
6870
6871#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6872int
6873main ()
6874{
6875 int i;
6876 for (i = 0; i < 256; i++)
6877 if (XOR (islower (i), ISLOWER (i))
6878 || toupper (i) != TOUPPER (i))
6879 return 2;
6880 return 0;
6881}
6882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006883if ac_fn_c_try_run "$LINENO"; then :
6884
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885else
Matthias Kloseb9621712010-04-24 17:59:49 +00006886 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006888rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6889 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006890fi
6891
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892fi
6893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6895$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896if test $ac_cv_header_stdc = yes; then
6897
Matthias Kloseb9621712010-04-24 17:59:49 +00006898$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006899
6900fi
6901
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006902ac_save_cppflags="$CPPFLAGS"
6903CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006904for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006905fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006906ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006907sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006908unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006909poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006910sys/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 +01006911sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006912sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006913sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006914sys/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 -07006915libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006916bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006917do :
6918 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6919ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006920if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006921 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006922#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006923_ACEOF
6924
6925fi
6926
Guido van Rossum627b2d71993-12-24 10:39:16 +00006927done
6928
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006929CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006930ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006931for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6934$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006935if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006936 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006937else
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006939/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006940#include <sys/types.h>
6941#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006942
Martin v. Löwis11437992002-04-12 09:54:03 +00006943int
6944main ()
6945{
6946if ((DIR *) 0)
6947return 0;
6948 ;
6949 return 0;
6950}
6951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006952if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006953 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006954else
Matthias Kloseb9621712010-04-24 17:59:49 +00006955 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006959eval ac_res=\$$as_ac_Header
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6961$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006962if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006963 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006964#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006965_ACEOF
6966
6967ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006968fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006969
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006970done
6971# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6972if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6974$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006975if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006976 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006977else
Martin v. Löwis11437992002-04-12 09:54:03 +00006978 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006982/* Override any GCC internal prototype to avoid an error.
6983 Use char because int might match the return type of a GCC
6984 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006985#ifdef __cplusplus
6986extern "C"
6987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006988char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006989int
6990main ()
6991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006992return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006993 ;
6994 return 0;
6995}
6996_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006997for ac_lib in '' dir; do
6998 if test -z "$ac_lib"; then
6999 ac_res="none required"
7000 else
7001 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007002 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007003 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007004 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007005 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007007rm -f core conftest.err conftest.$ac_objext \
7008 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007009 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007010 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007012done
Victor Stinnere0be4232011-10-25 13:06:09 +02007013if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007014
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015else
7016 ac_cv_search_opendir=no
7017fi
7018rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007019LIBS=$ac_func_search_save_LIBS
7020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7022$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007023ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007024if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007025 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007026
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007027fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007028
Michael W. Hudson54241132001-12-07 15:38:26 +00007029else
Matthias Kloseb9621712010-04-24 17:59:49 +00007030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7031$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007032if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007033 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007034else
7035 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007037/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007039/* Override any GCC internal prototype to avoid an error.
7040 Use char because int might match the return type of a GCC
7041 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007042#ifdef __cplusplus
7043extern "C"
7044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007045char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007046int
7047main ()
7048{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007049return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007050 ;
7051 return 0;
7052}
7053_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007054for ac_lib in '' x; do
7055 if test -z "$ac_lib"; then
7056 ac_res="none required"
7057 else
7058 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007059 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007060 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007061 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007062 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007064rm -f core conftest.err conftest.$ac_objext \
7065 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007066 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007067 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007069done
Victor Stinnere0be4232011-10-25 13:06:09 +02007070if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007072else
7073 ac_cv_search_opendir=no
7074fi
7075rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007076LIBS=$ac_func_search_save_LIBS
7077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7079$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007080ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007081if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007084fi
7085
7086fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007087
Matthias Kloseb9621712010-04-24 17:59:49 +00007088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7089$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007090if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007091 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007092else
Matthias Kloseb9621712010-04-24 17:59:49 +00007093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007094/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007095#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007096int
7097main ()
7098{
7099return makedev(0, 0);
7100 ;
7101 return 0;
7102}
7103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007104if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007105 ac_cv_header_sys_types_h_makedev=yes
7106else
Matthias Kloseb9621712010-04-24 17:59:49 +00007107 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007108fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007109rm -f core conftest.err conftest.$ac_objext \
7110 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007111
7112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7114$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007115
7116if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007117ac_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 +02007118if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007119
Matthias Kloseb9621712010-04-24 17:59:49 +00007120$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007121
7122fi
7123
7124
7125
7126 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007127 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 +02007128if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007129
Matthias Kloseb9621712010-04-24 17:59:49 +00007130$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007131
7132fi
7133
7134
7135 fi
7136fi
7137
Michael W. Hudson54241132001-12-07 15:38:26 +00007138
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007139# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7140for ac_header in net/if.h
7141do :
7142 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7143#ifdef STDC_HEADERS
7144# include <stdlib.h>
7145# include <stddef.h>
7146#else
7147# ifdef HAVE_STDLIB_H
7148# include <stdlib.h>
7149# endif
7150#endif
7151#ifdef HAVE_SYS_SOCKET_H
7152# include <sys/socket.h>
7153#endif
7154
7155"
Victor Stinnere0be4232011-10-25 13:06:09 +02007156if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007157 cat >>confdefs.h <<_ACEOF
7158#define HAVE_NET_IF_H 1
7159_ACEOF
7160
7161fi
7162
7163done
7164
7165
7166
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007167# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007168for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007169do :
7170 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007171#ifdef HAVE_CURSES_H
7172#include <curses.h>
7173#endif
7174
Matthias Kloseb9621712010-04-24 17:59:49 +00007175"
Victor Stinnere0be4232011-10-25 13:06:09 +02007176if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007177 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007178#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007179_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007180
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007181fi
7182
7183done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007184
7185
Martin v. Löwis11017b12006-01-14 18:12:57 +00007186# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007187for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007188do :
7189 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 +00007190#ifdef HAVE_ASM_TYPES_H
7191#include <asm/types.h>
7192#endif
7193#ifdef HAVE_SYS_SOCKET_H
7194#include <sys/socket.h>
7195#endif
7196
Matthias Kloseb9621712010-04-24 17:59:49 +00007197"
Victor Stinnere0be4232011-10-25 13:06:09 +02007198if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007199 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007200#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007201_ACEOF
7202
7203fi
7204
7205done
7206
7207
Charles-François Natali47413c12011-10-06 19:47:44 +02007208# On Linux, can.h and can/raw.h require sys/socket.h
7209for ac_header in linux/can.h linux/can/raw.h
7210do :
7211 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7212ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7213#ifdef HAVE_SYS_SOCKET_H
7214#include <sys/socket.h>
7215#endif
7216
7217"
7218if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7219 cat >>confdefs.h <<_ACEOF
7220#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7221_ACEOF
7222
7223fi
7224
7225done
7226
7227
Guido van Rossum627b2d71993-12-24 10:39:16 +00007228# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007229was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7231$as_echo_n "checking for clock_t in time.h... " >&6; }
7232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007233/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007234#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007235
7236_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007237if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007238 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007239 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007240else
Martin v. Löwis11437992002-04-12 09:54:03 +00007241
7242
Matthias Kloseb9621712010-04-24 17:59:49 +00007243$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007244
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007245
Guido van Rossum627b2d71993-12-24 10:39:16 +00007246fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007247rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007248
Matthias Kloseb9621712010-04-24 17:59:49 +00007249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7250$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007251
Matthias Kloseb9621712010-04-24 17:59:49 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7253$as_echo_n "checking for makedev... " >&6; }
7254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007255/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007256
Jesus Cea740f53a2010-04-28 11:35:30 +00007257#if defined(MAJOR_IN_MKDEV)
7258#include <sys/mkdev.h>
7259#elif defined(MAJOR_IN_SYSMACROS)
7260#include <sys/sysmacros.h>
7261#else
7262#include <sys/types.h>
7263#endif
7264
Neal Norwitz11690112002-07-30 01:08:28 +00007265int
7266main ()
7267{
Jesus Cea740f53a2010-04-28 11:35:30 +00007268
7269 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007270 ;
7271 return 0;
7272}
Matthias Kloseb159a552010-04-25 21:00:44 +00007273
Neal Norwitz11690112002-07-30 01:08:28 +00007274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007275if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007276 ac_cv_has_makedev=yes
7277else
Matthias Kloseb9621712010-04-24 17:59:49 +00007278 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007280rm -f core conftest.err conftest.$ac_objext \
7281 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7283$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007284if test "$ac_cv_has_makedev" = "yes"; then
7285
Matthias Kloseb9621712010-04-24 17:59:49 +00007286$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007287
7288fi
7289
Martin v. Löwis399a6892002-10-04 10:22:02 +00007290# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7291# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7292# defined, but the compiler does not support pragma redefine_extname,
7293# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7294# structures (such as rlimit64) without declaring them. As a
7295# work-around, disable LFS on such configurations
7296
7297use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7299$as_echo_n "checking Solaris LFS bug... " >&6; }
7300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007301/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007302
7303#define _LARGEFILE_SOURCE 1
7304#define _FILE_OFFSET_BITS 64
7305#include <sys/resource.h>
7306
Martin v. Löwis399a6892002-10-04 10:22:02 +00007307int
7308main ()
7309{
7310struct rlimit foo;
7311 ;
7312 return 0;
7313}
7314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007316 sol_lfs_bug=no
7317else
Matthias Kloseb9621712010-04-24 17:59:49 +00007318 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7322$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007323if test "$sol_lfs_bug" = "yes"; then
7324 use_lfs=no
7325fi
7326
7327if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007328# Two defines needed to enable largefile support on various platforms
7329# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007330case $ac_sys_system/$ac_sys_release in
7331AIX*)
7332
7333$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7334
7335 ;;
7336esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007337
Matthias Kloseb9621712010-04-24 17:59:49 +00007338$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007339
7340
Matthias Kloseb9621712010-04-24 17:59:49 +00007341$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007342
Martin v. Löwis399a6892002-10-04 10:22:02 +00007343fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007344
Guido van Rossum84e7b241996-08-19 21:59:00 +00007345# Add some code to confdefs.h so that the test for off_t works on SCO
7346cat >> confdefs.h <<\EOF
7347#if defined(SCO_DS)
7348#undef _OFF_T
7349#endif
7350EOF
7351
Guido van Rossumef2255b2000-03-10 22:30:29 +00007352# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007353ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007354if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007355
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007356else
Martin v. Löwis11437992002-04-12 09:54:03 +00007357
7358cat >>confdefs.h <<_ACEOF
7359#define mode_t int
7360_ACEOF
7361
7362fi
7363
Matthias Kloseb9621712010-04-24 17:59:49 +00007364ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007365if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007366
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007367else
Martin v. Löwis11437992002-04-12 09:54:03 +00007368
7369cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007370#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007371_ACEOF
7372
7373fi
7374
Matthias Kloseb9621712010-04-24 17:59:49 +00007375ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007376if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007377
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007378else
Martin v. Löwis11437992002-04-12 09:54:03 +00007379
7380cat >>confdefs.h <<_ACEOF
7381#define pid_t int
7382_ACEOF
7383
7384fi
7385
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007386
Martin v. Löwis11437992002-04-12 09:54:03 +00007387cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007388#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007389_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007390
Matthias Kloseb9621712010-04-24 17:59:49 +00007391ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007392if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007393
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007394else
Martin v. Löwis11437992002-04-12 09:54:03 +00007395
7396cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007397#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007398_ACEOF
7399
7400fi
7401
Matthias Kloseb9621712010-04-24 17:59:49 +00007402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7403$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007404if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007405 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007406else
Matthias Kloseb9621712010-04-24 17:59:49 +00007407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007408/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007409#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007410
7411_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007413 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007414 ac_cv_type_uid_t=yes
7415else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007416 ac_cv_type_uid_t=no
7417fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007418rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007419
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7422$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007423if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007424
Matthias Kloseb9621712010-04-24 17:59:49 +00007425$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007426
7427
Matthias Kloseb9621712010-04-24 17:59:49 +00007428$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007429
7430fi
7431
Matthias Kloseb9621712010-04-24 17:59:49 +00007432ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7433case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007434 no|yes) ;; #(
7435 *)
7436
Matthias Kloseb9621712010-04-24 17:59:49 +00007437$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007438
7439
7440cat >>confdefs.h <<_ACEOF
7441#define uint32_t $ac_cv_c_uint32_t
7442_ACEOF
7443;;
7444 esac
7445
Matthias Kloseb9621712010-04-24 17:59:49 +00007446ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7447case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007448 no|yes) ;; #(
7449 *)
7450
Matthias Kloseb9621712010-04-24 17:59:49 +00007451$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007452
7453
7454cat >>confdefs.h <<_ACEOF
7455#define uint64_t $ac_cv_c_uint64_t
7456_ACEOF
7457;;
7458 esac
7459
Matthias Kloseb9621712010-04-24 17:59:49 +00007460ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7461case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007462 no|yes) ;; #(
7463 *)
7464
7465cat >>confdefs.h <<_ACEOF
7466#define int32_t $ac_cv_c_int32_t
7467_ACEOF
7468;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007469esac
7470
Matthias Kloseb9621712010-04-24 17:59:49 +00007471ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7472case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007473 no|yes) ;; #(
7474 *)
7475
7476cat >>confdefs.h <<_ACEOF
7477#define int64_t $ac_cv_c_int64_t
7478_ACEOF
7479;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007480esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007481
Matthias Kloseb9621712010-04-24 17:59:49 +00007482ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007483if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007484
Matthias Kloseb9621712010-04-24 17:59:49 +00007485$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007486
7487fi
7488
Stefan Krah1919b7e2012-03-21 18:25:23 +01007489ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7490if test "x$ac_cv_type___uint128_t" = xyes; then :
7491
7492$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7493
7494fi
7495
Jack Jansendd19cf82001-12-06 22:36:17 +00007496
Michael W. Hudson54241132001-12-07 15:38:26 +00007497# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007498# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007499# The cast to long int works around a bug in the HP C Compiler
7500# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7501# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7502# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7504$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007505if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007507else
Matthias Kloseb9621712010-04-24 17:59:49 +00007508 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 +00007509
Martin v. Löwis11437992002-04-12 09:54:03 +00007510else
Matthias Kloseb9621712010-04-24 17:59:49 +00007511 if test "$ac_cv_type_int" = yes; then
7512 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7513$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007514as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007515See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007516 else
7517 ac_cv_sizeof_int=0
7518 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007520
Martin v. Löwis11437992002-04-12 09:54:03 +00007521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7523$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007524
7525
7526
Martin v. Löwis11437992002-04-12 09:54:03 +00007527cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007528#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007529_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007530
7531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007532# The cast to long int works around a bug in the HP C Compiler
7533# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7534# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7535# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7537$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007538if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007539 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007540else
Matthias Kloseb9621712010-04-24 17:59:49 +00007541 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 +00007542
Martin v. Löwis11437992002-04-12 09:54:03 +00007543else
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 if test "$ac_cv_type_long" = yes; then
7545 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7546$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007547as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007548See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007549 else
7550 ac_cv_sizeof_long=0
7551 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007553
Martin v. Löwis11437992002-04-12 09:54:03 +00007554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7556$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007557
7558
7559
Martin v. Löwis11437992002-04-12 09:54:03 +00007560cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007561#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007562_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007563
7564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007565# The cast to long int works around a bug in the HP C Compiler
7566# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7567# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7568# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7570$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007571if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007572 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007573else
Matthias Kloseb9621712010-04-24 17:59:49 +00007574 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 +00007575
Martin v. Löwis11437992002-04-12 09:54:03 +00007576else
Matthias Kloseb9621712010-04-24 17:59:49 +00007577 if test "$ac_cv_type_void_p" = yes; then
7578 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7579$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007580as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007581See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007582 else
7583 ac_cv_sizeof_void_p=0
7584 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007586
Martin v. Löwis11437992002-04-12 09:54:03 +00007587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7589$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007590
7591
7592
Martin v. Löwis11437992002-04-12 09:54:03 +00007593cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007594#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007595_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007596
7597
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007598# The cast to long int works around a bug in the HP C Compiler
7599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7601# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7603$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007604if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007605 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007606else
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 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 +00007608
Martin v. Löwis11437992002-04-12 09:54:03 +00007609else
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 if test "$ac_cv_type_short" = yes; then
7611 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007613as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007614See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615 else
7616 ac_cv_sizeof_short=0
7617 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007619
Martin v. Löwis11437992002-04-12 09:54:03 +00007620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7622$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623
7624
7625
Martin v. Löwis11437992002-04-12 09:54:03 +00007626cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007627#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007628_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007629
7630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007631# The cast to long int works around a bug in the HP C Compiler
7632# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7633# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7634# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7636$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007637if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007638 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007639else
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 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 +00007641
Martin v. Löwis11437992002-04-12 09:54:03 +00007642else
Matthias Kloseb9621712010-04-24 17:59:49 +00007643 if test "$ac_cv_type_float" = yes; then
7644 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007646as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007647See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648 else
7649 ac_cv_sizeof_float=0
7650 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007652
Martin v. Löwis11437992002-04-12 09:54:03 +00007653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7655$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007656
7657
7658
Martin v. Löwis11437992002-04-12 09:54:03 +00007659cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007660#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007661_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007662
7663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664# The cast to long int works around a bug in the HP C Compiler
7665# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7666# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7667# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7669$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007670if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007671 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007672else
Matthias Kloseb9621712010-04-24 17:59:49 +00007673 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 +00007674
Martin v. Löwis11437992002-04-12 09:54:03 +00007675else
Matthias Kloseb9621712010-04-24 17:59:49 +00007676 if test "$ac_cv_type_double" = yes; then
7677 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7678$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007679as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007680See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681 else
7682 ac_cv_sizeof_double=0
7683 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007685
Martin v. Löwis11437992002-04-12 09:54:03 +00007686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7688$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689
7690
7691
Martin v. Löwis11437992002-04-12 09:54:03 +00007692cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007693#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007694_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007695
7696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007697# The cast to long int works around a bug in the HP C Compiler
7698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7700# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7702$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007703if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 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 +00007707
Martin v. Löwis11437992002-04-12 09:54:03 +00007708else
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 if test "$ac_cv_type_fpos_t" = yes; then
7710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007712as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007713See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714 else
7715 ac_cv_sizeof_fpos_t=0
7716 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007718
Martin v. Löwis11437992002-04-12 09:54:03 +00007719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7721$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007722
7723
7724
Martin v. Löwis11437992002-04-12 09:54:03 +00007725cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007726#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007727_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007728
Michael W. Hudson54241132001-12-07 15:38:26 +00007729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007730# The cast to long int works around a bug in the HP C Compiler
7731# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7732# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7733# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7735$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007736if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007737 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007738else
Matthias Kloseb9621712010-04-24 17:59:49 +00007739 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 +00007740
Martin v. Löwis18e16552006-02-15 17:27:45 +00007741else
Matthias Kloseb9621712010-04-24 17:59:49 +00007742 if test "$ac_cv_type_size_t" = yes; then
7743 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007745as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007746See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747 else
7748 ac_cv_sizeof_size_t=0
7749 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007751
Martin v. Löwis18e16552006-02-15 17:27:45 +00007752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7754$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007755
7756
7757
Martin v. Löwis18e16552006-02-15 17:27:45 +00007758cat >>confdefs.h <<_ACEOF
7759#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7760_ACEOF
7761
7762
Christian Heimes400adb02008-02-01 08:12:03 +00007763# The cast to long int works around a bug in the HP C Compiler
7764# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7765# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7766# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7768$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007769if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007770 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007771else
Matthias Kloseb9621712010-04-24 17:59:49 +00007772 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 +00007773
Christian Heimes400adb02008-02-01 08:12:03 +00007774else
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 if test "$ac_cv_type_pid_t" = yes; then
7776 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7777$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007778as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007779See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007780 else
7781 ac_cv_sizeof_pid_t=0
7782 fi
7783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007784
Christian Heimes400adb02008-02-01 08:12:03 +00007785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7787$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007788
7789
7790
7791cat >>confdefs.h <<_ACEOF
7792#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7793_ACEOF
7794
7795
Michael W. Hudson54241132001-12-07 15:38:26 +00007796
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7798$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007799have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007801/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007802
Martin v. Löwis11437992002-04-12 09:54:03 +00007803int
7804main ()
7805{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007806long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 ;
7808 return 0;
7809}
7810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007811if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007812
7813
Matthias Kloseb9621712010-04-24 17:59:49 +00007814$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007815
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007816 have_long_long=yes
7817
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7821$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007822if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823# The cast to long int works around a bug in the HP C Compiler
7824# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7825# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7826# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7828$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007829if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007831else
Matthias Kloseb9621712010-04-24 17:59:49 +00007832 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 +00007833
Martin v. Löwis11437992002-04-12 09:54:03 +00007834else
Matthias Kloseb9621712010-04-24 17:59:49 +00007835 if test "$ac_cv_type_long_long" = yes; then
7836 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007838as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007839See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007840 else
7841 ac_cv_sizeof_long_long=0
7842 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844
Martin v. Löwis11437992002-04-12 09:54:03 +00007845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7847$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007848
7849
7850
Martin v. Löwis11437992002-04-12 09:54:03 +00007851cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007852#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007853_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007854
Michael W. Hudson54241132001-12-07 15:38:26 +00007855
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007856fi
7857
Matthias Kloseb9621712010-04-24 17:59:49 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7859$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007860have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007862/* end confdefs.h. */
7863
7864int
7865main ()
7866{
7867long double x; x = (long double)0;
7868 ;
7869 return 0;
7870}
7871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007872if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007873
7874
Matthias Kloseb9621712010-04-24 17:59:49 +00007875$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007876
7877 have_long_double=yes
7878
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007879fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7882$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007883if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007884# The cast to long int works around a bug in the HP C Compiler
7885# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7886# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7887# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7889$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007890if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007892else
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 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 +00007894
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007895else
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 if test "$ac_cv_type_long_double" = yes; then
7897 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007899as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007900See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007901 else
7902 ac_cv_sizeof_long_double=0
7903 fi
7904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7908$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007909
7910
7911
7912cat >>confdefs.h <<_ACEOF
7913#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7914_ACEOF
7915
7916
7917fi
7918
7919
Matthias Kloseb9621712010-04-24 17:59:49 +00007920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7921$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007922have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007924/* end confdefs.h. */
7925
7926int
7927main ()
7928{
7929_Bool x; x = (_Bool)0;
7930 ;
7931 return 0;
7932}
7933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007934if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007935
7936
Matthias Kloseb9621712010-04-24 17:59:49 +00007937$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007938
7939 have_c99_bool=yes
7940
Thomas Woutersb2137042007-02-01 18:02:27 +00007941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7944$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007945if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946# The cast to long int works around a bug in the HP C Compiler
7947# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7948# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7949# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7951$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007952if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007954else
Matthias Kloseb9621712010-04-24 17:59:49 +00007955 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 +00007956
Thomas Woutersb2137042007-02-01 18:02:27 +00007957else
Matthias Kloseb9621712010-04-24 17:59:49 +00007958 if test "$ac_cv_type__Bool" = yes; then
7959 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7960$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007961as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007962See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963 else
7964 ac_cv_sizeof__Bool=0
7965 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007967
Thomas Woutersb2137042007-02-01 18:02:27 +00007968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7970$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971
7972
7973
Thomas Woutersb2137042007-02-01 18:02:27 +00007974cat >>confdefs.h <<_ACEOF
7975#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7976_ACEOF
7977
7978
7979fi
7980
Matthias Kloseb9621712010-04-24 17:59:49 +00007981ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007982 #include <stdint.h>
7983 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007984 #ifdef HAVE_INTTYPES_H
7985 #include <inttypes.h>
7986 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007987"
Victor Stinnere0be4232011-10-25 13:06:09 +02007988if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007989
7990cat >>confdefs.h <<_ACEOF
7991#define HAVE_UINTPTR_T 1
7992_ACEOF
7993
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994# The cast to long int works around a bug in the HP C Compiler
7995# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7996# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7997# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7999$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008000if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008002else
Matthias Kloseb9621712010-04-24 17:59:49 +00008003 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 +00008004
Martin v. Löwis11437992002-04-12 09:54:03 +00008005else
Matthias Kloseb9621712010-04-24 17:59:49 +00008006 if test "$ac_cv_type_uintptr_t" = yes; then
8007 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008009as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008010See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011 else
8012 ac_cv_sizeof_uintptr_t=0
8013 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008015
Martin v. Löwis11437992002-04-12 09:54:03 +00008016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8018$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019
8020
8021
Martin v. Löwis11437992002-04-12 09:54:03 +00008022cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008023#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008024_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008025
Michael W. Hudson54241132001-12-07 15:38:26 +00008026
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008027fi
8028
Thomas Wouters89f507f2006-12-13 04:49:30 +00008029
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008030# The cast to long int works around a bug in the HP C Compiler
8031# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8032# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8033# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8035$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008036if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008037 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008038else
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008040#ifdef HAVE_SYS_TYPES_H
8041#include <sys/types.h>
8042#endif
8043
Matthias Kloseb9621712010-04-24 17:59:49 +00008044"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008045
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008046else
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 if test "$ac_cv_type_off_t" = yes; then
8048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8049$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008050as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008051See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008052 else
8053 ac_cv_sizeof_off_t=0
8054 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008056
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8059$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008060
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008061
8062
Martin v. Löwis11437992002-04-12 09:54:03 +00008063cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008064#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008065_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008066
Michael W. Hudson54241132001-12-07 15:38:26 +00008067
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008068
Matthias Kloseb9621712010-04-24 17:59:49 +00008069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8070$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008071if test "$have_long_long" = yes
8072then
8073if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008074 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008077
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8079$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008080else
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8082$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008083fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008084else
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8086$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008087fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008088
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008089# The cast to long int works around a bug in the HP C Compiler
8090# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8091# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8092# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8094$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008095if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008097else
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008099#ifdef HAVE_SYS_TYPES_H
8100#include <sys/types.h>
8101#endif
8102#ifdef HAVE_TIME_H
8103#include <time.h>
8104#endif
8105
Matthias Kloseb9621712010-04-24 17:59:49 +00008106"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008108else
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 if test "$ac_cv_type_time_t" = yes; then
8110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8111$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008112as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008113See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008114 else
8115 ac_cv_sizeof_time_t=0
8116 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008118
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008119fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8121$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008123
8124
Martin v. Löwis11437992002-04-12 09:54:03 +00008125cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008126#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008127_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008128
Michael W. Hudson54241132001-12-07 15:38:26 +00008129
8130
Trent Mick635f6fb2000-08-23 21:33:05 +00008131# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008132ac_save_cc="$CC"
8133if test "$ac_cv_kpthread" = "yes"
8134then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008135elif test "$ac_cv_kthread" = "yes"
8136then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008137elif test "$ac_cv_pthread" = "yes"
8138then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008139fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8142$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008143have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008145/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008146
8147 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008148int
8149main ()
8150{
Guido van Rossum12580492000-09-24 16:47:19 +00008151pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 ;
8153 return 0;
8154}
Matthias Kloseb159a552010-04-25 21:00:44 +00008155
Martin v. Löwis11437992002-04-12 09:54:03 +00008156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008157if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008158 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8162$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008163if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008165# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8166# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8167# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8169$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008170if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008172else
Matthias Kloseb9621712010-04-24 17:59:49 +00008173 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008174#ifdef HAVE_PTHREAD_H
8175#include <pthread.h>
8176#endif
8177
Matthias Kloseb9621712010-04-24 17:59:49 +00008178"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008180else
Matthias Kloseb9621712010-04-24 17:59:49 +00008181 if test "$ac_cv_type_pthread_t" = yes; then
8182 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8183$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008184as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008185See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008186 else
8187 ac_cv_sizeof_pthread_t=0
8188 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008190
Trent Mick635f6fb2000-08-23 21:33:05 +00008191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8193$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008194
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008195
8196
Martin v. Löwis11437992002-04-12 09:54:03 +00008197cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008198#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008199_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008200
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008201
Trent Mick635f6fb2000-08-23 21:33:05 +00008202fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008203CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008204
Michael W. Hudson54241132001-12-07 15:38:26 +00008205
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008206case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008207 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008208 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8209 ;;
8210 Darwin/*)
8211 OTHER_LIBTOOL_OPT=""
8212 ;;
8213esac
8214
8215
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008216ARCH_RUN_32BIT=""
8217
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008218case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008219 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008220 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8221 if test "${enable_universalsdk}"; then
8222 :
8223 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008224 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008225 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008226 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008227 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008228 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008229 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008230 if test ${gcc_version} '<' 4.0
8231 then
8232 LIBTOOL_CRUFT="-lcc_dynamic"
8233 else
8234 LIBTOOL_CRUFT=""
8235 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008237 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008238else
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008240/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008241
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008242 #include <unistd.h>
8243 int main(int argc, char*argv[])
8244 {
8245 if (sizeof(long) == 4) {
8246 return 0;
8247 } else {
8248 return 1;
8249 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008250 }
8251
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008253if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008254 ac_osx_32bit=yes
8255else
Matthias Kloseb9621712010-04-24 17:59:49 +00008256 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8259 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008260fi
8261
8262
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008263 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008264 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008265 i386)
8266 MACOSX_DEFAULT_ARCH="i386"
8267 ;;
8268 ppc)
8269 MACOSX_DEFAULT_ARCH="ppc"
8270 ;;
8271 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008272 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008273 ;;
8274 esac
8275 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008276 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008277 i386)
8278 MACOSX_DEFAULT_ARCH="x86_64"
8279 ;;
8280 ppc)
8281 MACOSX_DEFAULT_ARCH="ppc64"
8282 ;;
8283 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008284 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008285 ;;
8286 esac
8287
8288 #ARCH_RUN_32BIT="true"
8289 fi
8290
8291 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008292 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008293 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008294esac
8295
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8297$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008298if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008299then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008300 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008301 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008302 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008303
Matthias Kloseb9621712010-04-24 17:59:49 +00008304$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008305
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8307$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008308 if test $enable_shared = "yes"
8309 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008310 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 +00008311 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008312else
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8314$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008315fi
8316
Matthias Kloseb9621712010-04-24 17:59:49 +00008317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8318$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008319case $ac_sys_system/$ac_sys_release in
8320 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008321
Matthias Kloseb9621712010-04-24 17:59:49 +00008322$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008323
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8325$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008326 ;;
8327 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8329$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008330 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008331esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008332
Guido van Rossum0a516c91994-09-12 10:58:40 +00008333# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008334
Michael W. Hudson54241132001-12-07 15:38:26 +00008335
8336
8337
8338
Benjamin Peterson99f03762010-04-11 22:15:28 +00008339
Thomas Wouters477c8d52006-05-27 19:21:47 +00008340
Georg Brandlb1441c72009-01-03 22:33:39 +00008341
Thomas Wouters477c8d52006-05-27 19:21:47 +00008342cat >>confdefs.h <<_ACEOF
8343#define SHLIB_EXT "$SO"
8344_ACEOF
8345
Guido van Rossum0a516c91994-09-12 10:58:40 +00008346# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008347# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008348# (Shared libraries in this instance are shared modules to be loaded into
8349# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8351$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008352if test -z "$LDSHARED"
8353then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008354 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008355 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008356 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008357 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008358 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008359 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008360 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008362 if test "$GCC" = "yes" ; then
8363 LDSHARED='$(CC) -shared'
8364 LDCXXSHARED='$(CXX) -shared'
8365 else
8366 LDSHARED='$(CC) -G'
8367 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008368 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008369 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008370 if test "$GCC" = "yes" ; then
8371 LDSHARED='$(CC) -shared'
8372 LDCXXSHARED='$(CXX) -shared'
8373 else
8374 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008375 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008376 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008377 LDSHARED='$(CC) -bundle'
8378 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008379 if test "$enable_framework" ; then
8380 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008381 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8382 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008383 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008384 else
8385 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008386 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008387 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008388 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008389 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008390 LDSHARED='$(CC) -bundle'
8391 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008392 if test "$enable_framework" ; then
8393 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008394 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8395 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008396 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008397 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008398 # No framework, use the Python app as bundle-loader
8399 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008400 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008401 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008402 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008403 Darwin/*)
8404 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8405 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008406
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008407 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008408 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008409 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008410 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008411 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008412 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8413 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008414 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008415 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008416 LDSHARED='$(CC) -bundle'
8417 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008418 if test "$enable_framework" ; then
8419 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008420 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8421 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008422 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008423 else
8424 # No framework, use the Python app as bundle-loader
8425 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8426 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008427 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008428 fi
8429 fi
8430 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008431 Linux*|GNU*|QNX*)
8432 LDSHARED='$(CC) -shared'
8433 LDCXXSHARED='$(CXX) -shared';;
8434 BSD/OS*/4*)
8435 LDSHARED="gcc -shared"
8436 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008437 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008438 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008439 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008440 LDSHARED='$(CC) -shared'
8441 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008442 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008443 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008444 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008445 OpenBSD*)
8446 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8447 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008448 LDSHARED='$(CC) -shared $(CCSHARED)'
8449 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008450 else
8451 case `uname -r` in
8452 [01].* | 2.[0-7] | 2.[0-7].*)
8453 LDSHARED="ld -Bshareable ${LDFLAGS}"
8454 ;;
8455 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008456 LDSHARED='$(CC) -shared $(CCSHARED)'
8457 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008458 ;;
8459 esac
8460 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008461 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008462 LDSHARED='$(CC) -shared'
8463 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008464 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008465 if test "$GCC" = "yes" ; then
8466 LDSHARED='$(CC) -shared'
8467 LDCXXSHARED='$(CXX) -shared'
8468 else
8469 LDSHARED='$(CC) -G'
8470 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008471 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008472 SCO_SV*)
8473 LDSHARED='$(CC) -Wl,-G,-Bexport'
8474 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8475 CYGWIN*)
8476 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8477 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008478 *) LDSHARED="ld";;
8479 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8482$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008483LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008484BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008485# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008486# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8488$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008489if test -z "$CCSHARED"
8490then
Guido van Rossum07397971997-04-29 21:49:50 +00008491 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008492 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008493 then CCSHARED="-fPIC";
8494 elif test `uname -p` = sparc;
8495 then CCSHARED="-xcode=pic32";
8496 else CCSHARED="-Kpic";
8497 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008498 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008499 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008500 else CCSHARED="+z";
8501 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008502 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008503 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008504 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008505 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008506 if test "$GCC" = "yes"
8507 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008508 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008509 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008510 SCO_SV*)
8511 if test "$GCC" = "yes"
8512 then CCSHARED="-fPIC"
8513 else CCSHARED="-Kpic -belf"
8514 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008515 IRIX*/6*) case $CC in
8516 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008517 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008518 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008519 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8522$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008523# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008524# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8526$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008527if test -z "$LINKFORSHARED"
8528then
Guido van Rossum07397971997-04-29 21:49:50 +00008529 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008530 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008531 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008532 LINKFORSHARED="-Wl,-E -Wl,+s";;
8533# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008534 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008535 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008536 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008538 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008539 if test "$enable_framework"
8540 then
Jack Jansenda49e192005-01-07 13:08:22 +00008541 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008542 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008543 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008544 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008545 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008546 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008547 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008548 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8549 then
8550 LINKFORSHARED="-Wl,--export-dynamic"
8551 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008552 SunOS/5*) case $CC in
8553 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008554 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008555 then
8556 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008557 fi;;
8558 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008559 CYGWIN*)
8560 if test $enable_shared = "no"
8561 then
8562 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8563 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008564 QNX*)
8565 # -Wl,-E causes the symbols to be added to the dynamic
8566 # symbol table so that they can be found when a module
8567 # is loaded. -N 2048K causes the stack size to be set
8568 # to 2048 kilobytes so that the stack doesn't overflow
8569 # when running test_compile.py.
8570 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008571 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8574$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008575
Michael W. Hudson54241132001-12-07 15:38:26 +00008576
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008577
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8579$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008580if test ! "$LIBRARY" = "$LDLIBRARY"
8581then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008582 case $ac_sys_system in
8583 CYGWIN*)
8584 # Cygwin needs CCSHARED when building extension DLLs
8585 # but not when building the interpreter DLL.
8586 CFLAGSFORSHARED='';;
8587 *)
8588 CFLAGSFORSHARED='$(CCSHARED)'
8589 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8592$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008593
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008594# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8595# library (with --enable-shared).
8596# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008597# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8598# if it is not required, since it creates a dependency of the shared library
8599# to LIBS. This, in turn, means that applications linking the shared libpython
8600# don't need to link LIBS explicitly. The default should be only changed
8601# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008602
Matthias Kloseb9621712010-04-24 17:59:49 +00008603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8604$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008605case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008606 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008607 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008608esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8610$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008611
8612
Guido van Rossum627b2d71993-12-24 10:39:16 +00008613# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8615$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008616if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008617 $as_echo_n "(cached) " >&6
8618else
8619 ac_check_lib_save_LIBS=$LIBS
8620LIBS="-lsendfile $LIBS"
8621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8622/* end confdefs.h. */
8623
8624/* Override any GCC internal prototype to avoid an error.
8625 Use char because int might match the return type of a GCC
8626 builtin and then its argument prototype would still apply. */
8627#ifdef __cplusplus
8628extern "C"
8629#endif
8630char sendfile ();
8631int
8632main ()
8633{
8634return sendfile ();
8635 ;
8636 return 0;
8637}
8638_ACEOF
8639if ac_fn_c_try_link "$LINENO"; then :
8640 ac_cv_lib_sendfile_sendfile=yes
8641else
8642 ac_cv_lib_sendfile_sendfile=no
8643fi
8644rm -f core conftest.err conftest.$ac_objext \
8645 conftest$ac_exeext conftest.$ac_ext
8646LIBS=$ac_check_lib_save_LIBS
8647fi
8648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8649$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008650if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008651 cat >>confdefs.h <<_ACEOF
8652#define HAVE_LIBSENDFILE 1
8653_ACEOF
8654
8655 LIBS="-lsendfile $LIBS"
8656
8657fi
8658
Matthias Kloseb9621712010-04-24 17:59:49 +00008659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8660$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008661if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008663else
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008665LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669/* Override any GCC internal prototype to avoid an error.
8670 Use char because int might match the return type of a GCC
8671 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008672#ifdef __cplusplus
8673extern "C"
8674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008675char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008676int
8677main ()
8678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 ;
8681 return 0;
8682}
8683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008689rm -f core conftest.err conftest.$ac_objext \
8690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008691LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8694$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008695if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 cat >>confdefs.h <<_ACEOF
8697#define HAVE_LIBDL 1
8698_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008699
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008700 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008701
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008702fi
8703 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8705$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008706if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008708else
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008710LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008712/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714/* Override any GCC internal prototype to avoid an error.
8715 Use char because int might match the return type of a GCC
8716 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008717#ifdef __cplusplus
8718extern "C"
8719#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008720char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008721int
8722main ()
8723{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 ;
8726 return 0;
8727}
8728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008729if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008731else
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008734rm -f core conftest.err conftest.$ac_objext \
8735 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008736LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8739$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008740if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 cat >>confdefs.h <<_ACEOF
8742#define HAVE_LIBDLD 1
8743_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008744
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008745 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008746
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008747fi
8748 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008749
Georg Brandlb1441c72009-01-03 22:33:39 +00008750# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008751if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8753$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008754if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008755 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008756else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008757 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008761/* Override any GCC internal prototype to avoid an error.
8762 Use char because int might match the return type of a GCC
8763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008764#ifdef __cplusplus
8765extern "C"
8766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008767char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008768int
8769main ()
8770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008771return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ;
8773 return 0;
8774}
8775_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008776for ac_lib in '' pthread rt posix4; do
8777 if test -z "$ac_lib"; then
8778 ac_res="none required"
8779 else
8780 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008781 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008782 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008784 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786rm -f core conftest.err conftest.$ac_objext \
8787 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008788 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008789 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008791done
Victor Stinnere0be4232011-10-25 13:06:09 +02008792if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008794else
8795 ac_cv_search_sem_init=no
8796fi
8797rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008798LIBS=$ac_func_search_save_LIBS
8799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8801$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008802ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008803if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008804 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008805
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008806fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008807 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008808 # posix4 on Solaris 2.6
8809 # pthread (first!) on Linux
8810fi
8811
Martin v. Löwis19d17342003-06-14 21:03:05 +00008812# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8814$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008815if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008817else
8818 ac_check_lib_save_LIBS=$LIBS
8819LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008821/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823/* Override any GCC internal prototype to avoid an error.
8824 Use char because int might match the return type of a GCC
8825 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008826#ifdef __cplusplus
8827extern "C"
8828#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008829char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008830int
8831main ()
8832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008834 ;
8835 return 0;
8836}
8837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008838if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008839 ac_cv_lib_intl_textdomain=yes
8840else
Matthias Kloseb9621712010-04-24 17:59:49 +00008841 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008843rm -f core conftest.err conftest.$ac_objext \
8844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008845LIBS=$ac_check_lib_save_LIBS
8846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8848$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008849if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008850
Matthias Kloseb9621712010-04-24 17:59:49 +00008851$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008852
Brett Cannonc6d936e2009-06-07 20:09:53 +00008853 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008854fi
8855
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008856
8857# checks for system dependent C++ extensions support
8858case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008859 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8860$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008862/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008863
Georg Brandl59e87bd2011-02-15 19:48:59 +00008864 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008865int
8866main ()
8867{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008868loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008869 ;
8870 return 0;
8871}
Matthias Kloseb159a552010-04-25 21:00:44 +00008872
Martin v. Löwis11437992002-04-12 09:54:03 +00008873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008874if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008875
Matthias Kloseb159a552010-04-25 21:00:44 +00008876
Matthias Kloseb9621712010-04-24 17:59:49 +00008877$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008878
Matthias Kloseb159a552010-04-25 21:00:44 +00008879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008880$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008881
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008882else
Matthias Kloseb159a552010-04-25 21:00:44 +00008883
8884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008885$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008886
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008888rm -f core conftest.err conftest.$ac_objext \
8889 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008890 *) ;;
8891esac
8892
Guido van Rossum70c7f481998-03-26 18:44:10 +00008893# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8895$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008896if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008897 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008898else
Martin v. Löwis11437992002-04-12 09:54:03 +00008899 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008900LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008902/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008903
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008904/* Override any GCC internal prototype to avoid an error.
8905 Use char because int might match the return type of a GCC
8906 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008907#ifdef __cplusplus
8908extern "C"
8909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008910char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008911int
8912main ()
8913{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008915 ;
8916 return 0;
8917}
8918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008919if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008921else
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008924rm -f core conftest.err conftest.$ac_objext \
8925 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008926LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8929$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008930if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008931 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008932fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008933 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8935$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008936if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008938else
Martin v. Löwis11437992002-04-12 09:54:03 +00008939 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008940LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008944/* Override any GCC internal prototype to avoid an error.
8945 Use char because int might match the return type of a GCC
8946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008947#ifdef __cplusplus
8948extern "C"
8949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008950char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008951int
8952main ()
8953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008955 ;
8956 return 0;
8957}
8958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008959if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008961else
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008964rm -f core conftest.err conftest.$ac_objext \
8965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008966LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8969$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008970if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008971 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008972fi
8973 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008974
Matthias Kloseb9621712010-04-24 17:59:49 +00008975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8976$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008979if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008980 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8982$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008983LIBS="$withval $LIBS"
8984
8985else
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8987$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988fi
8989
Guido van Rossum7f43da71994-08-01 12:15:30 +00008990
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008991if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008992 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8993set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8995$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008996if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008997 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00008998else
8999 case $PKG_CONFIG in
9000 [\\/]* | ?:[\\/]*)
9001 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9002 ;;
9003 *)
9004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9005for as_dir in $PATH
9006do
9007 IFS=$as_save_IFS
9008 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009010 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009011 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009013 break 2
9014 fi
9015done
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009017IFS=$as_save_IFS
9018
9019 ;;
9020esac
9021fi
9022PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9023if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9025$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009026else
Matthias Kloseb9621712010-04-24 17:59:49 +00009027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9028$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009029fi
9030
9031
9032fi
9033if test -z "$ac_cv_path_PKG_CONFIG"; then
9034 ac_pt_PKG_CONFIG=$PKG_CONFIG
9035 # Extract the first word of "pkg-config", so it can be a program name with args.
9036set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9038$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009039if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009040 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009041else
9042 case $ac_pt_PKG_CONFIG in
9043 [\\/]* | ?:[\\/]*)
9044 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9045 ;;
9046 *)
9047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9048for as_dir in $PATH
9049do
9050 IFS=$as_save_IFS
9051 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009052 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009054 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009056 break 2
9057 fi
9058done
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009060IFS=$as_save_IFS
9061
9062 ;;
9063esac
9064fi
9065ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9066if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9068$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009069else
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9071$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009072fi
9073
9074 if test "x$ac_pt_PKG_CONFIG" = x; then
9075 PKG_CONFIG=""
9076 else
9077 case $cross_compiling:$ac_tool_warned in
9078yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009079{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9080$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009081ac_tool_warned=yes ;;
9082esac
9083 PKG_CONFIG=$ac_pt_PKG_CONFIG
9084 fi
9085else
9086 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9087fi
9088
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009089
9090# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9092$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009093
9094# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009095if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009096 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009097else
9098 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009099fi
9100
9101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9103$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009104
9105# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9107$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009108
9109# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009110if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009111 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009112else
9113 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009114fi
9115
9116
9117if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009118 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9119else
9120 LIBFFI_INCLUDEDIR=""
9121fi
9122
9123
Matthias Kloseb9621712010-04-24 17:59:49 +00009124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9125$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009126
Stefan Krah60187b52012-03-23 19:06:27 +01009127# Check for use of the system libmpdec library
9128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9129$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9130
9131# Check whether --with-system_libmpdec was given.
9132if test "${with_system_libmpdec+set}" = set; then :
9133 withval=$with_system_libmpdec;
9134else
9135 with_system_libmpdec="no"
9136fi
9137
9138
9139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9140$as_echo "$with_system_libmpdec" >&6; }
9141
Benjamin Peterson076ed002010-10-31 17:11:02 +00009142# Check for support for loadable sqlite extensions
9143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9144$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9145# Check whether --enable-loadable-sqlite-extensions was given.
9146if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9147 enableval=$enable_loadable_sqlite_extensions;
9148else
9149 enable_loadable_sqlite_extensions="no"
9150fi
9151
9152
9153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9154$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9155
Matthias Klose55708cc2009-04-30 08:06:49 +00009156# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9158$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009159
9160# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009161if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009162 withval=$with_dbmliborder;
9163if test x$with_dbmliborder = xyes
9164then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009165as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009166else
9167 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9168 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9169 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009170 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009171 fi
9172 done
9173fi
9174fi
9175
Matthias Kloseb9621712010-04-24 17:59:49 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9177$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009178
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009179# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009180
9181
Matthias Kloseb9621712010-04-24 17:59:49 +00009182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9183$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009186if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009187 withval=$with_signal_module;
9188fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009189
9190
9191if test -z "$with_signal_module"
9192then with_signal_module="yes"
9193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9195$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009196
9197if test "${with_signal_module}" = "yes"; then
9198 USE_SIGNAL_MODULE=""
9199 SIGNAL_OBJS=""
9200else
9201 USE_SIGNAL_MODULE="#"
9202 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9203fi
9204
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009205# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009206
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009207USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009208
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009209
Martin v. Löwis11437992002-04-12 09:54:03 +00009210
9211# Templates for things AC_DEFINEd more than once.
9212# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009213
9214
Martin v. Löwis11437992002-04-12 09:54:03 +00009215
Matthias Kloseb9621712010-04-24 17:59:49 +00009216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9217$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009219# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009220if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009221 withval=$with_threads;
9222fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009223
9224
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009225# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009227# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009228if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009229 withval=$with_thread; with_threads=$with_thread
9230fi
9231
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009232
9233if test -z "$with_threads"
9234then with_threads="yes"
9235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9237$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009238
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009239
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009240if test "$with_threads" = "no"
9241then
9242 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009243elif test "$ac_cv_pthread_is_default" = yes
9244then
Matthias Kloseb9621712010-04-24 17:59:49 +00009245 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009246
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009247 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009248 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009249
9250 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009251 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009252elif test "$ac_cv_kpthread" = "yes"
9253then
9254 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009255 if test "$ac_cv_cxx_thread" = "yes"; then
9256 CXX="$CXX -Kpthread"
9257 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009258 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009259
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009260 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009261 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009262elif test "$ac_cv_kthread" = "yes"
9263then
9264 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009265 if test "$ac_cv_cxx_thread" = "yes"; then
9266 CXX="$CXX -Kthread"
9267 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009268 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009269
9270 posix_threads=yes
9271 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009272elif test "$ac_cv_pthread" = "yes"
9273then
9274 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009275 if test "$ac_cv_cxx_thread" = "yes"; then
9276 CXX="$CXX -pthread"
9277 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009278 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009279
9280 posix_threads=yes
9281 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009282else
9283 if test ! -z "$with_threads" -a -d "$with_threads"
9284 then LDFLAGS="$LDFLAGS -L$with_threads"
9285 fi
9286 if test ! -z "$withval" -a -d "$withval"
9287 then LDFLAGS="$LDFLAGS -L$withval"
9288 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009289
9290 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009291 # define _POSIX_THREADS in unistd.h. Some apparently don't
9292 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9294$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009296/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009297
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009298#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009299#ifdef _POSIX_THREADS
9300yes
9301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009302
9303_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009305 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009306 unistd_defines_pthreads=yes
9307else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009308 unistd_defines_pthreads=no
9309fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009310rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009311
Matthias Kloseb9621712010-04-24 17:59:49 +00009312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9313$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009314
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009316
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009317 # Just looking for pthread_create in libpthread is not enough:
9318 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9319 # So we really have to include pthread.h, and then link.
9320 _libs=$LIBS
9321 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9323$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009325/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009326#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009327
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009328void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009329int
9330main ()
9331{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009332
9333pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009334 ;
9335 return 0;
9336}
9337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009338if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009339
Matthias Kloseb9621712010-04-24 17:59:49 +00009340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9341$as_echo "yes" >&6; }
9342 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009343
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009344 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009345 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009346else
Martin v. Löwis11437992002-04-12 09:54:03 +00009347
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009348 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009349 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009350if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009352
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009353 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009354 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009355else
Guido van Rossumad678af1998-10-02 14:42:15 +00009356
Matthias Kloseb9621712010-04-24 17:59:49 +00009357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9358$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009359if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009360 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009361else
Martin v. Löwis11437992002-04-12 09:54:03 +00009362 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009363LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009367/* Override any GCC internal prototype to avoid an error.
9368 Use char because int might match the return type of a GCC
9369 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009370#ifdef __cplusplus
9371extern "C"
9372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009373char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009374int
9375main ()
9376{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009377return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009378 ;
9379 return 0;
9380}
9381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009382if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009383 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009384else
Matthias Kloseb9621712010-04-24 17:59:49 +00009385 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009386fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009387rm -f core conftest.err conftest.$ac_objext \
9388 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009389LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9392$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009393if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009394 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009395
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009396 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009397 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009398 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009399else
Greg Steinadf63d62000-07-05 10:38:09 +00009400
Matthias Kloseb9621712010-04-24 17:59:49 +00009401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9402$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009403if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009404 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009405else
Martin v. Löwis11437992002-04-12 09:54:03 +00009406 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009407LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009410
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009411/* Override any GCC internal prototype to avoid an error.
9412 Use char because int might match the return type of a GCC
9413 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009414#ifdef __cplusplus
9415extern "C"
9416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009417char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009418int
9419main ()
9420{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009421return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 ;
9423 return 0;
9424}
9425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009426if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009428else
Matthias Kloseb9621712010-04-24 17:59:49 +00009429 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009431rm -f core conftest.err conftest.$ac_objext \
9432 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009433LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9436$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009437if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009438 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009439
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009440 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009441 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009442 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009443else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009444
Matthias Kloseb9621712010-04-24 17:59:49 +00009445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9446$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009447if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009448 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009449else
Martin v. Löwis11437992002-04-12 09:54:03 +00009450 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009451LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455/* Override any GCC internal prototype to avoid an error.
9456 Use char because int might match the return type of a GCC
9457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009458#ifdef __cplusplus
9459extern "C"
9460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009461char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009462int
9463main ()
9464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009465return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009466 ;
9467 return 0;
9468}
9469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009470if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009472else
Matthias Kloseb9621712010-04-24 17:59:49 +00009473 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009475rm -f core conftest.err conftest.$ac_objext \
9476 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009477LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9480$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009481if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009482 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009483
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009484 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009485 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009486 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009487else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009488
Matthias Kloseb9621712010-04-24 17:59:49 +00009489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9490$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009491if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009492 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009493else
Martin v. Löwis11437992002-04-12 09:54:03 +00009494 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009495LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009499/* Override any GCC internal prototype to avoid an error.
9500 Use char because int might match the return type of a GCC
9501 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502#ifdef __cplusplus
9503extern "C"
9504#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009505char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009506int
9507main ()
9508{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009509return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 ;
9511 return 0;
9512}
9513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009514if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009516else
Matthias Kloseb9621712010-04-24 17:59:49 +00009517 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009519rm -f core conftest.err conftest.$ac_objext \
9520 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009521LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9524$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009525if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009526 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009527
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009528 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009529 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009530 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009531else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009532
Martin v. Löwis130fb172001-07-19 11:00:41 +00009533 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009534fi
9535
Guido van Rossum627b2d71993-12-24 10:39:16 +00009536
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009537fi
9538
Guido van Rossum0be3e491997-05-22 20:33:33 +00009539fi
9540
Guido van Rossum49545951997-12-02 19:28:29 +00009541fi
9542
Guido van Rossumb93a8621998-05-07 13:27:32 +00009543fi
9544
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546rm -f core conftest.err conftest.$ac_objext \
9547 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009548
Matthias Kloseb9621712010-04-24 17:59:49 +00009549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9550$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009551if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009552 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009553else
Martin v. Löwis11437992002-04-12 09:54:03 +00009554 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009555LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009558
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009559/* Override any GCC internal prototype to avoid an error.
9560 Use char because int might match the return type of a GCC
9561 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009562#ifdef __cplusplus
9563extern "C"
9564#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009565char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009566int
9567main ()
9568{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 ;
9571 return 0;
9572}
9573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009574if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009576else
Matthias Kloseb9621712010-04-24 17:59:49 +00009577 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009579rm -f core conftest.err conftest.$ac_objext \
9580 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009581LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9584$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009585if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009586 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009587
Martin v. Löwis130fb172001-07-19 11:00:41 +00009588 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009589 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009590 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009591fi
9592
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009593
Neal Norwitza978ab02002-11-02 16:58:05 +00009594 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9596$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009597if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009598 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009599else
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009601LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605/* Override any GCC internal prototype to avoid an error.
9606 Use char because int might match the return type of a GCC
9607 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009608#ifdef __cplusplus
9609extern "C"
9610#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009611char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009612int
9613main ()
9614{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009615return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009616 ;
9617 return 0;
9618}
9619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009620if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009621 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009622else
Matthias Kloseb9621712010-04-24 17:59:49 +00009623 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009625rm -f core conftest.err conftest.$ac_objext \
9626 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009627LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9630$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009631if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009632 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009633
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009634 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009635 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009636 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009637fi
9638
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009639 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009640fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009641
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009642if test "$posix_threads" = "yes"; then
9643 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009644
Matthias Kloseb9621712010-04-24 17:59:49 +00009645$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009646
9647 fi
9648
9649 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9650 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009651 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009652$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009653
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009654 ;;
9655 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009656$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009657
9658 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009659 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009660$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009661
9662 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009663 esac
9664
Matthias Kloseb9621712010-04-24 17:59:49 +00009665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9666$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009667 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009668 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009669else
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009671 ac_cv_pthread_system_supported=no
9672else
Matthias Kloseb9621712010-04-24 17:59:49 +00009673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009674/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009675#include <pthread.h>
9676 void *foo(void *parm) {
9677 return NULL;
9678 }
9679 main() {
9680 pthread_attr_t attr;
9681 pthread_t id;
9682 if (pthread_attr_init(&attr)) exit(-1);
9683 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9684 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9685 exit(0);
9686 }
9687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009688if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009689 ac_cv_pthread_system_supported=yes
9690else
Matthias Kloseb9621712010-04-24 17:59:49 +00009691 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9694 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009695fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009697
Guido van Rossum627b2d71993-12-24 10:39:16 +00009698fi
9699
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9701$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009702 if test "$ac_cv_pthread_system_supported" = "yes"; then
9703
Matthias Kloseb9621712010-04-24 17:59:49 +00009704$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009705
9706 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009707 for ac_func in pthread_sigmask
9708do :
9709 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009710if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009711 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009712#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009713_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009714 case $ac_sys_system in
9715 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009716
Matthias Kloseb9621712010-04-24 17:59:49 +00009717$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009718
9719 ;;
9720 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009721fi
9722done
9723
9724fi
9725
9726
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009727# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009728
Matthias Kloseb9621712010-04-24 17:59:49 +00009729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9730$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009731# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009732if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009733 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009734 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9736$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009737 ipv6=no
9738 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009739 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9740$as_echo "yes" >&6; }
9741 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009742
9743 ipv6=yes
9744 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009746else
Martin v. Löwis11437992002-04-12 09:54:03 +00009747
Matthias Kloseb9621712010-04-24 17:59:49 +00009748 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009749
Matthias Kloseb9621712010-04-24 17:59:49 +00009750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9751$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009752 ipv6=no
9753
9754else
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009756/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009757 /* AF_INET6 available check */
9758#include <sys/types.h>
9759#include <sys/socket.h>
9760main()
9761{
9762 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9763 exit(1);
9764 else
9765 exit(0);
9766}
9767
Martin v. Löwis11437992002-04-12 09:54:03 +00009768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009769if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009770
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9772$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009773 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009774
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009775else
Matthias Kloseb159a552010-04-25 21:00:44 +00009776
Matthias Kloseb9621712010-04-24 17:59:49 +00009777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9778$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009779 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9783 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009784fi
9785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009787if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9789$as_echo_n "checking if RFC2553 API is available... " >&6; }
9790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009791/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009792
9793 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009794#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009795int
9796main ()
9797{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009798struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009799 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 ;
9801 return 0;
9802}
Matthias Kloseb159a552010-04-25 21:00:44 +00009803
Martin v. Löwis11437992002-04-12 09:54:03 +00009804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009805if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009806
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009808$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009809 ipv6=yes
9810
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009811else
Matthias Kloseb159a552010-04-25 21:00:44 +00009812
9813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009814$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009815 ipv6=no
9816
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009819fi
9820
9821if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009823
9824fi
9825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826fi
9827
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009828
9829ipv6type=unknown
9830ipv6lib=none
9831ipv6trylibc=no
9832
9833if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9835$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009836 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9837 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009838 case $i in
9839 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009841/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009842
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009843#include <netinet/in.h>
9844#ifdef IPV6_INRIA_VERSION
9845yes
9846#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009847_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009849 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009850 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009851fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009852rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009853
9854 ;;
9855 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009857/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009858
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009859#include <netinet/in.h>
9860#ifdef __KAME__
9861yes
9862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009863_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009864if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009865 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009866 ipv6type=$i;
9867 ipv6lib=inet6
9868 ipv6libdir=/usr/local/v6/lib
9869 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009870fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009871rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009872
9873 ;;
9874 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009876/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009877
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009878#include <features.h>
9879#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9880yes
9881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009882_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009884 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009885 ipv6type=$i;
9886 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009887fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009888rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009889
9890 ;;
9891 linux-inet6)
9892 if test -d /usr/inet6; then
9893 ipv6type=$i
9894 ipv6lib=inet6
9895 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009896 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009897 fi
9898 ;;
9899 solaris)
9900 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009901 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009902 ipv6type=$i
9903 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009904 fi
9905 fi
9906 ;;
9907 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009909/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009910
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009911#include <sys/param.h>
9912#ifdef _TOSHIBA_INET6
9913yes
9914#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009915_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009917 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009918 ipv6type=$i;
9919 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009920 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009921fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009922rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009923
9924 ;;
9925 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009928
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009929#include </usr/local/v6/include/sys/v6config.h>
9930#ifdef __V6D__
9931yes
9932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009933_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009936 ipv6type=$i;
9937 ipv6lib=v6;
9938 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009939 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009940fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009941rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009942
9943 ;;
9944 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009946/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009947
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009948#include <sys/param.h>
9949#ifdef _ZETA_MINAMI_INET6
9950yes
9951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009952_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009954 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009955 ipv6type=$i;
9956 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009957 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009958fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009959rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009960
9961 ;;
9962 esac
9963 if test "$ipv6type" != "unknown"; then
9964 break
9965 fi
9966 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9968$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009969fi
9970
9971if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9972 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9973 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9974 echo "using lib$ipv6lib"
9975 else
9976 if test $ipv6trylibc = "yes"; then
9977 echo "using libc"
9978 else
9979 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9980 echo "You need to fetch lib$ipv6lib.a from appropriate"
9981 echo 'ipv6 kit and compile beforehand.'
9982 exit 1
9983 fi
9984 fi
9985fi
9986
Matthias Kloseb9621712010-04-24 17:59:49 +00009987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9988$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009990/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009991
9992 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009993int
9994main ()
9995{
9996FSIORefNum fRef = 0
9997 ;
9998 return 0;
9999}
Matthias Kloseb159a552010-04-25 21:00:44 +000010000
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010002if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010003
Matthias Kloseb159a552010-04-25 21:00:44 +000010004
Matthias Kloseb9621712010-04-24 17:59:49 +000010005$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010006
Matthias Kloseb9621712010-04-24 17:59:49 +000010007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10008$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010009
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010010else
Matthias Kloseb159a552010-04-25 21:00:44 +000010011
Matthias Kloseb9621712010-04-24 17:59:49 +000010012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10013$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010014
10015fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10017
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010018# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10020$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010022# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010023if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010024 withval=$with_doc_strings;
10025fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010026
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010027
10028if test -z "$with_doc_strings"
10029then with_doc_strings="yes"
10030fi
10031if test "$with_doc_strings" != "no"
10032then
10033
Matthias Kloseb9621712010-04-24 17:59:49 +000010034$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010035
10036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10038$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010039
Antoine Pitrou042b1282010-08-13 21:15:58 +000010040# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10042$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010044# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010045if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010047if test "$withval" != no
10048then
10049
Matthias Kloseb9621712010-04-24 17:59:49 +000010050$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010051
Matthias Kloseb9621712010-04-24 17:59:49 +000010052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10053$as_echo "yes" >&6; }
10054else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10055$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010056fi
10057else
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060fi
10061
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010062
10063# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10065$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010067# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010068if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069 withval=$with_pymalloc;
10070fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010071
Neil Schemenauera35c6882001-02-27 04:45:05 +000010072
Neil Schemenauer16c22972002-03-22 15:34:49 +000010073if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010074then
10075 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010076fi
10077if test "$with_pymalloc" != "no"
10078then
Martin v. Löwis11437992002-04-12 09:54:03 +000010079
Matthias Kloseb9621712010-04-24 17:59:49 +000010080$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010081
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010082 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10085$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010086
Benjamin Peterson05159c42009-12-03 03:01:27 +000010087# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10089$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010090
10091# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010092if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010093 withval=$with_valgrind;
10094else
10095 with_valgrind=no
10096fi
10097
Matthias Kloseb9621712010-04-24 17:59:49 +000010098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10099$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010100if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010101 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 +020010102if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010103
Matthias Kloseb9621712010-04-24 17:59:49 +000010104$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010105
10106else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010107 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010108
10109fi
10110
10111
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010112 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010113fi
10114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010115# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010116
Guido van Rossum98935bf2001-09-05 19:13:16 +000010117DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010118
Guido van Rossume97ee181999-12-20 21:27:22 +000010119# the dlopen() function means we might want to use dynload_shlib.o. some
10120# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010121for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010122do :
10123 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010124if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010126#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010127_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010128
Guido van Rossume97ee181999-12-20 21:27:22 +000010129fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010130done
Guido van Rossume97ee181999-12-20 21:27:22 +000010131
Michael W. Hudson54241132001-12-07 15:38:26 +000010132
Guido van Rossume97ee181999-12-20 21:27:22 +000010133# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10134# loading of modules.
10135
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10137$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010138if test -z "$DYNLOADFILE"
10139then
10140 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010141 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10142 if test "$ac_cv_func_dlopen" = yes
10143 then DYNLOADFILE="dynload_shlib.o"
10144 else DYNLOADFILE="dynload_aix.o"
10145 fi
10146 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010147 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010148 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10149 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010150 *)
10151 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10152 # out any dynamic loading
10153 if test "$ac_cv_func_dlopen" = yes
10154 then DYNLOADFILE="dynload_shlib.o"
10155 else DYNLOADFILE="dynload_stub.o"
10156 fi
10157 ;;
10158 esac
10159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10161$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010162if test "$DYNLOADFILE" != "dynload_stub.o"
10163then
Martin v. Löwis11437992002-04-12 09:54:03 +000010164
Matthias Kloseb9621712010-04-24 17:59:49 +000010165$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010166
10167fi
10168
Neil Schemenauer4e425612001-06-19 15:44:15 +000010169# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10170
Michael W. Hudson54241132001-12-07 15:38:26 +000010171
Matthias Kloseb9621712010-04-24 17:59:49 +000010172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10173$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010174if test -z "$MACHDEP_OBJS"
10175then
Jack Jansene578a632001-08-15 01:27:14 +000010176 MACHDEP_OBJS=$extra_machdep_objs
10177else
10178 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010179fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010180if test -z "$MACHDEP_OBJS"; then
10181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10182$as_echo "none" >&6; }
10183else
10184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10185$as_echo "$MACHDEP_OBJS" >&6; }
10186fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010187
Guido van Rossum627b2d71993-12-24 10:39:16 +000010188# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010189for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010190 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010191 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010192 futimens futimes gai_strerror \
10193 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010194 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010195 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010196 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10197 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010198 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010199 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010200 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010201 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010202 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010203 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010204 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10205 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010206 sigaction sigaltstack siginterrupt sigpending sigrelse \
10207 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010208 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010209 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10210 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010211do :
10212 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10213ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010214if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010215 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010216#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010217_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010218
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010219fi
10220done
10221
Michael W. Hudson54241132001-12-07 15:38:26 +000010222
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010223ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10224 #include <dirent.h>
10225"
10226if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10227
10228$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10229
10230fi
10231
10232
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010233# For some functions, having a definition is not sufficient, since
10234# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10236$as_echo_n "checking for chroot... " >&6; }
10237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010238/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010239#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010240int
10241main ()
10242{
10243void *x=chroot
10244 ;
10245 return 0;
10246}
10247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010248if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010249
Matthias Kloseb9621712010-04-24 17:59:49 +000010250$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010251
Matthias Kloseb159a552010-04-25 21:00:44 +000010252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010253$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010254else
Matthias Kloseb9621712010-04-24 17:59:49 +000010255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10256$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010257
10258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10261$as_echo_n "checking for link... " >&6; }
10262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010263/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010264#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010265int
10266main ()
10267{
10268void *x=link
10269 ;
10270 return 0;
10271}
10272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010273if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010274
Matthias Kloseb9621712010-04-24 17:59:49 +000010275$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010276
Matthias Kloseb159a552010-04-25 21:00:44 +000010277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010278$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010279else
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10281$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010282
10283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10286$as_echo_n "checking for symlink... " >&6; }
10287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010288/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010289#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010290int
10291main ()
10292{
10293void *x=symlink
10294 ;
10295 return 0;
10296}
10297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010298if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010299
Matthias Kloseb9621712010-04-24 17:59:49 +000010300$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010301
Matthias Kloseb159a552010-04-25 21:00:44 +000010302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010303$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010304else
Matthias Kloseb9621712010-04-24 17:59:49 +000010305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10306$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010307
10308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10311$as_echo_n "checking for fchdir... " >&6; }
10312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010313/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010314#include <unistd.h>
10315int
10316main ()
10317{
10318void *x=fchdir
10319 ;
10320 return 0;
10321}
10322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010323if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010324
Matthias Kloseb9621712010-04-24 17:59:49 +000010325$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010326
Matthias Kloseb159a552010-04-25 21:00:44 +000010327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010328$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010329else
Matthias Kloseb9621712010-04-24 17:59:49 +000010330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10331$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010332
10333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10336$as_echo_n "checking for fsync... " >&6; }
10337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010338/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010339#include <unistd.h>
10340int
10341main ()
10342{
10343void *x=fsync
10344 ;
10345 return 0;
10346}
10347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010348if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010351
Matthias Kloseb159a552010-04-25 21:00:44 +000010352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010353$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010354else
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10356$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010357
10358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10361$as_echo_n "checking for fdatasync... " >&6; }
10362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010363/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010364#include <unistd.h>
10365int
10366main ()
10367{
10368void *x=fdatasync
10369 ;
10370 return 0;
10371}
10372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010373if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010374
Matthias Kloseb9621712010-04-24 17:59:49 +000010375$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010376
Matthias Kloseb159a552010-04-25 21:00:44 +000010377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010378$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010379else
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10381$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010382
10383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10386$as_echo_n "checking for epoll... " >&6; }
10387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010388/* end confdefs.h. */
10389#include <sys/epoll.h>
10390int
10391main ()
10392{
10393void *x=epoll_create
10394 ;
10395 return 0;
10396}
10397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010399
Matthias Kloseb9621712010-04-24 17:59:49 +000010400$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010401
Matthias Kloseb159a552010-04-25 21:00:44 +000010402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010403$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010404else
Matthias Kloseb9621712010-04-24 17:59:49 +000010405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10406$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010407
10408fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10411$as_echo_n "checking for epoll_create1... " >&6; }
10412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10413/* end confdefs.h. */
10414#include <sys/epoll.h>
10415int
10416main ()
10417{
10418void *x=epoll_create1
10419 ;
10420 return 0;
10421}
10422_ACEOF
10423if ac_fn_c_try_compile "$LINENO"; then :
10424
10425$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10426
10427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10428$as_echo "yes" >&6; }
10429else
10430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10431$as_echo "no" >&6; }
10432
10433fi
10434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10436$as_echo_n "checking for kqueue... " >&6; }
10437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010438/* end confdefs.h. */
10439
10440#include <sys/types.h>
10441#include <sys/event.h>
10442
10443int
10444main ()
10445{
10446int x=kqueue()
10447 ;
10448 return 0;
10449}
10450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010451if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010452
Matthias Kloseb9621712010-04-24 17:59:49 +000010453$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010454
Matthias Kloseb159a552010-04-25 21:00:44 +000010455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010456$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010457else
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010460
10461fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010463# On some systems (eg. FreeBSD 5), we would find a definition of the
10464# functions ctermid_r, setgroups in the library, but no prototype
10465# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10466# address to avoid compiler warnings and potential miscompilations
10467# because of the missing prototypes.
10468
Matthias Kloseb9621712010-04-24 17:59:49 +000010469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10470$as_echo_n "checking for ctermid_r... " >&6; }
10471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010472/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010473
Martin v. Löwisd5843682002-11-21 20:41:28 +000010474#include <stdio.h>
10475
Martin v. Löwisd5843682002-11-21 20:41:28 +000010476int
10477main ()
10478{
10479void* p = ctermid_r
10480 ;
10481 return 0;
10482}
10483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010485
Matthias Kloseb9621712010-04-24 17:59:49 +000010486$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010487
Matthias Kloseb159a552010-04-25 21:00:44 +000010488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010489$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010490else
Matthias Kloseb9621712010-04-24 17:59:49 +000010491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10492$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010493
10494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10496
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10498$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010499if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010500 $as_echo_n "(cached) " >&6
10501else
10502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010503/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010504#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010505int
10506main ()
10507{
10508void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010509
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010510 ;
10511 return 0;
10512}
10513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010514if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010515 ac_cv_flock_decl=yes
10516else
10517 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010518
10519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010521
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010522fi
10523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10524$as_echo "$ac_cv_flock_decl" >&6; }
10525if test "x${ac_cv_flock_decl}" = xyes; then
10526 for ac_func in flock
10527do :
10528 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010529if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010530 cat >>confdefs.h <<_ACEOF
10531#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010532_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010533
Antoine Pitroua3000072010-09-07 14:52:42 +000010534else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010536$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010537if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010538 $as_echo_n "(cached) " >&6
10539else
10540 ac_check_lib_save_LIBS=$LIBS
10541LIBS="-lbsd $LIBS"
10542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10543/* end confdefs.h. */
10544
10545/* Override any GCC internal prototype to avoid an error.
10546 Use char because int might match the return type of a GCC
10547 builtin and then its argument prototype would still apply. */
10548#ifdef __cplusplus
10549extern "C"
10550#endif
10551char flock ();
10552int
10553main ()
10554{
10555return flock ();
10556 ;
10557 return 0;
10558}
10559_ACEOF
10560if ac_fn_c_try_link "$LINENO"; then :
10561 ac_cv_lib_bsd_flock=yes
10562else
10563 ac_cv_lib_bsd_flock=no
10564fi
10565rm -f core conftest.err conftest.$ac_objext \
10566 conftest$ac_exeext conftest.$ac_ext
10567LIBS=$ac_check_lib_save_LIBS
10568fi
10569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10570$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010571if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010572 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010573
10574
10575$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10576
10577
10578fi
10579
10580
10581fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010582done
10583
Antoine Pitroua3000072010-09-07 14:52:42 +000010584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585
Matthias Kloseb9621712010-04-24 17:59:49 +000010586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10587$as_echo_n "checking for getpagesize... " >&6; }
10588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010589/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010590
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010591#include <unistd.h>
10592
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010593int
10594main ()
10595{
10596void* p = getpagesize
10597 ;
10598 return 0;
10599}
10600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010601if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010602
Matthias Kloseb9621712010-04-24 17:59:49 +000010603$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010604
Matthias Kloseb159a552010-04-25 21:00:44 +000010605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010606$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010607else
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10609$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010610
10611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010613
Victor Stinner984890f2011-11-24 13:53:38 +010010614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10615$as_echo_n "checking for broken unsetenv... " >&6; }
10616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10617/* end confdefs.h. */
10618
10619#include <stdlib.h>
10620
10621int
10622main ()
10623{
10624int res = unsetenv("DUMMY")
10625 ;
10626 return 0;
10627}
10628_ACEOF
10629if ac_fn_c_try_compile "$LINENO"; then :
10630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10631$as_echo "no" >&6; }
10632else
10633
10634$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10635
10636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10637$as_echo "yes" >&6; }
10638
10639fi
10640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10641
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010642for ac_prog in true
10643do
10644 # Extract the first word of "$ac_prog", so it can be a program name with args.
10645set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10647$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010648if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010649 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010650else
10651 if test -n "$TRUE"; then
10652 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10653else
10654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10655for as_dir in $PATH
10656do
10657 IFS=$as_save_IFS
10658 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010660 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010661 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 $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 +000010663 break 2
10664 fi
10665done
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010668
10669fi
10670fi
10671TRUE=$ac_cv_prog_TRUE
10672if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10674$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010675else
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10677$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010678fi
10679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010681 test -n "$TRUE" && break
10682done
10683test -n "$TRUE" || TRUE="/bin/true"
10684
10685
Matthias Kloseb9621712010-04-24 17:59:49 +000010686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10687$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010688if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010690else
10691 ac_check_lib_save_LIBS=$LIBS
10692LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696/* Override any GCC internal prototype to avoid an error.
10697 Use char because int might match the return type of a GCC
10698 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010699#ifdef __cplusplus
10700extern "C"
10701#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010702char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010703int
10704main ()
10705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010706return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010707 ;
10708 return 0;
10709}
10710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010712 ac_cv_lib_c_inet_aton=yes
10713else
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010715fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010716rm -f core conftest.err conftest.$ac_objext \
10717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010718LIBS=$ac_check_lib_save_LIBS
10719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10721$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010722if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010723 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010724else
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10726$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010727if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010729else
10730 ac_check_lib_save_LIBS=$LIBS
10731LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010733/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010734
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735/* Override any GCC internal prototype to avoid an error.
10736 Use char because int might match the return type of a GCC
10737 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010738#ifdef __cplusplus
10739extern "C"
10740#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010741char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010742int
10743main ()
10744{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010745return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010746 ;
10747 return 0;
10748}
10749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010750if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010751 ac_cv_lib_resolv_inet_aton=yes
10752else
Matthias Kloseb9621712010-04-24 17:59:49 +000010753 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010755rm -f core conftest.err conftest.$ac_objext \
10756 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010757LIBS=$ac_check_lib_save_LIBS
10758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10760$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010761if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010762 cat >>confdefs.h <<_ACEOF
10763#define HAVE_LIBRESOLV 1
10764_ACEOF
10765
10766 LIBS="-lresolv $LIBS"
10767
10768fi
10769
10770
10771fi
10772
10773
Christian Heimesd0764e22007-12-04 15:00:33 +000010774# On Tru64, chflags seems to be present, but calling it will
10775# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10777$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010778if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010779 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010780else
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010782 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010783else
Matthias Kloseb9621712010-04-24 17:59:49 +000010784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010785/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010786
Christian Heimesd0764e22007-12-04 15:00:33 +000010787#include <sys/stat.h>
10788#include <unistd.h>
10789int main(int argc, char*argv[])
10790{
10791 if(chflags(argv[0], 0) != 0)
10792 return 1;
10793 return 0;
10794}
Ned Deily3eb67d52011-06-28 00:00:28 -070010795
Christian Heimesd0764e22007-12-04 15:00:33 +000010796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010797if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010798 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010799else
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010804fi
10805
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010806
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10809$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010810if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010812if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010813 ac_cv_have_chflags="yes"
10814else
10815 ac_cv_have_chflags="no"
10816fi
10817
10818fi
10819if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010820
Matthias Kloseb9621712010-04-24 17:59:49 +000010821$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010822
10823fi
10824
Matthias Kloseb9621712010-04-24 17:59:49 +000010825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10826$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010827if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010829else
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010831 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010832else
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010834/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010835
Christian Heimesd0764e22007-12-04 15:00:33 +000010836#include <sys/stat.h>
10837#include <unistd.h>
10838int main(int argc, char*argv[])
10839{
10840 if(lchflags(argv[0], 0) != 0)
10841 return 1;
10842 return 0;
10843}
Ned Deily3eb67d52011-06-28 00:00:28 -070010844
Christian Heimesd0764e22007-12-04 15:00:33 +000010845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010846if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010847 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010848else
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10852 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010853fi
10854
10855
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10858$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010859if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010860 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010861if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010862 ac_cv_have_lchflags="yes"
10863else
10864 ac_cv_have_lchflags="no"
10865fi
10866
10867fi
10868if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010869
Matthias Kloseb9621712010-04-24 17:59:49 +000010870$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010871
10872fi
10873
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010874case $ac_sys_system/$ac_sys_release in
10875Darwin/*)
10876 _CUR_CFLAGS="${CFLAGS}"
10877 _CUR_LDFLAGS="${LDFLAGS}"
10878 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10879 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10880 ;;
10881esac
10882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10884$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010885if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010887else
10888 ac_check_lib_save_LIBS=$LIBS
10889LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010891/* end confdefs.h. */
10892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010893/* Override any GCC internal prototype to avoid an error.
10894 Use char because int might match the return type of a GCC
10895 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010896#ifdef __cplusplus
10897extern "C"
10898#endif
10899char inflateCopy ();
10900int
10901main ()
10902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010903return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010904 ;
10905 return 0;
10906}
10907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010908if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010909 ac_cv_lib_z_inflateCopy=yes
10910else
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010913rm -f core conftest.err conftest.$ac_objext \
10914 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010915LIBS=$ac_check_lib_save_LIBS
10916fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10918$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010919if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010922
10923fi
10924
10925
10926case $ac_sys_system/$ac_sys_release in
10927Darwin/*)
10928 CFLAGS="${_CUR_CFLAGS}"
10929 LDFLAGS="${_CUR_LDFLAGS}"
10930 ;;
10931esac
10932
Matthias Kloseb9621712010-04-24 17:59:49 +000010933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10934$as_echo_n "checking for hstrerror... " >&6; }
10935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010936/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010937
Martin v. Löwise9416172003-05-03 10:12:45 +000010938#include <netdb.h>
10939
Martin v. Löwise9416172003-05-03 10:12:45 +000010940int
10941main ()
10942{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010943void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010944 ;
10945 return 0;
10946}
10947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010948if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010949
Matthias Kloseb9621712010-04-24 17:59:49 +000010950$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010951
Matthias Kloseb159a552010-04-25 21:00:44 +000010952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010953$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010954else
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10956$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010957
10958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010959rm -f core conftest.err conftest.$ac_objext \
10960 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010961
Matthias Kloseb9621712010-04-24 17:59:49 +000010962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10963$as_echo_n "checking for inet_aton... " >&6; }
10964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010965/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010966
Martin v. Löwis86d66262006-02-17 08:40:11 +000010967#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010968#include <sys/socket.h>
10969#include <netinet/in.h>
10970#include <arpa/inet.h>
10971
Martin v. Löwise9416172003-05-03 10:12:45 +000010972int
10973main ()
10974{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010975void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010976 ;
10977 return 0;
10978}
10979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010980if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010981
Matthias Kloseb9621712010-04-24 17:59:49 +000010982$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010983
Matthias Kloseb159a552010-04-25 21:00:44 +000010984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010985$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010986else
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10988$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010989
10990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010991rm -f core conftest.err conftest.$ac_objext \
10992 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993
Matthias Kloseb9621712010-04-24 17:59:49 +000010994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
10995$as_echo_n "checking for inet_pton... " >&6; }
10996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010997/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010998
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000010999#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011000#include <sys/socket.h>
11001#include <netinet/in.h>
11002#include <arpa/inet.h>
11003
Martin v. Löwise9416172003-05-03 10:12:45 +000011004int
11005main ()
11006{
11007void* p = inet_pton
11008 ;
11009 return 0;
11010}
11011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011015
Matthias Kloseb159a552010-04-25 21:00:44 +000011016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011017$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011018else
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11020$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011021
11022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011024
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011025# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11027$as_echo_n "checking for setgroups... " >&6; }
11028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011029/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011030
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011031#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011032#ifdef HAVE_GRP_H
11033#include <grp.h>
11034#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011035
Martin v. Löwisd5843682002-11-21 20:41:28 +000011036int
11037main ()
11038{
11039void* p = setgroups
11040 ;
11041 return 0;
11042}
11043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011047
Matthias Kloseb159a552010-04-25 21:00:44 +000011048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011049$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011050else
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11052$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011053
11054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011056
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011057# check for openpty and forkpty
11058
11059for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011060do :
11061 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011062if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011063 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011064#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011065_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011066
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011067else
Matthias Kloseb9621712010-04-24 17:59:49 +000011068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11069$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011070if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011071 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011072else
Martin v. Löwis11437992002-04-12 09:54:03 +000011073 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011074LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011078/* Override any GCC internal prototype to avoid an error.
11079 Use char because int might match the return type of a GCC
11080 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011081#ifdef __cplusplus
11082extern "C"
11083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011084char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011085int
11086main ()
11087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011088return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011089 ;
11090 return 0;
11091}
11092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011093if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011094 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011095else
Matthias Kloseb9621712010-04-24 17:59:49 +000011096 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011098rm -f core conftest.err conftest.$ac_objext \
11099 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011100LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11103$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011104if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011105 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011106 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011107else
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11109$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011110if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011112else
11113 ac_check_lib_save_LIBS=$LIBS
11114LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011116/* end confdefs.h. */
11117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011118/* Override any GCC internal prototype to avoid an error.
11119 Use char because int might match the return type of a GCC
11120 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011121#ifdef __cplusplus
11122extern "C"
11123#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011124char openpty ();
11125int
11126main ()
11127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011129 ;
11130 return 0;
11131}
11132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011134 ac_cv_lib_bsd_openpty=yes
11135else
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011138rm -f core conftest.err conftest.$ac_objext \
11139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011140LIBS=$ac_check_lib_save_LIBS
11141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11143$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011144if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011145 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011146 LIBS="$LIBS -lbsd"
11147fi
11148
11149
11150fi
11151
Fred Drake8cef4cf2000-06-28 16:40:38 +000011152
11153fi
11154done
11155
11156for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011157do :
11158 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011159if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011161#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011162_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011163
Fred Drake8cef4cf2000-06-28 16:40:38 +000011164else
Matthias Kloseb9621712010-04-24 17:59:49 +000011165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11166$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011167if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011168 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011169else
Martin v. Löwis11437992002-04-12 09:54:03 +000011170 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011171LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011175/* Override any GCC internal prototype to avoid an error.
11176 Use char because int might match the return type of a GCC
11177 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011178#ifdef __cplusplus
11179extern "C"
11180#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011181char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011182int
11183main ()
11184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011185return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 ;
11187 return 0;
11188}
11189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011190if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011191 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011192else
Matthias Kloseb9621712010-04-24 17:59:49 +000011193 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011195rm -f core conftest.err conftest.$ac_objext \
11196 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011197LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11200$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011201if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011202 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011203 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011204else
Matthias Kloseb9621712010-04-24 17:59:49 +000011205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11206$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011207if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011208 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011209else
11210 ac_check_lib_save_LIBS=$LIBS
11211LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011213/* end confdefs.h. */
11214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011215/* Override any GCC internal prototype to avoid an error.
11216 Use char because int might match the return type of a GCC
11217 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011218#ifdef __cplusplus
11219extern "C"
11220#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011221char forkpty ();
11222int
11223main ()
11224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011225return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011226 ;
11227 return 0;
11228}
11229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011230if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011231 ac_cv_lib_bsd_forkpty=yes
11232else
Matthias Kloseb9621712010-04-24 17:59:49 +000011233 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011235rm -f core conftest.err conftest.$ac_objext \
11236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011237LIBS=$ac_check_lib_save_LIBS
11238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11240$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011241if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011243 LIBS="$LIBS -lbsd"
11244fi
11245
11246
11247fi
11248
Fred Drake8cef4cf2000-06-28 16:40:38 +000011249
11250fi
11251done
11252
Jack Jansendd19cf82001-12-06 22:36:17 +000011253
Christian Heimesb186d002008-03-18 15:15:01 +000011254# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011255for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011256do :
11257 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011258if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011259 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011260#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011261_ACEOF
11262
11263fi
11264done
11265
11266
Michael W. Hudson54241132001-12-07 15:38:26 +000011267# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011268for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011269do :
11270 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11271ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011272if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011273 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011274#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011275_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011276
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011277fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011278done
11279
Michael W. Hudson54241132001-12-07 15:38:26 +000011280
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011281ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011282if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011283 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011284
Martin v. Löwis1142de32002-03-29 16:28:31 +000011285else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011286 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011287 *" dup2.$ac_objext "* ) ;;
11288 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011289 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011290esac
11291
Martin v. Löwis1142de32002-03-29 16:28:31 +000011292fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011293
11294ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011295if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011296 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11297
11298else
11299 case " $LIBOBJS " in
11300 *" getcwd.$ac_objext "* ) ;;
11301 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11302 ;;
11303esac
11304
11305fi
11306
11307ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011308if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011309 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11310
11311else
11312 case " $LIBOBJS " in
11313 *" strdup.$ac_objext "* ) ;;
11314 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11315 ;;
11316esac
11317
11318fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011319
11320
11321for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011322do :
11323 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011324if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011326#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011329/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011330#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011331int
11332main ()
11333{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011334getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 ;
11336 return 0;
11337}
11338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011340
Matthias Kloseb9621712010-04-24 17:59:49 +000011341$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011342
Guido van Rossum627b2d71993-12-24 10:39:16 +000011343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011345
Guido van Rossum627b2d71993-12-24 10:39:16 +000011346fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011347done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011348
Jack Jansen150753c2003-03-29 22:07:47 +000011349for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011350do :
11351 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011352if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011353 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011354#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011357/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011358#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011359int
11360main ()
11361{
11362setpgrp(0,0);
11363 ;
11364 return 0;
11365}
11366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011368
Matthias Kloseb9621712010-04-24 17:59:49 +000011369$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011370
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011373
11374fi
11375done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011376
Thomas Wouters3a584202000-08-05 23:28:51 +000011377for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011378do :
11379 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011380if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011382#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011385/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011386#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011387int
11388main ()
11389{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011390gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 ;
11392 return 0;
11393}
11394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011395if ac_fn_c_try_compile "$LINENO"; then :
11396
Guido van Rossum627b2d71993-12-24 10:39:16 +000011397else
Skip Montanaro6dead952003-09-25 14:50:04 +000011398
Matthias Kloseb9621712010-04-24 17:59:49 +000011399$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011400
Martin v. Löwis11437992002-04-12 09:54:03 +000011401
Guido van Rossum627b2d71993-12-24 10:39:16 +000011402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011404
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011405fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011406done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011407
Michael W. Hudson54241132001-12-07 15:38:26 +000011408
Victor Stinnere0be4232011-10-25 13:06:09 +020011409for ac_func in clock_gettime
11410do :
11411 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11412if test "x$ac_cv_func_clock_gettime" = xyes; then :
11413 cat >>confdefs.h <<_ACEOF
11414#define HAVE_CLOCK_GETTIME 1
11415_ACEOF
11416
11417else
11418
11419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11420$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11421if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11422 $as_echo_n "(cached) " >&6
11423else
11424 ac_check_lib_save_LIBS=$LIBS
11425LIBS="-lrt $LIBS"
11426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11427/* end confdefs.h. */
11428
11429/* Override any GCC internal prototype to avoid an error.
11430 Use char because int might match the return type of a GCC
11431 builtin and then its argument prototype would still apply. */
11432#ifdef __cplusplus
11433extern "C"
11434#endif
11435char clock_gettime ();
11436int
11437main ()
11438{
11439return clock_gettime ();
11440 ;
11441 return 0;
11442}
11443_ACEOF
11444if ac_fn_c_try_link "$LINENO"; then :
11445 ac_cv_lib_rt_clock_gettime=yes
11446else
11447 ac_cv_lib_rt_clock_gettime=no
11448fi
11449rm -f core conftest.err conftest.$ac_objext \
11450 conftest$ac_exeext conftest.$ac_ext
11451LIBS=$ac_check_lib_save_LIBS
11452fi
11453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11454$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11455if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11456
11457 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11458
11459
11460$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11461
11462
11463fi
11464
11465
11466fi
11467done
11468
11469
11470for ac_func in clock_getres
11471do :
11472 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11473if test "x$ac_cv_func_clock_getres" = xyes; then :
11474 cat >>confdefs.h <<_ACEOF
11475#define HAVE_CLOCK_GETRES 1
11476_ACEOF
11477
11478else
11479
11480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11481$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11482if ${ac_cv_lib_rt_clock_getres+:} false; then :
11483 $as_echo_n "(cached) " >&6
11484else
11485 ac_check_lib_save_LIBS=$LIBS
11486LIBS="-lrt $LIBS"
11487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11488/* end confdefs.h. */
11489
11490/* Override any GCC internal prototype to avoid an error.
11491 Use char because int might match the return type of a GCC
11492 builtin and then its argument prototype would still apply. */
11493#ifdef __cplusplus
11494extern "C"
11495#endif
11496char clock_getres ();
11497int
11498main ()
11499{
11500return clock_getres ();
11501 ;
11502 return 0;
11503}
11504_ACEOF
11505if ac_fn_c_try_link "$LINENO"; then :
11506 ac_cv_lib_rt_clock_getres=yes
11507else
11508 ac_cv_lib_rt_clock_getres=no
11509fi
11510rm -f core conftest.err conftest.$ac_objext \
11511 conftest$ac_exeext conftest.$ac_ext
11512LIBS=$ac_check_lib_save_LIBS
11513fi
11514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11515$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11516if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11517
11518 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11519
11520
11521fi
11522
11523
11524fi
11525done
11526
11527
Matthias Kloseb9621712010-04-24 17:59:49 +000011528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11529$as_echo_n "checking for major... " >&6; }
11530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011531/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011532
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011533#if defined(MAJOR_IN_MKDEV)
11534#include <sys/mkdev.h>
11535#elif defined(MAJOR_IN_SYSMACROS)
11536#include <sys/sysmacros.h>
11537#else
11538#include <sys/types.h>
11539#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011540
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011541int
11542main ()
11543{
11544
11545 makedev(major(0),minor(0));
11546
11547 ;
11548 return 0;
11549}
11550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011551if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011552
11553
Matthias Kloseb9621712010-04-24 17:59:49 +000011554$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011555
Matthias Kloseb9621712010-04-24 17:59:49 +000011556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11557$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011558
11559else
Skip Montanaro6dead952003-09-25 14:50:04 +000011560
Matthias Kloseb9621712010-04-24 17:59:49 +000011561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11562$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011563
11564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011565rm -f core conftest.err conftest.$ac_objext \
11566 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011567
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011568# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011569# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11571$as_echo_n "checking for getaddrinfo... " >&6; }
11572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011573/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011574
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011575#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011576#include <sys/socket.h>
11577#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011578#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011579
Martin v. Löwis11437992002-04-12 09:54:03 +000011580int
11581main ()
11582{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011583getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 ;
11585 return 0;
11586}
11587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011588if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011589 have_getaddrinfo=yes
11590else
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011593rm -f core conftest.err conftest.$ac_objext \
11594 conftest$ac_exeext conftest.$ac_ext
11595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11596$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011597if test $have_getaddrinfo = yes
11598then
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11600$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011601 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011602 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011603else
Matthias Kloseb9621712010-04-24 17:59:49 +000011604 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011605
11606if test "${enable_ipv6+set}" = set; then
11607 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11608else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011609 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011610fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011611else
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011613/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011614
11615#include <sys/types.h>
11616#include <netdb.h>
11617#include <string.h>
11618#include <sys/socket.h>
11619#include <netinet/in.h>
11620
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011621int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011622{
11623 int passive, gaierr, inet4 = 0, inet6 = 0;
11624 struct addrinfo hints, *ai, *aitop;
11625 char straddr[INET6_ADDRSTRLEN], strport[16];
11626
11627 for (passive = 0; passive <= 1; passive++) {
11628 memset(&hints, 0, sizeof(hints));
11629 hints.ai_family = AF_UNSPEC;
11630 hints.ai_flags = passive ? AI_PASSIVE : 0;
11631 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011632 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011633 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11634 (void)gai_strerror(gaierr);
11635 goto bad;
11636 }
11637 for (ai = aitop; ai; ai = ai->ai_next) {
11638 if (ai->ai_addr == NULL ||
11639 ai->ai_addrlen == 0 ||
11640 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11641 straddr, sizeof(straddr), strport, sizeof(strport),
11642 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11643 goto bad;
11644 }
11645 switch (ai->ai_family) {
11646 case AF_INET:
11647 if (strcmp(strport, "54321") != 0) {
11648 goto bad;
11649 }
11650 if (passive) {
11651 if (strcmp(straddr, "0.0.0.0") != 0) {
11652 goto bad;
11653 }
11654 } else {
11655 if (strcmp(straddr, "127.0.0.1") != 0) {
11656 goto bad;
11657 }
11658 }
11659 inet4++;
11660 break;
11661 case AF_INET6:
11662 if (strcmp(strport, "54321") != 0) {
11663 goto bad;
11664 }
11665 if (passive) {
11666 if (strcmp(straddr, "::") != 0) {
11667 goto bad;
11668 }
11669 } else {
11670 if (strcmp(straddr, "::1") != 0) {
11671 goto bad;
11672 }
11673 }
11674 inet6++;
11675 break;
11676 case AF_UNSPEC:
11677 goto bad;
11678 break;
11679 default:
11680 /* another family support? */
11681 break;
11682 }
11683 }
11684 }
11685
11686 if (!(inet4 == 0 || inet4 == 2))
11687 goto bad;
11688 if (!(inet6 == 0 || inet6 == 2))
11689 goto bad;
11690
11691 if (aitop)
11692 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011693 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011694
11695 bad:
11696 if (aitop)
11697 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011698 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011699}
11700
Martin v. Löwis11437992002-04-12 09:54:03 +000011701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011702if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011703 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011704else
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011707rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11708 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011710
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011711fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011712
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011714
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11716$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11717
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011718if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011719then
11720 if test $ipv6 = yes
11721 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011722 echo 'Fatal: You must get working getaddrinfo() function.'
11723 echo ' or you can specify "--disable-ipv6"'.
11724 exit 1
11725 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011726else
Martin v. Löwis11437992002-04-12 09:54:03 +000011727
Matthias Kloseb9621712010-04-24 17:59:49 +000011728$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011729
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011730fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011731
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011732for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011733do :
11734 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011735if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011736 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011737#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011738_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011739
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011740fi
11741done
11742
Michael W. Hudson54241132001-12-07 15:38:26 +000011743
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011744# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11746$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011747if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011749else
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011751/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011752#include <sys/types.h>
11753#include <sys/time.h>
11754#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011755
Martin v. Löwis11437992002-04-12 09:54:03 +000011756int
11757main ()
11758{
11759if ((struct tm *) 0)
11760return 0;
11761 ;
11762 return 0;
11763}
11764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011765if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011766 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011767else
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11773$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011774if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011775
Matthias Kloseb9621712010-04-24 17:59:49 +000011776$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011777
11778fi
11779
Matthias Kloseb9621712010-04-24 17:59:49 +000011780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11781$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011782if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011784else
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011786/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011787#include <sys/types.h>
11788#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011789
Martin v. Löwis11437992002-04-12 09:54:03 +000011790int
11791main ()
11792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011793struct tm tm;
11794 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011795 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011796 ;
11797 return 0;
11798}
11799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011800if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011801 ac_cv_struct_tm=time.h
11802else
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11808$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011809if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011810
Matthias Kloseb9621712010-04-24 17:59:49 +000011811$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011812
11813fi
11814
Matthias Kloseb9621712010-04-24 17:59:49 +000011815ac_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 +000011816#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011817
Matthias Kloseb9621712010-04-24 17:59:49 +000011818"
Victor Stinnere0be4232011-10-25 13:06:09 +020011819if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011820
11821cat >>confdefs.h <<_ACEOF
11822#define HAVE_STRUCT_TM_TM_ZONE 1
11823_ACEOF
11824
11825
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011826fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011827
Martin v. Löwis11437992002-04-12 09:54:03 +000011828if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11829
Matthias Kloseb9621712010-04-24 17:59:49 +000011830$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011831
11832else
Matthias Kloseb9621712010-04-24 17:59:49 +000011833 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11834"
Victor Stinnere0be4232011-10-25 13:06:09 +020011835if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011839fi
11840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011841cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011842#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011843_ACEOF
11844
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11846$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011847if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011849else
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011851/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011852#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011853#if !HAVE_DECL_TZNAME
11854extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011856
Martin v. Löwis11437992002-04-12 09:54:03 +000011857int
11858main ()
11859{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011860return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011861 ;
11862 return 0;
11863}
11864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011865if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011866 ac_cv_var_tzname=yes
11867else
Matthias Kloseb9621712010-04-24 17:59:49 +000011868 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011870rm -f core conftest.err conftest.$ac_objext \
11871 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11874$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011875 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011876
Matthias Kloseb9621712010-04-24 17:59:49 +000011877$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011878
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011879 fi
11880fi
11881
Matthias Kloseb9621712010-04-24 17:59:49 +000011882ac_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 +020011883if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011884
11885cat >>confdefs.h <<_ACEOF
11886#define HAVE_STRUCT_STAT_ST_RDEV 1
11887_ACEOF
11888
11889
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011890fi
11891
Matthias Kloseb9621712010-04-24 17:59:49 +000011892ac_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 +020011893if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011894
Martin v. Löwis11437992002-04-12 09:54:03 +000011895cat >>confdefs.h <<_ACEOF
11896#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11897_ACEOF
11898
11899
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011900fi
11901
Matthias Kloseb9621712010-04-24 17:59:49 +000011902ac_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 +020011903if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011904
11905cat >>confdefs.h <<_ACEOF
11906#define HAVE_STRUCT_STAT_ST_FLAGS 1
11907_ACEOF
11908
11909
11910fi
11911
Matthias Kloseb9621712010-04-24 17:59:49 +000011912ac_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 +020011913if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011914
11915cat >>confdefs.h <<_ACEOF
11916#define HAVE_STRUCT_STAT_ST_GEN 1
11917_ACEOF
11918
11919
11920fi
11921
Matthias Kloseb9621712010-04-24 17:59:49 +000011922ac_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 +020011923if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011924
11925cat >>confdefs.h <<_ACEOF
11926#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11927_ACEOF
11928
11929
11930fi
11931
Matthias Kloseb9621712010-04-24 17:59:49 +000011932ac_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 +020011933if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011934
Martin v. Löwis11437992002-04-12 09:54:03 +000011935cat >>confdefs.h <<_ACEOF
11936#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11937_ACEOF
11938
11939
Matthias Kloseb9621712010-04-24 17:59:49 +000011940$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011941
11942else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011943 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011944 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011945 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11946 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011947esac
11948
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011949fi
11950
Michael W. Hudson54241132001-12-07 15:38:26 +000011951
Martin v. Löwis11437992002-04-12 09:54:03 +000011952
Matthias Kloseb9621712010-04-24 17:59:49 +000011953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11954$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011955if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011957else
Matthias Kloseb159a552010-04-25 21:00:44 +000011958
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011960/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011961#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011962int
11963main ()
11964{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011965return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011966 ;
11967 return 0;
11968}
11969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011970if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011971 ac_cv_header_time_altzone=yes
11972else
Matthias Kloseb9621712010-04-24 17:59:49 +000011973 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011977fi
11978
Matthias Kloseb9621712010-04-24 17:59:49 +000011979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11980$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011981if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011982
Matthias Kloseb9621712010-04-24 17:59:49 +000011983$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011984
11985fi
11986
Guido van Rossumda88dad1995-01-26 00:46:29 +000011987was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11989$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011991/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011992
11993#include <sys/types.h>
11994#include <sys/select.h>
11995#include <sys/time.h>
11996
Martin v. Löwis11437992002-04-12 09:54:03 +000011997int
11998main ()
11999{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012000;
Martin v. Löwis11437992002-04-12 09:54:03 +000012001 ;
12002 return 0;
12003}
12004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012005if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012006
12007
Matthias Kloseb9621712010-04-24 17:59:49 +000012008$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012009
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012010 was_it_defined=yes
12011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12015$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012016
Matthias Kloseb9621712010-04-24 17:59:49 +000012017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12018$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012019if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012021else
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012023/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012024#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012025int
12026main ()
12027{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012028struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 ;
12030 return 0;
12031}
12032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012033if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012034 ac_cv_struct_addrinfo=yes
12035else
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12039fi
12040
Matthias Kloseb9621712010-04-24 17:59:49 +000012041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12042$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012043if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012044
Matthias Kloseb9621712010-04-24 17:59:49 +000012045$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012046
12047fi
12048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12050$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012051if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012053else
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012055/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012056
12057# include <sys/types.h>
12058# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012059int
12060main ()
12061{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012062struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012063 ;
12064 return 0;
12065}
12066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012067if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012068 ac_cv_struct_sockaddr_storage=yes
12069else
Matthias Kloseb9621712010-04-24 17:59:49 +000012070 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012071fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12073fi
12074
Matthias Kloseb9621712010-04-24 17:59:49 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12076$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012077if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012078
Matthias Kloseb9621712010-04-24 17:59:49 +000012079$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012080
12081fi
12082
Guido van Rossum627b2d71993-12-24 10:39:16 +000012083# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012084
Matthias Kloseb9621712010-04-24 17:59:49 +000012085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12086$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012087if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012089else
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012091/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012092$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012093int
12094main ()
12095{
12096static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012097test_array [0] = 0;
12098return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012099
12100 ;
12101 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012102}
Martin v. Löwis11437992002-04-12 09:54:03 +000012103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012104if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012105 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012106else
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12112$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012113if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012114 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012115
12116fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012117
Matthias Kloseb9621712010-04-24 17:59:49 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12119$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012122else
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012124/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012125
Martin v. Löwis11437992002-04-12 09:54:03 +000012126int
12127main ()
12128{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012129
Martin v. Löwis11437992002-04-12 09:54:03 +000012130#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012131 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012133 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135 char const *const *pcpcc;
12136 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012137 /* NEC SVR4.0.2 mips cc rejects this. */
12138 struct point {int x, y;};
12139 static struct point const zero = {0,0};
12140 /* AIX XL C 1.02.0.0 rejects this.
12141 It does not let you subtract one const X* pointer from another in
12142 an arm of an if-expression whose if-part is not a constant
12143 expression */
12144 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012145 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012146 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012147 ++pcpcc;
12148 ppc = (char**) pcpcc;
12149 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012150 { /* SCO 3.2v4 cc rejects this sort of thing. */
12151 char tx;
12152 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012154
Martin v. Löwis11437992002-04-12 09:54:03 +000012155 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012156 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012157 }
12158 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12159 int x[] = {25, 17};
12160 const int *foo = &x[0];
12161 ++foo;
12162 }
12163 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12164 typedef const int *iptr;
12165 iptr p = 0;
12166 ++p;
12167 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012168 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012170 struct s { int j; const int *ap[3]; } bx;
12171 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 }
12173 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12174 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012175 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012176 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012177 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012178#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012179
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 ;
12181 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012182}
Martin v. Löwis11437992002-04-12 09:54:03 +000012183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012184if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012185 ac_cv_c_const=yes
12186else
Matthias Kloseb9621712010-04-24 17:59:49 +000012187 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12192$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012193if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012194
Matthias Kloseb9621712010-04-24 17:59:49 +000012195$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012196
12197fi
12198
Michael W. Hudson54241132001-12-07 15:38:26 +000012199
Guido van Rossumda88dad1995-01-26 00:46:29 +000012200works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12202$as_echo_n "checking for working volatile... " >&6; }
12203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012204/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012205
Martin v. Löwis11437992002-04-12 09:54:03 +000012206int
12207main ()
12208{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012209volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 ;
12211 return 0;
12212}
12213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012214if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012215 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012216else
Skip Montanaro6dead952003-09-25 14:50:04 +000012217
Matthias Kloseb9621712010-04-24 17:59:49 +000012218$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012219
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012220
Guido van Rossum627b2d71993-12-24 10:39:16 +000012221fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12224$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012225
Guido van Rossumda88dad1995-01-26 00:46:29 +000012226works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12228$as_echo_n "checking for working signed char... " >&6; }
12229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012230/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012231
Martin v. Löwis11437992002-04-12 09:54:03 +000012232int
12233main ()
12234{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012235signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012236 ;
12237 return 0;
12238}
12239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012240if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012241 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012242else
Skip Montanaro6dead952003-09-25 14:50:04 +000012243
Matthias Kloseb9621712010-04-24 17:59:49 +000012244$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012245
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012246
Guido van Rossum7f43da71994-08-01 12:15:30 +000012247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12250$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012251
Guido van Rossumda88dad1995-01-26 00:46:29 +000012252have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12254$as_echo_n "checking for prototypes... " >&6; }
12255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012256/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012257int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012258int
12259main ()
12260{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012261return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012262 ;
12263 return 0;
12264}
12265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012266if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012267
Matthias Kloseb9621712010-04-24 17:59:49 +000012268$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
Matthias Kloseb159a552010-04-25 21:00:44 +000012270 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12274$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012275
Guido van Rossumda88dad1995-01-26 00:46:29 +000012276works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12278$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012280/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012281
12282#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012283int foo(int x, ...) {
12284 va_list va;
12285 va_start(va, x);
12286 va_arg(va, int);
12287 va_arg(va, char *);
12288 va_arg(va, double);
12289 return 0;
12290}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012291
Martin v. Löwis11437992002-04-12 09:54:03 +000012292int
12293main ()
12294{
Guido van Rossum90eea071996-08-30 20:58:57 +000012295return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 ;
12297 return 0;
12298}
12299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012300if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012301
12302
Matthias Kloseb9621712010-04-24 17:59:49 +000012303$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012304
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012305 works=yes
12306
Guido van Rossum627b2d71993-12-24 10:39:16 +000012307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12310$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012311
Martin v. Löwisd6320502004-08-12 13:45:08 +000012312# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12314$as_echo_n "checking for socketpair... " >&6; }
12315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012316/* end confdefs.h. */
12317
12318#include <sys/types.h>
12319#include <sys/socket.h>
12320
12321int
12322main ()
12323{
12324void *x=socketpair
12325 ;
12326 return 0;
12327}
12328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012330
Matthias Kloseb9621712010-04-24 17:59:49 +000012331$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012332
Matthias Kloseb159a552010-04-25 21:00:44 +000012333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012334$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012335else
Matthias Kloseb9621712010-04-24 17:59:49 +000012336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12337$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012338
12339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012341
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012342# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12344$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012346/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012347#include <sys/types.h>
12348#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012349int
12350main ()
12351{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012352struct sockaddr x;
12353x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 ;
12355 return 0;
12356}
12357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012358if ac_fn_c_try_compile "$LINENO"; then :
12359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12360$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012361
Matthias Kloseb9621712010-04-24 17:59:49 +000012362$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012363
12364else
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12366$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012367
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012370
Guido van Rossumda88dad1995-01-26 00:46:29 +000012371va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12373$as_echo_n "checking whether va_list is an array... " >&6; }
12374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012375/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012376
12377#ifdef HAVE_STDARG_PROTOTYPES
12378#include <stdarg.h>
12379#else
12380#include <varargs.h>
12381#endif
12382
Martin v. Löwis11437992002-04-12 09:54:03 +000012383int
12384main ()
12385{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012386va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012387 ;
12388 return 0;
12389}
12390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012391if ac_fn_c_try_compile "$LINENO"; then :
12392
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012393else
Skip Montanaro6dead952003-09-25 14:50:04 +000012394
Martin v. Löwis11437992002-04-12 09:54:03 +000012395
Matthias Kloseb9621712010-04-24 17:59:49 +000012396$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012397
Guido van Rossumda88dad1995-01-26 00:46:29 +000012398 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012399
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12403$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012404
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012405# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012406
12407
Matthias Kloseb9621712010-04-24 17:59:49 +000012408ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012409if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012412
Matthias Kloseb9621712010-04-24 17:59:49 +000012413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12414$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012415 OLD_CFLAGS=$CFLAGS
12416 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012418/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012419
12420# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012421
Martin v. Löwis11437992002-04-12 09:54:03 +000012422int
12423main ()
12424{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012425
12426 char *name;
12427 struct hostent *he, *res;
12428 char buffer[2048];
12429 int buflen = 2048;
12430 int h_errnop;
12431
12432 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012433
12434 ;
12435 return 0;
12436}
12437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012438if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012439
Matthias Kloseb9621712010-04-24 17:59:49 +000012440 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012441
Martin v. Löwis11437992002-04-12 09:54:03 +000012442
Matthias Kloseb9621712010-04-24 17:59:49 +000012443$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012444
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12446$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012448else
Skip Montanaro6dead952003-09-25 14:50:04 +000012449
Matthias Kloseb9621712010-04-24 17:59:49 +000012450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12451$as_echo "no" >&6; }
12452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12453$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012455/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012456
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012457# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012458
Martin v. Löwis11437992002-04-12 09:54:03 +000012459int
12460main ()
12461{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012462
12463 char *name;
12464 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012465 char buffer[2048];
12466 int buflen = 2048;
12467 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012468
Matthias Kloseb159a552010-04-25 21:00:44 +000012469 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012470
12471 ;
12472 return 0;
12473}
12474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012476
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012478
Martin v. Löwis11437992002-04-12 09:54:03 +000012479
Matthias Kloseb159a552010-04-25 21:00:44 +000012480$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012481
Matthias Kloseb9621712010-04-24 17:59:49 +000012482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12483$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012485else
Skip Montanaro6dead952003-09-25 14:50:04 +000012486
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12490$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12492/* end confdefs.h. */
12493
12494# include <netdb.h>
12495
12496int
12497main ()
12498{
12499
12500 char *name;
12501 struct hostent *he;
12502 struct hostent_data data;
12503
12504 (void) gethostbyname_r(name, he, &data);
12505
12506 ;
12507 return 0;
12508}
12509_ACEOF
12510if ac_fn_c_try_compile "$LINENO"; then :
12511
12512 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12513
12514
12515$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12516
12517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12518$as_echo "yes" >&6; }
12519
12520else
12521
12522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12523$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012524
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012530
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012533 CFLAGS=$OLD_CFLAGS
12534
12535else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012536
Matthias Kloseb9621712010-04-24 17:59:49 +000012537 for ac_func in gethostbyname
12538do :
12539 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012540if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012541 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012542#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012543_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012544
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012545fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012546done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012547
Michael W. Hudson54241132001-12-07 15:38:26 +000012548
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012549fi
12550
Michael W. Hudson54241132001-12-07 15:38:26 +000012551
12552
12553
12554
12555
12556
Guido van Rossum627b2d71993-12-24 10:39:16 +000012557# checks for system services
12558# (none yet)
12559
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012560# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012561ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012562if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012563
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012564else
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12566$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012567if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012568 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012569else
Martin v. Löwis11437992002-04-12 09:54:03 +000012570 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012571LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575/* Override any GCC internal prototype to avoid an error.
12576 Use char because int might match the return type of a GCC
12577 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012578#ifdef __cplusplus
12579extern "C"
12580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012581char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012582int
12583main ()
12584{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012585return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 ;
12587 return 0;
12588}
12589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012590if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012591 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012592else
Matthias Kloseb9621712010-04-24 17:59:49 +000012593 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012595rm -f core conftest.err conftest.$ac_objext \
12596 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012597LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012598fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12600$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012601if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012602 cat >>confdefs.h <<_ACEOF
12603#define HAVE_LIBIEEE 1
12604_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012606 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607
Guido van Rossum627b2d71993-12-24 10:39:16 +000012608fi
12609
Michael W. Hudson54241132001-12-07 15:38:26 +000012610
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012611fi
12612
Michael W. Hudson54241132001-12-07 15:38:26 +000012613
Guido van Rossum7f253911997-05-09 02:42:48 +000012614# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12616$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012618# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012619if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012621if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012622then
12623
Matthias Kloseb9621712010-04-24 17:59:49 +000012624$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012625
Matthias Kloseb9621712010-04-24 17:59:49 +000012626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12627$as_echo "yes" >&6; }
12628else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12629$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012630fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012631else
Matthias Kloseb9621712010-04-24 17:59:49 +000012632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12633$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012634fi
12635
Guido van Rossum7f253911997-05-09 02:42:48 +000012636
Guido van Rossum7f43da71994-08-01 12:15:30 +000012637# check for --with-libm=...
12638
Guido van Rossum563e7081996-09-10 18:20:48 +000012639case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012640Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012641*) LIBM=-lm
12642esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12644$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012646# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012647if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012649if test "$withval" = no
12650then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12652$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012653elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012654then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12656$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012657else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012658fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012659else
Matthias Kloseb9621712010-04-24 17:59:49 +000012660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12661$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012662fi
12663
Guido van Rossum7f43da71994-08-01 12:15:30 +000012664
12665# check for --with-libc=...
12666
Matthias Kloseb9621712010-04-24 17:59:49 +000012667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12668$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012670# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012671if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012672 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012673if test "$withval" = no
12674then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12676$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012677elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012678then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12680$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012681else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012682fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012683else
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12685$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012686fi
12687
Guido van Rossum7f43da71994-08-01 12:15:30 +000012688
Stefan Krah1919b7e2012-03-21 18:25:23 +010012689# **************************************
12690# * Check for gcc x64 inline assembler *
12691# **************************************
12692
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12694$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12696/* end confdefs.h. */
12697
12698int
12699main ()
12700{
12701
12702 __asm__ __volatile__ ("movq %rcx, %rax");
12703
12704 ;
12705 return 0;
12706}
12707_ACEOF
12708if ac_fn_c_try_compile "$LINENO"; then :
12709 have_gcc_asm_for_x64=yes
12710else
12711 have_gcc_asm_for_x64=no
12712fi
12713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12715$as_echo "$have_gcc_asm_for_x64" >&6; }
12716if test "$have_gcc_asm_for_x64" = yes
12717then
12718
12719$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12720
12721fi
12722
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012723# **************************************************
12724# * Check for various properties of floating point *
12725# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012726
Matthias Kloseb9621712010-04-24 17:59:49 +000012727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12728$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012729if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012731else
12732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012734 ac_cv_little_endian_double=no
12735else
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012737/* end confdefs.h. */
12738
12739#include <string.h>
12740int main() {
12741 double x = 9006104071832581.0;
12742 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12743 return 0;
12744 else
12745 return 1;
12746}
12747
12748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012749if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012750 ac_cv_little_endian_double=yes
12751else
Matthias Kloseb9621712010-04-24 17:59:49 +000012752 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012756fi
12757
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012758fi
12759
Matthias Kloseb9621712010-04-24 17:59:49 +000012760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12761$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012762if test "$ac_cv_little_endian_double" = yes
12763then
12764
Matthias Kloseb9621712010-04-24 17:59:49 +000012765$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012766
12767fi
12768
Matthias Kloseb9621712010-04-24 17:59:49 +000012769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12770$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012771if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012773else
12774
Matthias Kloseb9621712010-04-24 17:59:49 +000012775if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012776 ac_cv_big_endian_double=no
12777else
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012779/* end confdefs.h. */
12780
12781#include <string.h>
12782int main() {
12783 double x = 9006104071832581.0;
12784 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12785 return 0;
12786 else
12787 return 1;
12788}
12789
12790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012791if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012792 ac_cv_big_endian_double=yes
12793else
Matthias Kloseb9621712010-04-24 17:59:49 +000012794 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12797 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012798fi
12799
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012800fi
12801
Matthias Kloseb9621712010-04-24 17:59:49 +000012802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12803$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012804if test "$ac_cv_big_endian_double" = yes
12805then
12806
Matthias Kloseb9621712010-04-24 17:59:49 +000012807$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012808
12809fi
12810
12811# Some ARM platforms use a mixed-endian representation for doubles.
12812# While Python doesn't currently have full support for these platforms
12813# (see e.g., issue 1762561), we can at least make sure that float <-> string
12814# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12816$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012817if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012819else
12820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012822 ac_cv_mixed_endian_double=no
12823else
Matthias Kloseb9621712010-04-24 17:59:49 +000012824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012825/* end confdefs.h. */
12826
12827#include <string.h>
12828int main() {
12829 double x = 9006104071832581.0;
12830 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12831 return 0;
12832 else
12833 return 1;
12834}
12835
12836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012837if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012838 ac_cv_mixed_endian_double=yes
12839else
Matthias Kloseb9621712010-04-24 17:59:49 +000012840 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12843 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012844fi
12845
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012846fi
12847
Matthias Kloseb9621712010-04-24 17:59:49 +000012848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12849$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012850if test "$ac_cv_mixed_endian_double" = yes
12851then
12852
Matthias Kloseb9621712010-04-24 17:59:49 +000012853$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012854
12855fi
12856
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012857# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012858# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012859# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012860# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012861# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012862# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012863
12864# This inline assembler syntax may also work for suncc and icc,
12865# so we try it on all platforms.
12866
Matthias Kloseb9621712010-04-24 17:59:49 +000012867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12868$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012870/* end confdefs.h. */
12871
12872int
12873main ()
12874{
12875
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012876 unsigned short cw;
12877 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12878 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012879
12880 ;
12881 return 0;
12882}
12883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012884if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012885 have_gcc_asm_for_x87=yes
12886else
Matthias Kloseb9621712010-04-24 17:59:49 +000012887 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012888fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12891$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012892if test "$have_gcc_asm_for_x87" = yes
12893then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012894
Matthias Kloseb9621712010-04-24 17:59:49 +000012895$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012896
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012897fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012898
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012899# Detect whether system arithmetic is subject to x87-style double
12900# rounding issues. The result of this test has little meaning on non
12901# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12902# mode is round-to-nearest and double rounding issues are present, and
12903# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12905$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012906# $BASECFLAGS may affect the result
12907ac_save_cc="$CC"
12908CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012909if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012910 ac_cv_x87_double_rounding=no
12911else
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012913/* end confdefs.h. */
12914
12915#include <stdlib.h>
12916#include <math.h>
12917int main() {
12918 volatile double x, y, z;
12919 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12920 x = 0.99999999999999989; /* 1-2**-53 */
12921 y = 1./x;
12922 if (y != 1.)
12923 exit(0);
12924 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12925 x = 1e16;
12926 y = 2.99999;
12927 z = x + y;
12928 if (z != 1e16+4.)
12929 exit(0);
12930 /* both tests show evidence of double rounding */
12931 exit(1);
12932}
12933
12934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012935if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012936 ac_cv_x87_double_rounding=no
12937else
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12941 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012942fi
12943
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012944CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12946$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012947if test "$ac_cv_x87_double_rounding" = yes
12948then
12949
Matthias Kloseb9621712010-04-24 17:59:49 +000012950$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012951
12952fi
12953
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012954# ************************************
12955# * Check for mathematical functions *
12956# ************************************
12957
12958LIBS_SAVE=$LIBS
12959LIBS="$LIBS $LIBM"
12960
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012961for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12962do :
12963 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12964ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012965if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012966 cat >>confdefs.h <<_ACEOF
12967#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12968_ACEOF
12969
12970fi
12971done
12972
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012973for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012974do :
12975 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12976ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012977if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012978 cat >>confdefs.h <<_ACEOF
12979#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12980_ACEOF
12981
12982fi
12983done
12984
12985ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12986"
Victor Stinnere0be4232011-10-25 13:06:09 +020012987if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012988 ac_have_decl=1
12989else
12990 ac_have_decl=0
12991fi
12992
12993cat >>confdefs.h <<_ACEOF
12994#define HAVE_DECL_ISINF $ac_have_decl
12995_ACEOF
12996ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
12997"
Victor Stinnere0be4232011-10-25 13:06:09 +020012998if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012999 ac_have_decl=1
13000else
13001 ac_have_decl=0
13002fi
13003
13004cat >>confdefs.h <<_ACEOF
13005#define HAVE_DECL_ISNAN $ac_have_decl
13006_ACEOF
13007ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13008"
Victor Stinnere0be4232011-10-25 13:06:09 +020013009if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013010 ac_have_decl=1
13011else
13012 ac_have_decl=0
13013fi
13014
13015cat >>confdefs.h <<_ACEOF
13016#define HAVE_DECL_ISFINITE $ac_have_decl
13017_ACEOF
13018
13019
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013020# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13021# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13023$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013024if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013025 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013026else
13027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013029 ac_cv_tanh_preserves_zero_sign=no
13030else
Matthias Kloseb9621712010-04-24 17:59:49 +000013031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013032/* end confdefs.h. */
13033
13034#include <math.h>
13035#include <stdlib.h>
13036int main() {
13037 /* return 0 if either negative zeros don't exist
13038 on this platform or if negative zeros exist
13039 and tanh(-0.) == -0. */
13040 if (atan2(0., -1.) == atan2(-0., -1.) ||
13041 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13042 else exit(1);
13043}
13044
13045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013046if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013047 ac_cv_tanh_preserves_zero_sign=yes
13048else
Matthias Kloseb9621712010-04-24 17:59:49 +000013049 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013050fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13052 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013053fi
13054
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013055fi
13056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13058$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013059if test "$ac_cv_tanh_preserves_zero_sign" = yes
13060then
13061
Matthias Kloseb9621712010-04-24 17:59:49 +000013062$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013063
13064fi
13065
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013066if test "$ac_cv_func_log1p" = yes
13067then
13068 # On some versions of AIX, log1p(-0.) returns 0. instead of
13069 # -0. See issue #9920.
13070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13071$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013072 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013073 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013074else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013075
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013076 if test "$cross_compiling" = yes; then :
13077 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013078else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13080/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013081
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013082 #include <math.h>
13083 #include <stdlib.h>
13084 int main() {
13085 /* Fail if the signs of log1p(-0.) and -0. can be
13086 distinguished. */
13087 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13088 return 0;
13089 else
13090 return 1;
13091 }
13092
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013093_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013094if ac_fn_c_try_run "$LINENO"; then :
13095 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013096else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013097 ac_cv_log1p_drops_zero_sign=yes
13098fi
13099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13100 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013101fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013102
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013103fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013104
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13106$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13107fi
13108if test "$ac_cv_log1p_drops_zero_sign" = yes
13109then
13110
13111$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13112
13113fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013114
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013115LIBS=$LIBS_SAVE
13116
Mark Dickinsona614f042009-11-28 12:48:43 +000013117# For multiprocessing module, check that sem_open
13118# actually works. For FreeBSD versions <= 7.2,
13119# the kernel module that provides POSIX semaphores
13120# isn't loaded by default, so an attempt to call
13121# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13123$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013124if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013126else
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013128 ac_cv_posix_semaphores_enabled=yes
13129else
Matthias Kloseb9621712010-04-24 17:59:49 +000013130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013131/* end confdefs.h. */
13132
13133#include <unistd.h>
13134#include <fcntl.h>
13135#include <stdio.h>
13136#include <semaphore.h>
13137#include <sys/stat.h>
13138
13139int main(void) {
13140 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13141 if (a == SEM_FAILED) {
13142 perror("sem_open");
13143 return 1;
13144 }
13145 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013146 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013147 return 0;
13148}
13149
13150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013151if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013152 ac_cv_posix_semaphores_enabled=yes
13153else
Matthias Kloseb9621712010-04-24 17:59:49 +000013154 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013158fi
13159
13160
Mark Dickinsona614f042009-11-28 12:48:43 +000013161fi
13162
Matthias Kloseb9621712010-04-24 17:59:49 +000013163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13164$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013165if test $ac_cv_posix_semaphores_enabled = no
13166then
13167
Matthias Kloseb9621712010-04-24 17:59:49 +000013168$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013169
13170fi
13171
Mark Dickinson10683072009-04-18 21:18:19 +000013172# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13174$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013175if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013177else
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013179 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013180else
Matthias Kloseb9621712010-04-24 17:59:49 +000013181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013182/* end confdefs.h. */
13183
13184#include <unistd.h>
13185#include <fcntl.h>
13186#include <stdio.h>
13187#include <semaphore.h>
13188#include <sys/stat.h>
13189
13190int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013191 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013192 int count;
13193 int res;
13194 if(a==SEM_FAILED){
13195 perror("sem_open");
13196 return 1;
13197
13198 }
13199 res = sem_getvalue(a, &count);
13200 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013201 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013202 return res==-1 ? 1 : 0;
13203}
13204
Mark Dickinson10683072009-04-18 21:18:19 +000013205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013206if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013207 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013208else
Matthias Kloseb9621712010-04-24 17:59:49 +000013209 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13212 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013213fi
13214
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013215
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013216fi
13217
Matthias Kloseb9621712010-04-24 17:59:49 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13219$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013220if test $ac_cv_broken_sem_getvalue = yes
13221then
13222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013224
13225fi
13226
Mark Dickinsonbd792642009-03-18 20:06:12 +000013227# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13229$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013230# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013231if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013232 enableval=$enable_big_digits; case $enable_big_digits in
13233yes)
13234 enable_big_digits=30 ;;
13235no)
13236 enable_big_digits=15 ;;
1323715|30)
13238 ;;
13239*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013240 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 +000013241esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13243$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013244
13245cat >>confdefs.h <<_ACEOF
13246#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13247_ACEOF
13248
13249
13250else
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13252$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013253fi
13254
13255
Guido van Rossumef2255b2000-03-10 22:30:29 +000013256# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013257ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013258if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013259
13260
Matthias Kloseb9621712010-04-24 17:59:49 +000013261$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013262
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013263 wchar_h="yes"
13264
Guido van Rossumef2255b2000-03-10 22:30:29 +000013265else
Martin v. Löwis11437992002-04-12 09:54:03 +000013266 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013267
13268fi
13269
Michael W. Hudson54241132001-12-07 15:38:26 +000013270
Martin v. Löwis11437992002-04-12 09:54:03 +000013271
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013272# determine wchar_t size
13273if test "$wchar_h" = yes
13274then
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013276# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13277# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13278# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13280$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013281if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013282 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013283else
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13285"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013286
Martin v. Löwis11437992002-04-12 09:54:03 +000013287else
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 if test "$ac_cv_type_wchar_t" = yes; then
13289 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13290$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013291as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013292See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013293 else
13294 ac_cv_sizeof_wchar_t=0
13295 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013297
Martin v. Löwis11437992002-04-12 09:54:03 +000013298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13300$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013301
13302
13303
Martin v. Löwis11437992002-04-12 09:54:03 +000013304cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013305#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013306_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013307
Michael W. Hudson54241132001-12-07 15:38:26 +000013308
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013309fi
13310
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13312$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013313have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013315/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013316
13317#include <tcl.h>
13318#if TCL_UTF_MAX != 6
13319# error "NOT UCS4_TCL"
13320#endif
13321int
13322main ()
13323{
13324
13325 ;
13326 return 0;
13327}
13328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013330
13331
Matthias Kloseb9621712010-04-24 17:59:49 +000013332$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013333
13334 have_ucs4_tcl=yes
13335
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13339$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013340
Skip Montanaro6dead952003-09-25 14:50:04 +000013341# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013342if test "$wchar_h" = yes
13343then
13344 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13346$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013347 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013349else
13350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013352 ac_cv_wchar_t_signed=yes
13353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013355/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013356
13357 #include <wchar.h>
13358 int main()
13359 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013360 /* Success: exit code 0 */
13361 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013362 }
13363
13364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013365if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013366 ac_cv_wchar_t_signed=yes
13367else
Matthias Kloseb9621712010-04-24 17:59:49 +000013368 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013369fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013370rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13371 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013372fi
13373
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013374fi
13375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13377$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378fi
13379
Georg Brandl52d168a2008-01-07 18:10:24 +000013380# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013381if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013382 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013383then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013384 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013385
Matthias Kloseb9621712010-04-24 17:59:49 +000013386$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013387
Georg Brandl52d168a2008-01-07 18:10:24 +000013388else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013389 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013390fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13392$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013393
13394# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13396$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013397if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013399else
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 ac_cv_c_bigendian=unknown
13401 # See if we're dealing with a universal compiler.
13402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13403/* end confdefs.h. */
13404#ifndef __APPLE_CC__
13405 not a universal capable compiler
13406 #endif
13407 typedef int dummy;
13408
Skip Montanaro6dead952003-09-25 14:50:04 +000013409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013410if ac_fn_c_try_compile "$LINENO"; then :
13411
13412 # Check for potential -arch flags. It is not universal unless
13413 # there are at least two -arch flags with different values.
13414 ac_arch=
13415 ac_prev=
13416 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13417 if test -n "$ac_prev"; then
13418 case $ac_word in
13419 i?86 | x86_64 | ppc | ppc64)
13420 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13421 ac_arch=$ac_word
13422 else
13423 ac_cv_c_bigendian=universal
13424 break
13425 fi
13426 ;;
13427 esac
13428 ac_prev=
13429 elif test "x$ac_word" = "x-arch"; then
13430 ac_prev=arch
13431 fi
13432 done
13433fi
13434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13435 if test $ac_cv_c_bigendian = unknown; then
13436 # See if sys/param.h defines the BYTE_ORDER macro.
13437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013438/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013439#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013441
Martin v. Löwis11437992002-04-12 09:54:03 +000013442int
13443main ()
13444{
Matthias Kloseb9621712010-04-24 17:59:49 +000013445#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13446 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13447 && LITTLE_ENDIAN)
13448 bogus endian macros
13449 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013450
13451 ;
13452 return 0;
13453}
13454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013455if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013456 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013458/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013459#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013460 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462int
13463main ()
13464{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013465#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013466 not big endian
13467 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013468
13469 ;
13470 return 0;
13471}
13472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013473if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013474 ac_cv_c_bigendian=yes
13475else
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013479fi
13480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13481 fi
13482 if test $ac_cv_c_bigendian = unknown; then
13483 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013485/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013486#include <limits.h>
13487
Martin v. Löwis11437992002-04-12 09:54:03 +000013488int
13489main ()
13490{
Matthias Kloseb9621712010-04-24 17:59:49 +000013491#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13492 bogus endian macros
13493 #endif
13494
Martin v. Löwis11437992002-04-12 09:54:03 +000013495 ;
13496 return 0;
13497}
13498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013499if ac_fn_c_try_compile "$LINENO"; then :
13500 # It does; now see whether it defined to _BIG_ENDIAN or not.
13501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13502/* end confdefs.h. */
13503#include <limits.h>
13504
13505int
13506main ()
13507{
13508#ifndef _BIG_ENDIAN
13509 not big endian
13510 #endif
13511
13512 ;
13513 return 0;
13514}
13515_ACEOF
13516if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013517 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013518else
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13522fi
13523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13524 fi
13525 if test $ac_cv_c_bigendian = unknown; then
13526 # Compile a test program.
13527 if test "$cross_compiling" = yes; then :
13528 # Try to guess by grepping values from an object file.
13529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13530/* end confdefs.h. */
13531short int ascii_mm[] =
13532 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13533 short int ascii_ii[] =
13534 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13535 int use_ascii (int i) {
13536 return ascii_mm[i] + ascii_ii[i];
13537 }
13538 short int ebcdic_ii[] =
13539 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13540 short int ebcdic_mm[] =
13541 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13542 int use_ebcdic (int i) {
13543 return ebcdic_mm[i] + ebcdic_ii[i];
13544 }
13545 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547int
13548main ()
13549{
13550return use_ascii (foo) == use_ebcdic (foo);
13551 ;
13552 return 0;
13553}
13554_ACEOF
13555if ac_fn_c_try_compile "$LINENO"; then :
13556 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13557 ac_cv_c_bigendian=yes
13558 fi
13559 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13560 if test "$ac_cv_c_bigendian" = unknown; then
13561 ac_cv_c_bigendian=no
13562 else
13563 # finding both strings is unlikely to happen, but who knows?
13564 ac_cv_c_bigendian=unknown
13565 fi
13566 fi
13567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013569else
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013571/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013572$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013573int
13574main ()
13575{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 /* Are we little or big endian? From Harbison&Steele. */
13578 union
13579 {
13580 long int l;
13581 char c[sizeof (long int)];
13582 } u;
13583 u.l = 1;
13584 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013585
13586 ;
13587 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013588}
Martin v. Löwis11437992002-04-12 09:54:03 +000013589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013590if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013591 ac_cv_c_bigendian=no
13592else
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13596 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013598
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13602$as_echo "$ac_cv_c_bigendian" >&6; }
13603 case $ac_cv_c_bigendian in #(
13604 yes)
13605 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13606;; #(
13607 no)
13608 ;; #(
13609 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 ;; #(
13614 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013615 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013616 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013617 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013618
Michael W. Hudson54241132001-12-07 15:38:26 +000013619
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013620# ABI version string for Python extension modules. This appears between the
13621# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13622# from the following attributes which affect the ABI of this Python build (in
13623# this order):
13624#
13625# * The Python implementation (always 'cpython-' for us)
13626# * The major and minor version numbers
13627# * --with-pydebug (adds a 'd')
13628# * --with-pymalloc (adds a 'm')
13629# * --with-wide-unicode (adds a 'u')
13630#
13631# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013632# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13633# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013634
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13636$as_echo_n "checking ABIFLAGS... " >&6; }
13637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13638$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13640$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013641SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13643$as_echo "$SOABI" >&6; }
13644
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13646$as_echo_n "checking LDVERSION... " >&6; }
13647LDVERSION='$(VERSION)$(ABIFLAGS)'
13648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13649$as_echo "$LDVERSION" >&6; }
13650
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013651# SO is the extension of shared libraries `(including the dot!)
13652# -- usually .so, .sl on HP-UX, .dll on Cygwin
13653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13654$as_echo_n "checking SO... " >&6; }
13655if test -z "$SO"
13656then
13657 case $ac_sys_system in
13658 hp*|HP*)
13659 case `uname -m` in
13660 ia64) SO=.so;;
13661 *) SO=.sl;;
13662 esac
13663 ;;
13664 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013665 Linux*|GNU*)
13666 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013667 *) SO=.so;;
13668 esac
13669else
13670 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013671 echo
13672 echo '====================================================================='
13673 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013674 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013675 echo '+ Do you really mean to change the extension for shared libraries? +'
13676 echo '+ Continuing in 10 seconds to let you to ponder. +'
13677 echo '+ +'
13678 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013679 sleep 10
13680fi
13681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13682$as_echo "$SO" >&6; }
13683
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013684# Check whether right shifting a negative integer extends the sign bit
13685# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13687$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013688if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013690else
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
Matthias Kloseb9621712010-04-24 17:59:49 +000013692if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013693 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013694else
Matthias Kloseb9621712010-04-24 17:59:49 +000013695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013696/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013697
13698int main()
13699{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013700 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013701}
13702
Martin v. Löwis11437992002-04-12 09:54:03 +000013703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013704if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013705 ac_cv_rshift_extends_sign=yes
13706else
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13710 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013711fi
13712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013713fi
13714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13716$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013717if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013718then
Martin v. Löwis11437992002-04-12 09:54:03 +000013719
Matthias Kloseb9621712010-04-24 17:59:49 +000013720$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013721
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013722fi
13723
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013724# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13726$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013727if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013729else
Martin v. Löwis11437992002-04-12 09:54:03 +000013730
Matthias Kloseb9621712010-04-24 17:59:49 +000013731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013732/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013733#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013734int
13735main ()
13736{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013737
13738 FILE *f = fopen("/dev/null", "r");
13739 flockfile(f);
13740 getc_unlocked(f);
13741 funlockfile(f);
13742
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 ;
13744 return 0;
13745}
13746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013747if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013748 ac_cv_have_getc_unlocked=yes
13749else
Matthias Kloseb9621712010-04-24 17:59:49 +000013750 ac_cv_have_getc_unlocked=no
13751fi
13752rm -f core conftest.err conftest.$ac_objext \
13753 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755
Matthias Kloseb9621712010-04-24 17:59:49 +000013756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13757$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013758if test "$ac_cv_have_getc_unlocked" = yes
13759then
Martin v. Löwis11437992002-04-12 09:54:03 +000013760
Matthias Kloseb9621712010-04-24 17:59:49 +000013761$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013762
13763fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013764
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013765# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013766# save the value of LIBS so we don't actually link Python with readline
13767LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013768
Gregory P. Smith18820942008-09-07 06:24:49 +000013769# On some systems we need to link readline to a termcap compatible
13770# library. NOTE: Keep the precedence of listed libraries synchronised
13771# with setup.py.
13772py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13774$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013775for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013776 if test -z "$py_libtermcap"; then
13777 READLINE_LIBS="-lreadline"
13778 else
13779 READLINE_LIBS="-lreadline -l$py_libtermcap"
13780 fi
13781 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013783/* end confdefs.h. */
13784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013785/* Override any GCC internal prototype to avoid an error.
13786 Use char because int might match the return type of a GCC
13787 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013788#ifdef __cplusplus
13789extern "C"
13790#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013791char readline ();
13792int
13793main ()
13794{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013796 ;
13797 return 0;
13798}
13799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013800if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013801 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013803rm -f core conftest.err conftest.$ac_objext \
13804 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013805 if test $py_cv_lib_readline = yes; then
13806 break
13807 fi
13808done
13809# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13810#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013811if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13813$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013814else
Matthias Kloseb9621712010-04-24 17:59:49 +000013815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13816$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013817
Matthias Kloseb9621712010-04-24 17:59:49 +000013818$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013819
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013820fi
13821
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013822# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13824$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013825if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013827else
13828 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013829LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013831/* end confdefs.h. */
13832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833/* Override any GCC internal prototype to avoid an error.
13834 Use char because int might match the return type of a GCC
13835 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013836#ifdef __cplusplus
13837extern "C"
13838#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013839char rl_callback_handler_install ();
13840int
13841main ()
13842{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013843return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013844 ;
13845 return 0;
13846}
13847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013848if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013849 ac_cv_lib_readline_rl_callback_handler_install=yes
13850else
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013853rm -f core conftest.err conftest.$ac_objext \
13854 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013855LIBS=$ac_check_lib_save_LIBS
13856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13858$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013859if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013860
Matthias Kloseb9621712010-04-24 17:59:49 +000013861$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013862
13863fi
13864
13865
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013866# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013868/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013869#include <readline/readline.h>
13870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013871if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013872 have_readline=yes
13873else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013874 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013875
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013876fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013877rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013878if test $have_readline = yes
13879then
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013881/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013882#include <readline/readline.h>
13883
13884_ACEOF
13885if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013886 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013887
Matthias Kloseb9621712010-04-24 17:59:49 +000013888$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013889
13890fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013891rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013892
Matthias Kloseb9621712010-04-24 17:59:49 +000013893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013894/* end confdefs.h. */
13895#include <readline/readline.h>
13896
13897_ACEOF
13898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013899 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013900
Matthias Kloseb9621712010-04-24 17:59:49 +000013901$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013902
13903fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013904rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013905
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013906fi
13907
Martin v. Löwis0daad592001-09-30 21:09:59 +000013908# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13910$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013911if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013913else
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013915LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013917/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013918
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919/* Override any GCC internal prototype to avoid an error.
13920 Use char because int might match the return type of a GCC
13921 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013922#ifdef __cplusplus
13923extern "C"
13924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013925char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013926int
13927main ()
13928{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013929return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013930 ;
13931 return 0;
13932}
13933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013934if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013936else
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013939rm -f core conftest.err conftest.$ac_objext \
13940 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013941LIBS=$ac_check_lib_save_LIBS
13942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13944$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013945if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013948
Martin v. Löwis0daad592001-09-30 21:09:59 +000013949fi
13950
Michael W. Hudson54241132001-12-07 15:38:26 +000013951
Thomas Wouters89d996e2007-09-08 17:39:28 +000013952# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13954$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013955if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013957else
13958 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013959LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013961/* end confdefs.h. */
13962
13963/* Override any GCC internal prototype to avoid an error.
13964 Use char because int might match the return type of a GCC
13965 builtin and then its argument prototype would still apply. */
13966#ifdef __cplusplus
13967extern "C"
13968#endif
13969char rl_completion_display_matches_hook ();
13970int
13971main ()
13972{
13973return rl_completion_display_matches_hook ();
13974 ;
13975 return 0;
13976}
13977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013978if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013979 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13980else
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013983rm -f core conftest.err conftest.$ac_objext \
13984 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013985LIBS=$ac_check_lib_save_LIBS
13986fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13988$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013989if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000013992
13993fi
13994
13995
Martin v. Löwis0daad592001-09-30 21:09:59 +000013996# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13998$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013999if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014001else
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014003LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014007/* Override any GCC internal prototype to avoid an error.
14008 Use char because int might match the return type of a GCC
14009 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014010#ifdef __cplusplus
14011extern "C"
14012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014013char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014014int
14015main ()
14016{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014017return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 ;
14019 return 0;
14020}
14021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014022if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014023 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014024else
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014027rm -f core conftest.err conftest.$ac_objext \
14028 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014029LIBS=$ac_check_lib_save_LIBS
14030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14032$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014033if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014034
Matthias Kloseb9621712010-04-24 17:59:49 +000014035$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014036
Guido van Rossum353ae582001-07-10 16:45:32 +000014037fi
14038
Jack Jansendd19cf82001-12-06 22:36:17 +000014039
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014040# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014042/* end confdefs.h. */
14043#include <readline/readline.h>
14044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014045if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014046 have_readline=yes
14047else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014048 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014049
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014050fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014051rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014052if test $have_readline = yes
14053then
Matthias Kloseb9621712010-04-24 17:59:49 +000014054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014055/* end confdefs.h. */
14056#include <readline/readline.h>
14057
14058_ACEOF
14059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014060 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014061
Matthias Kloseb9621712010-04-24 17:59:49 +000014062$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014063
14064fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014065rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014066
14067fi
14068
Martin v. Löwis82bca632006-02-10 20:49:30 +000014069# End of readline checks: restore LIBS
14070LIBS=$LIBS_no_readline
14071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14073$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014074if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014076else
Martin v. Löwis11437992002-04-12 09:54:03 +000014077
Matthias Kloseb9621712010-04-24 17:59:49 +000014078if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014079 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014080else
Matthias Kloseb9621712010-04-24 17:59:49 +000014081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014082/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014083
14084int main()
14085{
14086 int val1 = nice(1);
14087 if (val1 != -1 && val1 == nice(2))
14088 exit(0);
14089 exit(1);
14090}
14091
Martin v. Löwis11437992002-04-12 09:54:03 +000014092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014093if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014094 ac_cv_broken_nice=yes
14095else
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14099 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014100fi
14101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014102fi
14103
Matthias Kloseb9621712010-04-24 17:59:49 +000014104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14105$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014106if test "$ac_cv_broken_nice" = yes
14107then
Martin v. Löwis11437992002-04-12 09:54:03 +000014108
Matthias Kloseb9621712010-04-24 17:59:49 +000014109$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014110
14111fi
14112
Matthias Kloseb9621712010-04-24 17:59:49 +000014113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14114$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014115if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014116 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014117else
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014119 ac_cv_broken_poll=no
14120else
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014122/* end confdefs.h. */
14123
14124#include <poll.h>
14125
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014126int main()
14127{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014128 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014129 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014130
14131 close (42);
14132
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014133 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014134 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014135 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014136 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014137 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014138 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014139 return 1;
14140}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014141
14142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014143if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014144 ac_cv_broken_poll=yes
14145else
Matthias Kloseb9621712010-04-24 17:59:49 +000014146 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14149 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014152fi
14153
Matthias Kloseb9621712010-04-24 17:59:49 +000014154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14155$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014156if test "$ac_cv_broken_poll" = yes
14157then
14158
Matthias Kloseb9621712010-04-24 17:59:49 +000014159$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014160
14161fi
14162
Brett Cannon43802422005-02-10 20:48:03 +000014163# 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 +000014164# (which is not required by ISO C or UNIX spec) and/or if we support
14165# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014166ac_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 +000014167#include <$ac_cv_struct_tm>
14168
Matthias Kloseb9621712010-04-24 17:59:49 +000014169"
Victor Stinnere0be4232011-10-25 13:06:09 +020014170if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014171
14172cat >>confdefs.h <<_ACEOF
14173#define HAVE_STRUCT_TM_TM_ZONE 1
14174_ACEOF
14175
14176
14177fi
14178
14179if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14180
Matthias Kloseb9621712010-04-24 17:59:49 +000014181$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014182
14183else
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14185"
Victor Stinnere0be4232011-10-25 13:06:09 +020014186if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014188else
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190fi
14191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014192cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014193#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014194_ACEOF
14195
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14197$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014198if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200else
Matthias Kloseb9621712010-04-24 17:59:49 +000014201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014202/* end confdefs.h. */
14203#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014204#if !HAVE_DECL_TZNAME
14205extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014206#endif
14207
14208int
14209main ()
14210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014211return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014212 ;
14213 return 0;
14214}
14215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014216if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014217 ac_cv_var_tzname=yes
14218else
Matthias Kloseb9621712010-04-24 17:59:49 +000014219 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014221rm -f core conftest.err conftest.$ac_objext \
14222 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14225$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014226 if test $ac_cv_var_tzname = yes; then
14227
Matthias Kloseb9621712010-04-24 17:59:49 +000014228$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014229
14230 fi
14231fi
14232
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014233
Martin v. Löwis1d459062005-03-14 21:23:33 +000014234# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14236$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014237if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014239else
14240
Matthias Kloseb9621712010-04-24 17:59:49 +000014241if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014242 ac_cv_working_tzset=no
14243else
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014245/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014246
14247#include <stdlib.h>
14248#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014249#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014250
14251#if HAVE_TZNAME
14252extern char *tzname[];
14253#endif
14254
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014255int main()
14256{
Brett Cannon18367812003-09-19 00:59:16 +000014257 /* Note that we need to ensure that not only does tzset(3)
14258 do 'something' with localtime, but it works as documented
14259 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014260 This includes making sure that tzname is set properly if
14261 tm->tm_zone does not exist since it is the alternative way
14262 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014263
14264 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014265 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014266 */
14267
Martin v. Löwis1d459062005-03-14 21:23:33 +000014268 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014269 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14270
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014271 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014272 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014273 if (localtime(&groundhogday)->tm_hour != 0)
14274 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014275#if HAVE_TZNAME
14276 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14277 if (strcmp(tzname[0], "UTC") ||
14278 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14279 exit(1);
14280#endif
Brett Cannon18367812003-09-19 00:59:16 +000014281
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014282 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014283 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014284 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014285 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014286#if HAVE_TZNAME
14287 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14288 exit(1);
14289#endif
Brett Cannon18367812003-09-19 00:59:16 +000014290
14291 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14292 tzset();
14293 if (localtime(&groundhogday)->tm_hour != 11)
14294 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014295#if HAVE_TZNAME
14296 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14297 exit(1);
14298#endif
14299
14300#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014301 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14302 exit(1);
14303 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14304 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014305#endif
Brett Cannon18367812003-09-19 00:59:16 +000014306
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014307 exit(0);
14308}
14309
14310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014311if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014312 ac_cv_working_tzset=yes
14313else
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014318fi
14319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014320fi
14321
Matthias Kloseb9621712010-04-24 17:59:49 +000014322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14323$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014324if test "$ac_cv_working_tzset" = yes
14325then
14326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014328
14329fi
14330
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014331# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14333$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014334if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014336else
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014338/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014339#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014340int
14341main ()
14342{
14343
14344struct stat st;
14345st.st_mtim.tv_nsec = 1;
14346
14347 ;
14348 return 0;
14349}
14350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014352 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014353else
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014355fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14357fi
14358
Matthias Kloseb9621712010-04-24 17:59:49 +000014359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14360$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014361if test "$ac_cv_stat_tv_nsec" = yes
14362then
14363
Matthias Kloseb9621712010-04-24 17:59:49 +000014364$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014365
14366fi
14367
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014368# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14370$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014371if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014373else
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014375/* end confdefs.h. */
14376#include <sys/stat.h>
14377int
14378main ()
14379{
14380
14381struct stat st;
14382st.st_mtimespec.tv_nsec = 1;
14383
14384 ;
14385 return 0;
14386}
14387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014389 ac_cv_stat_tv_nsec2=yes
14390else
Matthias Kloseb9621712010-04-24 17:59:49 +000014391 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14394fi
14395
Matthias Kloseb9621712010-04-24 17:59:49 +000014396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14397$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014398if test "$ac_cv_stat_tv_nsec2" = yes
14399then
14400
Matthias Kloseb9621712010-04-24 17:59:49 +000014401$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014402
14403fi
14404
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014405ac_save_cppflags="$CPPFLAGS"
14406CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014407# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14409$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014410if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014412else
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014414/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014415#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014416int
14417main ()
14418{
Jack Jansen666b1e72001-10-31 12:11:48 +000014419
14420 int rtn;
14421 rtn = mvwdelch(0,0,0);
14422
Martin v. Löwis11437992002-04-12 09:54:03 +000014423 ;
14424 return 0;
14425}
14426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014427if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014428 ac_cv_mvwdelch_is_expression=yes
14429else
Matthias Kloseb9621712010-04-24 17:59:49 +000014430 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14433fi
14434
Matthias Kloseb9621712010-04-24 17:59:49 +000014435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14436$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014437
14438if test "$ac_cv_mvwdelch_is_expression" = yes
14439then
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
Matthias Kloseb9621712010-04-24 17:59:49 +000014441$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014442
14443fi
14444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14446$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014447if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014449else
Matthias Kloseb9621712010-04-24 17:59:49 +000014450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014451/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014452#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014453int
14454main ()
14455{
Jack Jansen666b1e72001-10-31 12:11:48 +000014456
14457 WINDOW *w;
14458 w->_flags = 0;
14459
Martin v. Löwis11437992002-04-12 09:54:03 +000014460 ;
14461 return 0;
14462}
14463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014464if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014465 ac_cv_window_has_flags=yes
14466else
Matthias Kloseb9621712010-04-24 17:59:49 +000014467 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14470fi
14471
Matthias Kloseb9621712010-04-24 17:59:49 +000014472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14473$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014474
Jack Jansen666b1e72001-10-31 12:11:48 +000014475
14476if test "$ac_cv_window_has_flags" = yes
14477then
Martin v. Löwis11437992002-04-12 09:54:03 +000014478
Matthias Kloseb9621712010-04-24 17:59:49 +000014479$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014480
14481fi
14482
Matthias Kloseb9621712010-04-24 17:59:49 +000014483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14484$as_echo_n "checking for is_term_resized... " >&6; }
14485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014486/* end confdefs.h. */
14487#include <curses.h>
14488int
14489main ()
14490{
14491void *x=is_term_resized
14492 ;
14493 return 0;
14494}
14495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014496if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014499
Matthias Kloseb159a552010-04-25 21:00:44 +000014500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014501$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014502else
Matthias Kloseb9621712010-04-24 17:59:49 +000014503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14504$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014505
14506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14508
Matthias Kloseb9621712010-04-24 17:59:49 +000014509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14510$as_echo_n "checking for resize_term... " >&6; }
14511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014512/* end confdefs.h. */
14513#include <curses.h>
14514int
14515main ()
14516{
14517void *x=resize_term
14518 ;
14519 return 0;
14520}
14521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014522if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014523
Matthias Kloseb9621712010-04-24 17:59:49 +000014524$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014525
Matthias Kloseb159a552010-04-25 21:00:44 +000014526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014527$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014528else
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14530$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014531
14532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14534
Matthias Kloseb9621712010-04-24 17:59:49 +000014535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14536$as_echo_n "checking for resizeterm... " >&6; }
14537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014538/* end confdefs.h. */
14539#include <curses.h>
14540int
14541main ()
14542{
14543void *x=resizeterm
14544 ;
14545 return 0;
14546}
14547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014548if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014549
Matthias Kloseb9621712010-04-24 17:59:49 +000014550$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014551
Matthias Kloseb159a552010-04-25 21:00:44 +000014552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014553$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014554else
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14556$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014557
14558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014560# last curses configure check
14561CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14564$as_echo "$as_me: checking for device files" >&6;}
14565
14566if test "x$cross_compiling" = xyes; then
14567 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14569$as_echo_n "checking for /dev/ptmx... " >&6; }
14570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14571$as_echo "not set" >&6; }
14572 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14573 fi
14574 if test "${ac_cv_file__dev_ptc+set}" != set; then
14575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14576$as_echo_n "checking for /dev/ptc... " >&6; }
14577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14578$as_echo "not set" >&6; }
14579 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14580 fi
14581fi
14582
Matthias Kloseb9621712010-04-24 17:59:49 +000014583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14584$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014585if ${ac_cv_file__dev_ptmx+:} false; then :
14586 $as_echo_n "(cached) " >&6
14587else
14588 test "$cross_compiling" = yes &&
14589 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14590if test -r "/dev/ptmx"; then
14591 ac_cv_file__dev_ptmx=yes
14592else
14593 ac_cv_file__dev_ptmx=no
14594fi
14595fi
14596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14597$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14598if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014599
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014600fi
14601
14602if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014603
Matthias Kloseb9621712010-04-24 17:59:49 +000014604$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014605
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14608$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014609if ${ac_cv_file__dev_ptc+:} false; then :
14610 $as_echo_n "(cached) " >&6
14611else
14612 test "$cross_compiling" = yes &&
14613 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14614if test -r "/dev/ptc"; then
14615 ac_cv_file__dev_ptc=yes
14616else
14617 ac_cv_file__dev_ptc=no
14618fi
14619fi
14620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14621$as_echo "$ac_cv_file__dev_ptc" >&6; }
14622if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014623
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014624fi
14625
14626if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014627
Matthias Kloseb9621712010-04-24 17:59:49 +000014628$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014629
Neal Norwitz865400f2003-03-21 01:42:58 +000014630fi
14631
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014632if test "$have_long_long" = yes
14633then
Matthias Kloseb9621712010-04-24 17:59:49 +000014634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14635$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014636 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014638else
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014640 ac_cv_have_long_long_format="cross -- assuming no"
14641 if test x$GCC = xyes; then
14642 save_CFLAGS=$CFLAGS
14643 CFLAGS="$CFLAGS -Werror -Wformat"
14644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14645/* end confdefs.h. */
14646
14647 #include <stdio.h>
14648 #include <stddef.h>
14649
14650int
14651main ()
14652{
14653
14654 char *buffer;
14655 sprintf(buffer, "%lld", (long long)123);
14656 sprintf(buffer, "%lld", (long long)-123);
14657 sprintf(buffer, "%llu", (unsigned long long)123);
14658
14659 ;
14660 return 0;
14661}
14662_ACEOF
14663if ac_fn_c_try_compile "$LINENO"; then :
14664 ac_cv_have_long_long_format=yes
14665
14666fi
14667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14668 CFLAGS=$save_CFLAGS
14669 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014670else
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014672/* end confdefs.h. */
14673
14674 #include <stdio.h>
14675 #include <stddef.h>
14676 #include <string.h>
14677
14678 #ifdef HAVE_SYS_TYPES_H
14679 #include <sys/types.h>
14680 #endif
14681
14682 int main()
14683 {
14684 char buffer[256];
14685
14686 if (sprintf(buffer, "%lld", (long long)123) < 0)
14687 return 1;
14688 if (strcmp(buffer, "123"))
14689 return 1;
14690
14691 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14692 return 1;
14693 if (strcmp(buffer, "-123"))
14694 return 1;
14695
14696 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14697 return 1;
14698 if (strcmp(buffer, "123"))
14699 return 1;
14700
14701 return 0;
14702 }
14703
14704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014705if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014706 ac_cv_have_long_long_format=yes
14707else
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14711 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014712fi
14713
14714
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014715fi
14716
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14718$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014719fi
14720
Mark Dickinson89d7d412009-12-31 20:50:59 +000014721if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014722then
14723
Matthias Kloseb9621712010-04-24 17:59:49 +000014724$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014725
14726fi
14727
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014728if test $ac_sys_system = Darwin
14729then
14730 LIBS="$LIBS -framework CoreFoundation"
14731fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014732
Matthias Kloseb9621712010-04-24 17:59:49 +000014733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14734$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014735if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014737else
Matthias Kloseb9621712010-04-24 17:59:49 +000014738 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014739 ac_cv_have_size_t_format="cross -- assuming yes"
14740
Thomas Wouters477c8d52006-05-27 19:21:47 +000014741else
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014743/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014744
Thomas Wouters477c8d52006-05-27 19:21:47 +000014745#include <stdio.h>
14746#include <stddef.h>
14747#include <string.h>
14748
Christian Heimes2c181612007-12-17 20:04:13 +000014749#ifdef HAVE_SYS_TYPES_H
14750#include <sys/types.h>
14751#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014752
14753#ifdef HAVE_SSIZE_T
14754typedef ssize_t Py_ssize_t;
14755#elif SIZEOF_VOID_P == SIZEOF_LONG
14756typedef long Py_ssize_t;
14757#else
14758typedef int Py_ssize_t;
14759#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014760
Christian Heimes2c181612007-12-17 20:04:13 +000014761int main()
14762{
14763 char buffer[256];
14764
Thomas Wouters477c8d52006-05-27 19:21:47 +000014765 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14766 return 1;
14767
Thomas Wouters89f507f2006-12-13 04:49:30 +000014768 if (strcmp(buffer, "123"))
14769 return 1;
14770
14771 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14772 return 1;
14773
14774 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014775 return 1;
14776
14777 return 0;
14778}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014779
Thomas Wouters477c8d52006-05-27 19:21:47 +000014780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014781if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014782 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014783else
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014786rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14787 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014788fi
14789
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14792$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014793if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014794
Matthias Kloseb9621712010-04-24 17:59:49 +000014795$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014796
14797fi
14798
Matthias Kloseb9621712010-04-24 17:59:49 +000014799ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014800#ifdef HAVE_SYS_TYPES_H
14801#include <sys/types.h>
14802#endif
14803#ifdef HAVE_SYS_SOCKET_H
14804#include <sys/socket.h>
14805#endif
14806
Matthias Kloseb9621712010-04-24 17:59:49 +000014807"
Victor Stinnere0be4232011-10-25 13:06:09 +020014808if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014809
Martin v. Löwis11437992002-04-12 09:54:03 +000014810else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014811
Matthias Kloseb9621712010-04-24 17:59:49 +000014812$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014813
14814fi
14815
Michael W. Hudson54241132001-12-07 15:38:26 +000014816
Matthias Kloseb9621712010-04-24 17:59:49 +000014817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14818$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014819if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014821else
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014823 ac_cv_broken_mbstowcs=no
14824else
Matthias Kloseb9621712010-04-24 17:59:49 +000014825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014826/* end confdefs.h. */
14827
14828#include<stdlib.h>
14829int main() {
14830 size_t len = -1;
14831 const char *str = "text";
14832 len = mbstowcs(NULL, str, 0);
14833 return (len != 4);
14834}
14835
14836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014837if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014838 ac_cv_broken_mbstowcs=no
14839else
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14843 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014844fi
14845
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014846fi
14847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14849$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014850if test "$ac_cv_broken_mbstowcs" = yes
14851then
14852
Matthias Kloseb9621712010-04-24 17:59:49 +000014853$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014854
14855fi
14856
Antoine Pitroub52ec782009-01-25 16:34:23 +000014857# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14859$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014860
14861# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014862if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014863 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014864if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014865then
14866
Matthias Kloseb9621712010-04-24 17:59:49 +000014867$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014868
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14870$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014871fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014872if test "$withval" = no
14873then
14874
14875$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14876
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14878$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014879fi
14880
Antoine Pitrou042b1282010-08-13 21:15:58 +000014881else
14882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14883$as_echo "no value specified" >&6; }
14884fi
14885
Antoine Pitroub52ec782009-01-25 16:34:23 +000014886
Matthias Kloseb17289e2012-03-15 19:51:34 +010014887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14888$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14889if ${ac_cv_computed_gotos+:} false; then :
14890 $as_echo_n "(cached) " >&6
14891else
14892 if test "$cross_compiling" = yes; then :
14893 if test "${with_computed_gotos+set}" = set; then
14894 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14895 else
14896 ac_cv_computed_gotos=no
14897 fi
14898else
14899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14900/* end confdefs.h. */
14901
14902int main(int argc, char **argv)
14903{
14904 static void *targets[1] = { &&LABEL1 };
14905 goto LABEL2;
14906LABEL1:
14907 return 0;
14908LABEL2:
14909 goto *targets[0];
14910 return 1;
14911}
14912
14913_ACEOF
14914if ac_fn_c_try_run "$LINENO"; then :
14915 ac_cv_computed_gotos=yes
14916else
14917 ac_cv_computed_gotos=no
14918fi
14919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14920 conftest.$ac_objext conftest.beam conftest.$ac_ext
14921fi
14922
14923fi
14924
14925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14926$as_echo "$ac_cv_computed_gotos" >&6; }
14927case "$ac_cv_computed_gotos" in yes*)
14928
14929$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14930
14931esac
14932
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014933case $ac_sys_system in
14934AIX*)
14935
14936$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14937 ;;
14938esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014939
Michael W. Hudson54241132001-12-07 15:38:26 +000014940
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014941
14942
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014943for h in `(cd $srcdir;echo Python/thread_*.h)`
14944do
14945 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14946done
14947
Michael W. Hudson54241132001-12-07 15:38:26 +000014948
Neal Norwitzd24499d2005-12-18 21:36:39 +000014949SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14951$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014952for dir in $SRCDIRS; do
14953 if test ! -d $dir; then
14954 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014955 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014956done
Matthias Kloseb9621712010-04-24 17:59:49 +000014957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14958$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014959
Stefan Krah1919b7e2012-03-21 18:25:23 +010014960# Availability of -O2:
14961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14962$as_echo_n "checking for -O2... " >&6; }
14963saved_cflags="$CFLAGS"
14964CFLAGS="-O2"
14965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14966/* end confdefs.h. */
14967
14968int
14969main ()
14970{
14971
14972
14973 ;
14974 return 0;
14975}
14976_ACEOF
14977if ac_fn_c_try_compile "$LINENO"; then :
14978 have_O2=yes
14979else
14980 have_O2=no
14981fi
14982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14984$as_echo "$have_O2" >&6; }
14985CFLAGS="$saved_cflags"
14986
14987# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14988# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14990$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14991saved_cflags="$CFLAGS"
14992CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
14993if test "$have_O2" = no; then
14994 CFLAGS=""
14995fi
14996if test "$cross_compiling" = yes; then :
14997 have_glibc_memmove_bug=undefined
14998else
14999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15000/* end confdefs.h. */
15001
15002#include <stdio.h>
15003#include <stdlib.h>
15004#include <string.h>
15005void foo(void *p, void *q) { memmove(p, q, 19); }
15006int main() {
15007 char a[32] = "123456789000000000";
15008 foo(&a[9], a);
15009 if (strcmp(a, "123456789123456789000000000") != 0)
15010 return 1;
15011 foo(a, &a[9]);
15012 if (strcmp(a, "123456789000000000") != 0)
15013 return 1;
15014 return 0;
15015}
15016
15017_ACEOF
15018if ac_fn_c_try_run "$LINENO"; then :
15019 have_glibc_memmove_bug=no
15020else
15021 have_glibc_memmove_bug=yes
15022fi
15023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15024 conftest.$ac_objext conftest.beam conftest.$ac_ext
15025fi
15026
15027CFLAGS="$saved_cflags"
15028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15029$as_echo "$have_glibc_memmove_bug" >&6; }
15030if test "$have_glibc_memmove_bug" = yes; then
15031
15032$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15033
15034fi
15035
15036if test "$have_gcc_asm_for_x87" = yes; then
15037 # Some versions of gcc miscompile inline asm:
15038 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15039 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15040 case $CC in
15041 *gcc*)
15042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15043$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15044 saved_cflags="$CFLAGS"
15045 CFLAGS="-O2"
15046 if test "$cross_compiling" = yes; then :
15047 have_ipa_pure_const_bug=undefined
15048else
15049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15050/* end confdefs.h. */
15051
15052 __attribute__((noinline)) int
15053 foo(int *p) {
15054 int r;
15055 asm ( "movl \$6, (%1)\n\t"
15056 "xorl %0, %0\n\t"
15057 : "=r" (r) : "r" (p) : "memory"
15058 );
15059 return r;
15060 }
15061 int main() {
15062 int p = 8;
15063 if ((foo(&p) ? : p) != 6)
15064 return 1;
15065 return 0;
15066 }
15067
15068_ACEOF
15069if ac_fn_c_try_run "$LINENO"; then :
15070 have_ipa_pure_const_bug=no
15071else
15072 have_ipa_pure_const_bug=yes
15073fi
15074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15075 conftest.$ac_objext conftest.beam conftest.$ac_ext
15076fi
15077
15078 CFLAGS="$saved_cflags"
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15080$as_echo "$have_ipa_pure_const_bug" >&6; }
15081 if test "$have_ipa_pure_const_bug" = yes; then
15082
15083$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15084
15085 fi
15086 ;;
15087 esac
15088fi
15089
Guido van Rossum627b2d71993-12-24 10:39:16 +000015090# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015091ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015092
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015093ac_config_files="$ac_config_files Modules/ld_so_aix"
15094
Martin v. Löwis11437992002-04-12 09:54:03 +000015095cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015096# This file is a shell script that caches the results of configure
15097# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015098# scripts and configure runs, see configure's option --config-cache.
15099# It is not useful on other systems. If it contains results you don't
15100# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015101#
Martin v. Löwis11437992002-04-12 09:54:03 +000015102# config.status only pays attention to the cache file if you give it
15103# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015104#
Skip Montanaro6dead952003-09-25 14:50:04 +000015105# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015106# loading this file, other *unset* `ac_cv_foo' will be assigned the
15107# following values.
15108
15109_ACEOF
15110
Guido van Rossumf78abae1997-01-21 22:02:36 +000015111# The following way of writing the cache mishandles newlines in values,
15112# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015114# Ultrix sh set writes to stderr and can't be redirected directly,
15115# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116(
15117 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15118 eval ac_val=\$$ac_var
15119 case $ac_val in #(
15120 *${as_nl}*)
15121 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15123$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015124 esac
15125 case $ac_var in #(
15126 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015127 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15128 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129 esac ;;
15130 esac
15131 done
15132
Martin v. Löwis11437992002-04-12 09:54:03 +000015133 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015134 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15135 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015136 # `set' does not quote correctly, so add quotes: double-quote
15137 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015138 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015139 "s/'/'\\\\''/g;
15140 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015142 *)
15143 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015146 esac |
15147 sort
15148) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015153 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15154 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015155 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15156 :end' >>confcache
15157if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15158 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015159 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015160 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15161$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015162 if test ! -f "$cache_file" || test -h "$cache_file"; then
15163 cat confcache >"$cache_file"
15164 else
15165 case $cache_file in #(
15166 */* | ?:*)
15167 mv -f confcache "$cache_file"$$ &&
15168 mv -f "$cache_file"$$ "$cache_file" ;; #(
15169 *)
15170 mv -f confcache "$cache_file" ;;
15171 esac
15172 fi
15173 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015174 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15176$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015177 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015178fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015179rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015180
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015181test "x$prefix" = xNONE && prefix=$ac_default_prefix
15182# Let make expand exec_prefix.
15183test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015184
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015185DEFS=-DHAVE_CONFIG_H
15186
Skip Montanaro6dead952003-09-25 14:50:04 +000015187ac_libobjs=
15188ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015189U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015190for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15191 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015193 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15195 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015196 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15197 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015198done
15199LIBOBJS=$ac_libobjs
15200
15201LTLIBOBJS=$ac_ltlibobjs
15202
15203
Martin v. Löwis11437992002-04-12 09:54:03 +000015204
Matthias Kloseb9621712010-04-24 17:59:49 +000015205
Victor Stinnere0be4232011-10-25 13:06:09 +020015206: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015207ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015208ac_clean_files_save=$ac_clean_files
15209ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015210{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15211$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15212as_write_fail=0
15213cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015214#! $SHELL
15215# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015216# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015217# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015218# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015219
Martin v. Löwis11437992002-04-12 09:54:03 +000015220debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015221ac_cs_recheck=false
15222ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015223
Matthias Kloseb9621712010-04-24 17:59:49 +000015224SHELL=\${CONFIG_SHELL-$SHELL}
15225export SHELL
15226_ASEOF
15227cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15228## -------------------- ##
15229## M4sh Initialization. ##
15230## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015231
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015232# Be more Bourne compatible
15233DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015234if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 emulate sh
15236 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015237 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015238 # is contrary to our usage. Disable this feature.
15239 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015241else
Matthias Kloseb9621712010-04-24 17:59:49 +000015242 case `(set -o) 2>/dev/null` in #(
15243 *posix*) :
15244 set -o posix ;; #(
15245 *) :
15246 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015248fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015249
15250
Matthias Kloseb9621712010-04-24 17:59:49 +000015251as_nl='
15252'
15253export as_nl
15254# Printing a long string crashes Solaris 7 /usr/bin/printf.
15255as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15256as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15257as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15258# Prefer a ksh shell builtin over an external printf program on Solaris,
15259# but without wasting forks for bash or zsh.
15260if test -z "$BASH_VERSION$ZSH_VERSION" \
15261 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15262 as_echo='print -r --'
15263 as_echo_n='print -rn --'
15264elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15265 as_echo='printf %s\n'
15266 as_echo_n='printf %s'
15267else
15268 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15269 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15270 as_echo_n='/usr/ucb/echo -n'
15271 else
15272 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15273 as_echo_n_body='eval
15274 arg=$1;
15275 case $arg in #(
15276 *"$as_nl"*)
15277 expr "X$arg" : "X\\(.*\\)$as_nl";
15278 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15279 esac;
15280 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15281 '
15282 export as_echo_n_body
15283 as_echo_n='sh -c $as_echo_n_body as_echo'
15284 fi
15285 export as_echo_body
15286 as_echo='sh -c $as_echo_body as_echo'
15287fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015288
15289# The user is always right.
15290if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015291 PATH_SEPARATOR=:
15292 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15293 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15294 PATH_SEPARATOR=';'
15295 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015298
15299# IFS
15300# We need space, tab and new line, in precisely that order. Quoting is
15301# there to prevent editors from complaining about space-tab.
15302# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15303# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304IFS=" "" $as_nl"
15305
15306# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015307as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015308case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015309 *[\\/]* ) as_myself=$0 ;;
15310 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015311for as_dir in $PATH
15312do
15313 IFS=$as_save_IFS
15314 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015315 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15316 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319 ;;
15320esac
15321# We did not find ourselves, most probably we were run as `sh COMMAND'
15322# in which case we are not to be found in the path.
15323if test "x$as_myself" = x; then
15324 as_myself=$0
15325fi
15326if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15328 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329fi
15330
Matthias Kloseb9621712010-04-24 17:59:49 +000015331# Unset variables that we do not need and which cause bugs (e.g. in
15332# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15333# suppresses any "Segmentation fault" message there. '((' could
15334# trigger a bug in pdksh 5.2.14.
15335for as_var in BASH_ENV ENV MAIL MAILPATH
15336do eval test x\${$as_var+set} = xset \
15337 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015338done
15339PS1='$ '
15340PS2='> '
15341PS4='+ '
15342
15343# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015344LC_ALL=C
15345export LC_ALL
15346LANGUAGE=C
15347export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348
Matthias Kloseb9621712010-04-24 17:59:49 +000015349# CDPATH.
15350(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15351
15352
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015353# as_fn_error STATUS ERROR [LINENO LOG_FD]
15354# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015355# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15356# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015357# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015358as_fn_error ()
15359{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015360 as_status=$1; test $as_status -eq 0 && as_status=1
15361 if test "$4"; then
15362 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15363 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015364 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015365 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 as_fn_exit $as_status
15367} # as_fn_error
15368
15369
15370# as_fn_set_status STATUS
15371# -----------------------
15372# Set $? to STATUS, without forking.
15373as_fn_set_status ()
15374{
15375 return $1
15376} # as_fn_set_status
15377
15378# as_fn_exit STATUS
15379# -----------------
15380# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15381as_fn_exit ()
15382{
15383 set +e
15384 as_fn_set_status $1
15385 exit $1
15386} # as_fn_exit
15387
15388# as_fn_unset VAR
15389# ---------------
15390# Portably unset VAR.
15391as_fn_unset ()
15392{
15393 { eval $1=; unset $1;}
15394}
15395as_unset=as_fn_unset
15396# as_fn_append VAR VALUE
15397# ----------------------
15398# Append the text in VALUE to the end of the definition contained in VAR. Take
15399# advantage of any shell optimizations that allow amortized linear growth over
15400# repeated appends, instead of the typical quadratic growth present in naive
15401# implementations.
15402if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15403 eval 'as_fn_append ()
15404 {
15405 eval $1+=\$2
15406 }'
15407else
15408 as_fn_append ()
15409 {
15410 eval $1=\$$1\$2
15411 }
15412fi # as_fn_append
15413
15414# as_fn_arith ARG...
15415# ------------------
15416# Perform arithmetic evaluation on the ARGs, and store the result in the
15417# global $as_val. Take advantage of shells that can avoid forks. The arguments
15418# must be portable across $(()) and expr.
15419if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15420 eval 'as_fn_arith ()
15421 {
15422 as_val=$(( $* ))
15423 }'
15424else
15425 as_fn_arith ()
15426 {
15427 as_val=`expr "$@" || test $? -eq 1`
15428 }
15429fi # as_fn_arith
15430
15431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015432if expr a : '\(a\)' >/dev/null 2>&1 &&
15433 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15434 as_expr=expr
15435else
15436 as_expr=false
15437fi
15438
15439if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15440 as_basename=basename
15441else
15442 as_basename=false
15443fi
15444
Matthias Kloseb9621712010-04-24 17:59:49 +000015445if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15446 as_dirname=dirname
15447else
15448 as_dirname=false
15449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015451as_me=`$as_basename -- "$0" ||
15452$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15453 X"$0" : 'X\(//\)$' \| \
15454 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015455$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015456 sed '/^.*\/\([^/][^/]*\)\/*$/{
15457 s//\1/
15458 q
15459 }
15460 /^X\/\(\/\/\)$/{
15461 s//\1/
15462 q
15463 }
15464 /^X\/\(\/\).*/{
15465 s//\1/
15466 q
15467 }
15468 s/.*/./; q'`
15469
Matthias Kloseb9621712010-04-24 17:59:49 +000015470# Avoid depending upon Character Ranges.
15471as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15472as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15473as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15474as_cr_digits='0123456789'
15475as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476
15477ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015478case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015479-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015480 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015481 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015482 xy) ECHO_C='\c';;
15483 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15484 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015485 esac;;
15486*)
15487 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015488esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015489
Martin v. Löwis11437992002-04-12 09:54:03 +000015490rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015491if test -d conf$$.dir; then
15492 rm -f conf$$.dir/conf$$.file
15493else
15494 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015495 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015497if (echo >conf$$.file) 2>/dev/null; then
15498 if ln -s conf$$.file conf$$ 2>/dev/null; then
15499 as_ln_s='ln -s'
15500 # ... but there are two gotchas:
15501 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15502 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015503 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015504 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015505 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015506 elif ln conf$$.file conf$$ 2>/dev/null; then
15507 as_ln_s=ln
15508 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015509 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015510 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015511else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015512 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015516
Matthias Kloseb9621712010-04-24 17:59:49 +000015517
15518# as_fn_mkdir_p
15519# -------------
15520# Create "$as_dir" as a directory, including parents if necessary.
15521as_fn_mkdir_p ()
15522{
15523
15524 case $as_dir in #(
15525 -*) as_dir=./$as_dir;;
15526 esac
15527 test -d "$as_dir" || eval $as_mkdir_p || {
15528 as_dirs=
15529 while :; do
15530 case $as_dir in #(
15531 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15532 *) as_qdir=$as_dir;;
15533 esac
15534 as_dirs="'$as_qdir' $as_dirs"
15535 as_dir=`$as_dirname -- "$as_dir" ||
15536$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15537 X"$as_dir" : 'X\(//\)[^/]' \| \
15538 X"$as_dir" : 'X\(//\)$' \| \
15539 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15540$as_echo X"$as_dir" |
15541 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15542 s//\1/
15543 q
15544 }
15545 /^X\(\/\/\)[^/].*/{
15546 s//\1/
15547 q
15548 }
15549 /^X\(\/\/\)$/{
15550 s//\1/
15551 q
15552 }
15553 /^X\(\/\).*/{
15554 s//\1/
15555 q
15556 }
15557 s/.*/./; q'`
15558 test -d "$as_dir" && break
15559 done
15560 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015561 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015562
15563
15564} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015565if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015566 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015567else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015568 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015569 as_mkdir_p=false
15570fi
15571
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015572
15573# as_fn_executable_p FILE
15574# -----------------------
15575# Test if FILE is an executable regular file.
15576as_fn_executable_p ()
15577{
15578 test -f "$1" && test -x "$1"
15579} # as_fn_executable_p
15580as_test_x='test -x'
15581as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015582
15583# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015584as_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 +000015585
15586# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015587as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015588
15589
Martin v. Löwis11437992002-04-12 09:54:03 +000015590exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015591## ----------------------------------- ##
15592## Main body of $CONFIG_STATUS script. ##
15593## ----------------------------------- ##
15594_ASEOF
15595test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015596
Matthias Kloseb9621712010-04-24 17:59:49 +000015597cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15598# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015599# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015600# values after options handling.
15601ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015602This file was extended by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015603generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015604
15605 CONFIG_FILES = $CONFIG_FILES
15606 CONFIG_HEADERS = $CONFIG_HEADERS
15607 CONFIG_LINKS = $CONFIG_LINKS
15608 CONFIG_COMMANDS = $CONFIG_COMMANDS
15609 $ $0 $@
15610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611on `(hostname || uname -n) 2>/dev/null | sed 1q`
15612"
15613
Martin v. Löwis11437992002-04-12 09:54:03 +000015614_ACEOF
15615
Matthias Kloseb9621712010-04-24 17:59:49 +000015616case $ac_config_files in *"
15617"*) set x $ac_config_files; shift; ac_config_files=$*;;
15618esac
15619
15620case $ac_config_headers in *"
15621"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15622esac
15623
15624
15625cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015626# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015627config_files="$ac_config_files"
15628config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015630_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015631
Matthias Kloseb9621712010-04-24 17:59:49 +000015632cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015633ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015634\`$as_me' instantiates files and other configuration actions
15635from templates according to the current configuration. Unless the files
15636and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015639
15640 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015641 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015642 --config print configuration, then exit
15643 -q, --quiet, --silent
15644 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015645 -d, --debug don't remove temporary files
15646 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015647 --file=FILE[:TEMPLATE]
15648 instantiate the configuration file FILE
15649 --header=FILE[:TEMPLATE]
15650 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015651
15652Configuration files:
15653$config_files
15654
15655Configuration headers:
15656$config_headers
15657
Matthias Kloseb9621712010-04-24 17:59:49 +000015658Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015661cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15662ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015663ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015664python config.status 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015665configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015666 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015667
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015668Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015669This config.status script is free software; the Free Software Foundation
15670gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015671
15672ac_pwd='$ac_pwd'
15673srcdir='$srcdir'
15674INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015675MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015676test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015677_ACEOF
15678
Matthias Kloseb9621712010-04-24 17:59:49 +000015679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15680# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015681ac_need_defaults=:
15682while test $# != 0
15683do
15684 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015685 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015686 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15687 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015688 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015689 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015690 --*=)
15691 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15692 ac_optarg=
15693 ac_shift=:
15694 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015695 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015696 ac_option=$1
15697 ac_optarg=$2
15698 ac_shift=shift
15699 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015700 esac
15701
Skip Montanaro6dead952003-09-25 14:50:04 +000015702 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015703 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015704 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15705 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015706 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015707 $as_echo "$ac_cs_version"; exit ;;
15708 --config | --confi | --conf | --con | --co | --c )
15709 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 debug=: ;;
15712 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015713 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015714 case $ac_optarg in
15715 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015716 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015717 esac
15718 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 ac_need_defaults=false;;
15720 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015721 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015722 case $ac_optarg in
15723 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15724 esac
15725 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015726 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015727 --he | --h)
15728 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015729 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015730Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015731 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015733 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15734 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15735 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015736
15737 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015738 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015739Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015740
Matthias Kloseb9621712010-04-24 17:59:49 +000015741 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015743
15744 esac
15745 shift
15746done
15747
Skip Montanaro6dead952003-09-25 14:50:04 +000015748ac_configure_extra_args=
15749
15750if $ac_cs_silent; then
15751 exec 6>/dev/null
15752 ac_configure_extra_args="$ac_configure_extra_args --silent"
15753fi
15754
15755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015756cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015757if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015758 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015759 shift
15760 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15761 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015764fi
15765
Martin v. Löwis11437992002-04-12 09:54:03 +000015766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015767cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015768exec 5>>config.log
15769{
15770 echo
15771 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15772## Running $as_me. ##
15773_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015774 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015778cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015779_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015780
Matthias Kloseb9621712010-04-24 17:59:49 +000015781cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015782
15783# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015784for ac_config_target in $ac_config_targets
15785do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015786 case $ac_config_target in
15787 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15788 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15789 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015790 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15791 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15793 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015794 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015795 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015796
Victor Stinnere0be4232011-10-25 13:06:09 +020015797 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015798 esac
15799done
15800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015801
Martin v. Löwis11437992002-04-12 09:54:03 +000015802# If the user did not use the arguments to specify the items to instantiate,
15803# then the envvar interface is used. Set only those that are not.
15804# We use the long form for the default assignment because of an extremely
15805# bizarre bug on SunOS 4.1.3.
15806if $ac_need_defaults; then
15807 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15808 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15809fi
15810
Skip Montanaro6dead952003-09-25 14:50:04 +000015811# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015813# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814# Hook for its removal unless debugging.
15815# Note that there is a small window in which the directory will not be cleaned:
15816# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015817$debug ||
15818{
Victor Stinnere0be4232011-10-25 13:06:09 +020015819 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015820 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015821 : "${ac_tmp:=$tmp}"
15822 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015823' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015824 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015825}
Martin v. Löwis11437992002-04-12 09:54:03 +000015826# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015827
Martin v. Löwis11437992002-04-12 09:54:03 +000015828{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015830 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015831} ||
15832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833 tmp=./conf$$-$RANDOM
15834 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015835} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015836ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015837
Matthias Kloseb9621712010-04-24 17:59:49 +000015838# Set up the scripts for CONFIG_FILES section.
15839# No need to generate them if there are no CONFIG_FILES.
15840# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015841if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015842
Matthias Kloseb9621712010-04-24 17:59:49 +000015843
15844ac_cr=`echo X | tr X '\015'`
15845# On cygwin, bash can eat \r inside `` if the user requested igncr.
15846# But we know of no other shell where ac_cr would be empty at this
15847# point, so we can use a bashism as a fallback.
15848if test "x$ac_cr" = x; then
15849 eval ac_cr=\$\'\\r\'
15850fi
15851ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15852if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015853 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015854else
15855 ac_cs_awk_cr=$ac_cr
15856fi
15857
Victor Stinnere0be4232011-10-25 13:06:09 +020015858echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015859_ACEOF
15860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015861
Matthias Kloseb9621712010-04-24 17:59:49 +000015862{
15863 echo "cat >conf$$subs.awk <<_ACEOF" &&
15864 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15865 echo "_ACEOF"
15866} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015867 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15868ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015869ac_delim='%!_!# '
15870for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015871 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015872 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015873
Matthias Kloseb9621712010-04-24 17:59:49 +000015874 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15875 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015876 break
15877 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015878 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015879 else
15880 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015881 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015882done
Matthias Kloseb9621712010-04-24 17:59:49 +000015883rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015884
Matthias Kloseb9621712010-04-24 17:59:49 +000015885cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015886cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015888sed -n '
15889h
15890s/^/S["/; s/!.*/"]=/
15891p
15892g
15893s/^[^!]*!//
15894:repl
15895t repl
15896s/'"$ac_delim"'$//
15897t delim
15898:nl
15899h
15900s/\(.\{148\}\)..*/\1/
15901t more1
15902s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15903p
15904n
15905b repl
15906:more1
15907s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15908p
15909g
15910s/.\{148\}//
15911t nl
15912:delim
15913h
15914s/\(.\{148\}\)..*/\1/
15915t more2
15916s/["\\]/\\&/g; s/^/"/; s/$/"/
15917p
15918b
15919:more2
15920s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15921p
15922g
15923s/.\{148\}//
15924t delim
15925' <conf$$subs.awk | sed '
15926/^[^""]/{
15927 N
15928 s/\n//
15929}
15930' >>$CONFIG_STATUS || ac_write_fail=1
15931rm -f conf$$subs.awk
15932cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15933_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015934cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015935 for (key in S) S_is_set[key] = 1
15936 FS = ""
15937
15938}
15939{
15940 line = $ 0
15941 nfields = split(line, field, "@")
15942 substed = 0
15943 len = length(field[1])
15944 for (i = 2; i < nfields; i++) {
15945 key = field[i]
15946 keylen = length(key)
15947 if (S_is_set[key]) {
15948 value = S[key]
15949 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15950 len += length(value) + length(field[++i])
15951 substed = 1
15952 } else
15953 len += 1 + keylen
15954 }
15955
15956 print line
15957}
15958
15959_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015961cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15962if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15963 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15964else
15965 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015966fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015967 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015968_ACEOF
15969
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015970# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15971# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015972# trailing colons and then remove the whole line if VPATH becomes empty
15973# (actually we leave an empty line to preserve line numbers).
15974if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015975 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15976h
15977s///
15978s/^/:/
15979s/[ ]*$/:/
15980s/:\$(srcdir):/:/g
15981s/:\${srcdir}:/:/g
15982s/:@srcdir@:/:/g
15983s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015984s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015985x
15986s/\(=[ ]*\).*/\1/
15987G
15988s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015989s/^[^=]*=[ ]*$//
15990}'
15991fi
15992
Matthias Kloseb9621712010-04-24 17:59:49 +000015993cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015994fi # test -n "$CONFIG_FILES"
15995
Matthias Kloseb9621712010-04-24 17:59:49 +000015996# Set up the scripts for CONFIG_HEADERS section.
15997# No need to generate them if there are no CONFIG_HEADERS.
15998# This happens for instance with `./config.status Makefile'.
15999if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016000cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016001BEGIN {
16002_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016003
Matthias Kloseb9621712010-04-24 17:59:49 +000016004# Transform confdefs.h into an awk script `defines.awk', embedded as
16005# here-document in config.status, that substitutes the proper values into
16006# config.h.in to produce config.h.
16007
16008# Create a delimiter string that does not exist in confdefs.h, to ease
16009# handling of long lines.
16010ac_delim='%!_!# '
16011for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016012 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16013 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016014 break
16015 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016016 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016017 else
16018 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16019 fi
16020done
16021
16022# For the awk script, D is an array of macro values keyed by name,
16023# likewise P contains macro parameters if any. Preserve backslash
16024# newline sequences.
16025
16026ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16027sed -n '
16028s/.\{148\}/&'"$ac_delim"'/g
16029t rset
16030:rset
16031s/^[ ]*#[ ]*define[ ][ ]*/ /
16032t def
16033d
16034:def
16035s/\\$//
16036t bsnl
16037s/["\\]/\\&/g
16038s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16039D["\1"]=" \3"/p
16040s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16041d
16042:bsnl
16043s/["\\]/\\&/g
16044s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16045D["\1"]=" \3\\\\\\n"\\/p
16046t cont
16047s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16048t cont
16049d
16050:cont
16051n
16052s/.\{148\}/&'"$ac_delim"'/g
16053t clear
16054:clear
16055s/\\$//
16056t bsnlc
16057s/["\\]/\\&/g; s/^/"/; s/$/"/p
16058d
16059:bsnlc
16060s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16061b cont
16062' <confdefs.h | sed '
16063s/'"$ac_delim"'/"\\\
16064"/g' >>$CONFIG_STATUS || ac_write_fail=1
16065
16066cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16067 for (key in D) D_is_set[key] = 1
16068 FS = ""
16069}
16070/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16071 line = \$ 0
16072 split(line, arg, " ")
16073 if (arg[1] == "#") {
16074 defundef = arg[2]
16075 mac1 = arg[3]
16076 } else {
16077 defundef = substr(arg[1], 2)
16078 mac1 = arg[2]
16079 }
16080 split(mac1, mac2, "(") #)
16081 macro = mac2[1]
16082 prefix = substr(line, 1, index(line, defundef) - 1)
16083 if (D_is_set[macro]) {
16084 # Preserve the white space surrounding the "#".
16085 print prefix "define", macro P[macro] D[macro]
16086 next
16087 } else {
16088 # Replace #undef with comments. This is necessary, for example,
16089 # in the case of _POSIX_SOURCE, which is predefined and required
16090 # on some systems where configure will not decide to define it.
16091 if (defundef == "undef") {
16092 print "/*", prefix defundef, macro, "*/"
16093 next
16094 }
16095 }
16096}
16097{ print }
16098_ACAWK
16099_ACEOF
16100cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016101 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016102fi # test -n "$CONFIG_HEADERS"
16103
16104
16105eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16106shift
16107for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016108do
16109 case $ac_tag in
16110 :[FHLC]) ac_mode=$ac_tag; continue;;
16111 esac
16112 case $ac_mode$ac_tag in
16113 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016114 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016115 :[FH]-) ac_tag=-:-;;
16116 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16117 esac
16118 ac_save_IFS=$IFS
16119 IFS=:
16120 set x $ac_tag
16121 IFS=$ac_save_IFS
16122 shift
16123 ac_file=$1
16124 shift
16125
16126 case $ac_mode in
16127 :L) ac_source=$1;;
16128 :[FH])
16129 ac_file_inputs=
16130 for ac_f
16131 do
16132 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016133 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016134 *) # Look for the file first in the build tree, then in the source tree
16135 # (if the path is not absolute). The absolute path cannot be DOS-style,
16136 # because $ac_f cannot contain `:'.
16137 test -f "$ac_f" ||
16138 case $ac_f in
16139 [\\/$]*) false;;
16140 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16141 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016142 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016143 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016144 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16145 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016146 done
16147
16148 # Let's still pretend it is `configure' which instantiates (i.e., don't
16149 # use $as_me), people would be surprised to read:
16150 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016151 configure_input='Generated from '`
16152 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16153 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016154 if test x"$ac_file" != x-; then
16155 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016156 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16157$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016158 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016159 # Neutralize special characters interpreted by sed in replacement strings.
16160 case $configure_input in #(
16161 *\&* | *\|* | *\\* )
16162 ac_sed_conf_input=`$as_echo "$configure_input" |
16163 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16164 *) ac_sed_conf_input=$configure_input;;
16165 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016166
16167 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016168 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16169 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016170 esac
16171 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016172 esac
16173
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016174 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016175$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016176 X"$ac_file" : 'X\(//\)[^/]' \| \
16177 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016179$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16181 s//\1/
16182 q
16183 }
16184 /^X\(\/\/\)[^/].*/{
16185 s//\1/
16186 q
16187 }
16188 /^X\(\/\/\)$/{
16189 s//\1/
16190 q
16191 }
16192 /^X\(\/\).*/{
16193 s//\1/
16194 q
16195 }
16196 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016197 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016198 ac_builddir=.
16199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016200case "$ac_dir" in
16201.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16202*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016203 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016205 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016206 case $ac_top_builddir_sub in
16207 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16208 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16209 esac ;;
16210esac
16211ac_abs_top_builddir=$ac_pwd
16212ac_abs_builddir=$ac_pwd$ac_dir_suffix
16213# for backward compatibility:
16214ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016215
16216case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016217 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016219 ac_top_srcdir=$ac_top_builddir_sub
16220 ac_abs_top_srcdir=$ac_pwd ;;
16221 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016223 ac_top_srcdir=$srcdir
16224 ac_abs_top_srcdir=$srcdir ;;
16225 *) # Relative name.
16226 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16227 ac_top_srcdir=$ac_top_build_prefix$srcdir
16228 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016229esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016231
Martin v. Löwis11437992002-04-12 09:54:03 +000016232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233 case $ac_mode in
16234 :F)
16235 #
16236 # CONFIG_FILE
16237 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016238
16239 case $INSTALL in
16240 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016241 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016242 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016243 ac_MKDIR_P=$MKDIR_P
16244 case $MKDIR_P in
16245 [\\/$]* | ?:[\\/]* ) ;;
16246 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16247 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016248_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016249
Matthias Kloseb9621712010-04-24 17:59:49 +000016250cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251# If the template does not know about datarootdir, expand it.
16252# FIXME: This hack should be removed a few years after 2.60.
16253ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016254ac_sed_dataroot='
16255/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256 p
16257 q
16258}
16259/@datadir@/p
16260/@docdir@/p
16261/@infodir@/p
16262/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016263/@mandir@/p'
16264case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016265*datarootdir*) ac_datarootdir_seen=yes;;
16266*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016267 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16268$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016270cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271 ac_datarootdir_hack='
16272 s&@datadir@&$datadir&g
16273 s&@docdir@&$docdir&g
16274 s&@infodir@&$infodir&g
16275 s&@localedir@&$localedir&g
16276 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016277 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278esac
16279_ACEOF
16280
16281# Neutralize VPATH when `$srcdir' = `.'.
16282# Shell code in configure.ac might set extrasub.
16283# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016284cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16285ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016286$extrasub
16287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016288cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016289:t
16290/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016291s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016293s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016294s&@srcdir@&$ac_srcdir&;t t
16295s&@abs_srcdir@&$ac_abs_srcdir&;t t
16296s&@top_srcdir@&$ac_top_srcdir&;t t
16297s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16298s&@builddir@&$ac_builddir&;t t
16299s&@abs_builddir@&$ac_abs_builddir&;t t
16300s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16301s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016302s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016303$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016304"
Victor Stinnere0be4232011-10-25 13:06:09 +020016305eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16306 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016309 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16310 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16311 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016312 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016313which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016314$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016315which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016316
Victor Stinnere0be4232011-10-25 13:06:09 +020016317 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016318 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016319 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16320 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016321 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016322 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016323 ;;
16324 :H)
16325 #
16326 # CONFIG_HEADER
16327 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016329 {
16330 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016331 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16332 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016333 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016334 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016335 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16336$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016337 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016338 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016339 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016340 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016341 fi
16342 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016343 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016344 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016345 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016347 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349
16350 esac
16351
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016352
16353 case $ac_file$ac_mode in
16354 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16355
16356 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016357done # for ac_tag
16358
Guido van Rossum627b2d71993-12-24 10:39:16 +000016359
Matthias Kloseb9621712010-04-24 17:59:49 +000016360as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016361_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016362ac_clean_files=$ac_clean_files_save
16363
Matthias Kloseb9621712010-04-24 17:59:49 +000016364test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016365 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016366
Martin v. Löwis11437992002-04-12 09:54:03 +000016367
16368# configure is writing to config.log, and then calls config.status.
16369# config.status does its own redirection, appending to config.log.
16370# Unfortunately, on DOS this fails, as config.log is still kept open
16371# by configure, so config.status won't be able to write to it; its
16372# output is simply discarded. So we exec the FD to /dev/null,
16373# effectively closing config.log, so it can be properly (re)opened and
16374# appended to by config.status. When coming back to configure, we
16375# need to make the FD available again.
16376if test "$no_create" != yes; then
16377 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016378 ac_config_status_args=
16379 test "$silent" = yes &&
16380 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016382 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016383 exec 5>>config.log
16384 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16385 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016386 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016387fi
16388if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16390$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016391fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016392
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016393
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016394echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016395if test ! -f Modules/Setup
16396then
16397 cp $srcdir/Modules/Setup.dist Modules/Setup
16398fi
16399
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016400echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016401if test ! -f Modules/Setup.local
16402then
16403 echo "# Edit this file for local setup changes" >Modules/Setup.local
16404fi
16405
16406echo "creating Makefile"
16407$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16408 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016409 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016410mv config.c Modules