blob: 534c8df4168bedfae762109117c2dddbb6da3ded [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
Stefan Krah7dba5942012-11-22 22:49:11 +01006565#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006566#include <pthread.h>
6567
6568void* routine(void* p){return NULL;}
6569
6570int main(){
6571 pthread_t p;
6572 if(pthread_create(&p,NULL,routine,NULL)!=0)
6573 return 1;
6574 (void)pthread_detach(p);
6575 return 0;
6576}
6577
6578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006579if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006580
6581 ac_cv_pthread_is_default=yes
6582 ac_cv_kthread=no
6583 ac_cv_pthread=no
6584
6585else
Matthias Kloseb9621712010-04-24 17:59:49 +00006586 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6589 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006590fi
6591
6592
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006593fi
6594
Matthias Kloseb9621712010-04-24 17:59:49 +00006595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6596$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006597
6598
6599if test $ac_cv_pthread_is_default = yes
6600then
6601 ac_cv_kpthread=no
6602else
6603# -Kpthread, if available, provides the right #defines
6604# and linker options to make pthread_create available
6605# Some compilers won't report that they do not support -Kpthread,
6606# so we need to run a program to see whether it really made the
6607# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6609$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006610if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006611 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006612else
6613 ac_save_cc="$CC"
6614CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006615if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006616 ac_cv_kpthread=no
6617else
Matthias Kloseb9621712010-04-24 17:59:49 +00006618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006619/* end confdefs.h. */
6620
Stefan Krah7dba5942012-11-22 22:49:11 +01006621#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006622#include <pthread.h>
6623
6624void* routine(void* p){return NULL;}
6625
6626int main(){
6627 pthread_t p;
6628 if(pthread_create(&p,NULL,routine,NULL)!=0)
6629 return 1;
6630 (void)pthread_detach(p);
6631 return 0;
6632}
6633
6634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006635if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006636 ac_cv_kpthread=yes
6637else
Matthias Kloseb9621712010-04-24 17:59:49 +00006638 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6641 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006642fi
6643
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644CC="$ac_save_cc"
6645fi
6646
Matthias Kloseb9621712010-04-24 17:59:49 +00006647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6648$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006649fi
6650
6651if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6652then
6653# -Kthread, if available, provides the right #defines
6654# and linker options to make pthread_create available
6655# Some compilers won't report that they do not support -Kthread,
6656# so we need to run a program to see whether it really made the
6657# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6659$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006660if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006661 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006662else
6663 ac_save_cc="$CC"
6664CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006665if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006666 ac_cv_kthread=no
6667else
Matthias Kloseb9621712010-04-24 17:59:49 +00006668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006669/* end confdefs.h. */
6670
Stefan Krah7dba5942012-11-22 22:49:11 +01006671#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006672#include <pthread.h>
6673
6674void* routine(void* p){return NULL;}
6675
6676int main(){
6677 pthread_t p;
6678 if(pthread_create(&p,NULL,routine,NULL)!=0)
6679 return 1;
6680 (void)pthread_detach(p);
6681 return 0;
6682}
6683
6684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006685if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686 ac_cv_kthread=yes
6687else
Matthias Kloseb9621712010-04-24 17:59:49 +00006688 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6691 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006692fi
6693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006694CC="$ac_save_cc"
6695fi
6696
Matthias Kloseb9621712010-04-24 17:59:49 +00006697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6698$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699fi
6700
6701if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6702then
6703# -pthread, if available, provides the right #defines
6704# and linker options to make pthread_create available
6705# Some compilers won't report that they do not support -pthread,
6706# so we need to run a program to see whether it really made the
6707# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6709$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006710if ${ac_cv_thread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006711 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006712else
6713 ac_save_cc="$CC"
6714CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006715if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716 ac_cv_pthread=no
6717else
Matthias Kloseb9621712010-04-24 17:59:49 +00006718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006719/* end confdefs.h. */
6720
Stefan Krah7dba5942012-11-22 22:49:11 +01006721#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006722#include <pthread.h>
6723
6724void* routine(void* p){return NULL;}
6725
6726int main(){
6727 pthread_t p;
6728 if(pthread_create(&p,NULL,routine,NULL)!=0)
6729 return 1;
6730 (void)pthread_detach(p);
6731 return 0;
6732}
6733
6734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006735if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736 ac_cv_pthread=yes
6737else
Matthias Kloseb9621712010-04-24 17:59:49 +00006738 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6741 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006742fi
6743
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006744CC="$ac_save_cc"
6745fi
6746
Matthias Kloseb9621712010-04-24 17:59:49 +00006747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6748$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749fi
6750
6751# If we have set a CC compiler flag for thread support then
6752# check if it works for CXX, too.
6753ac_cv_cxx_thread=no
6754if test ! -z "$CXX"
6755then
Matthias Kloseb9621712010-04-24 17:59:49 +00006756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6757$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006758ac_save_cxx="$CXX"
6759
6760if test "$ac_cv_kpthread" = "yes"
6761then
6762 CXX="$CXX -Kpthread"
6763 ac_cv_cxx_thread=yes
6764elif test "$ac_cv_kthread" = "yes"
6765then
6766 CXX="$CXX -Kthread"
6767 ac_cv_cxx_thread=yes
6768elif test "$ac_cv_pthread" = "yes"
6769then
6770 CXX="$CXX -pthread"
6771 ac_cv_cxx_thread=yes
6772fi
6773
6774if test $ac_cv_cxx_thread = yes
6775then
6776 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6777 $CXX -c conftest.$ac_ext 2>&5
6778 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6779 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6780 then
6781 ac_cv_cxx_thread=yes
6782 else
6783 ac_cv_cxx_thread=no
6784 fi
6785 rm -fr conftest*
6786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6788$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006789fi
6790CXX="$ac_save_cxx"
6791
6792
6793# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6795$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006796if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006797 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006798else
Matthias Kloseb9621712010-04-24 17:59:49 +00006799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800/* end confdefs.h. */
6801#include <stdlib.h>
6802#include <stdarg.h>
6803#include <string.h>
6804#include <float.h>
6805
6806int
6807main ()
6808{
6809
6810 ;
6811 return 0;
6812}
6813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006814if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815 ac_cv_header_stdc=yes
6816else
Matthias Kloseb9621712010-04-24 17:59:49 +00006817 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006818fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6820
6821if test $ac_cv_header_stdc = yes; then
6822 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006824/* end confdefs.h. */
6825#include <string.h>
6826
6827_ACEOF
6828if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 $EGREP "memchr" >/dev/null 2>&1; then :
6830
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831else
6832 ac_cv_header_stdc=no
6833fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006834rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835
6836fi
6837
6838if test $ac_cv_header_stdc = yes; then
6839 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006841/* end confdefs.h. */
6842#include <stdlib.h>
6843
6844_ACEOF
6845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006846 $EGREP "free" >/dev/null 2>&1; then :
6847
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006848else
6849 ac_cv_header_stdc=no
6850fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006851rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852
6853fi
6854
6855if test $ac_cv_header_stdc = yes; then
6856 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858 :
6859else
Matthias Kloseb9621712010-04-24 17:59:49 +00006860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861/* end confdefs.h. */
6862#include <ctype.h>
6863#include <stdlib.h>
6864#if ((' ' & 0x0FF) == 0x020)
6865# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6866# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6867#else
6868# define ISLOWER(c) \
6869 (('a' <= (c) && (c) <= 'i') \
6870 || ('j' <= (c) && (c) <= 'r') \
6871 || ('s' <= (c) && (c) <= 'z'))
6872# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6873#endif
6874
6875#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6876int
6877main ()
6878{
6879 int i;
6880 for (i = 0; i < 256; i++)
6881 if (XOR (islower (i), ISLOWER (i))
6882 || toupper (i) != TOUPPER (i))
6883 return 2;
6884 return 0;
6885}
6886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006887if ac_fn_c_try_run "$LINENO"; then :
6888
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889else
Matthias Kloseb9621712010-04-24 17:59:49 +00006890 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006894fi
6895
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896fi
6897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6899$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900if test $ac_cv_header_stdc = yes; then
6901
Matthias Kloseb9621712010-04-24 17:59:49 +00006902$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903
6904fi
6905
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006906ac_save_cppflags="$CPPFLAGS"
6907CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006908for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006909fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006910ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006911sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006912unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006913poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006914sys/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 +01006915sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006916sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006917sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006918sys/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 -07006919libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006920bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006921do :
6922 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6923ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006924if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006925 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006926#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006927_ACEOF
6928
6929fi
6930
Guido van Rossum627b2d71993-12-24 10:39:16 +00006931done
6932
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006933CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006934ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006935for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006936 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6938$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006939if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006940 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006941else
Matthias Kloseb9621712010-04-24 17:59:49 +00006942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006943/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006944#include <sys/types.h>
6945#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006946
Martin v. Löwis11437992002-04-12 09:54:03 +00006947int
6948main ()
6949{
6950if ((DIR *) 0)
6951return 0;
6952 ;
6953 return 0;
6954}
6955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006956if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006957 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006958else
Matthias Kloseb9621712010-04-24 17:59:49 +00006959 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006963eval ac_res=\$$as_ac_Header
6964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6965$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006966if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006967 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006968#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006969_ACEOF
6970
6971ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006972fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006973
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006974done
6975# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6976if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6978$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006979if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006980 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006981else
Martin v. Löwis11437992002-04-12 09:54:03 +00006982 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006986/* Override any GCC internal prototype to avoid an error.
6987 Use char because int might match the return type of a GCC
6988 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006989#ifdef __cplusplus
6990extern "C"
6991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006992char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006993int
6994main ()
6995{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006996return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006997 ;
6998 return 0;
6999}
7000_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007001for ac_lib in '' dir; do
7002 if test -z "$ac_lib"; then
7003 ac_res="none required"
7004 else
7005 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007006 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007007 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007008 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007009 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007011rm -f core conftest.err conftest.$ac_objext \
7012 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007013 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007014 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007016done
Victor Stinnere0be4232011-10-25 13:06:09 +02007017if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007018
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019else
7020 ac_cv_search_opendir=no
7021fi
7022rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007023LIBS=$ac_func_search_save_LIBS
7024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7026$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007027ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007028if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007029 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007030
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007031fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007032
Michael W. Hudson54241132001-12-07 15:38:26 +00007033else
Matthias Kloseb9621712010-04-24 17:59:49 +00007034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7035$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007036if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007037 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007038else
7039 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007043/* Override any GCC internal prototype to avoid an error.
7044 Use char because int might match the return type of a GCC
7045 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007046#ifdef __cplusplus
7047extern "C"
7048#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007049char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007050int
7051main ()
7052{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007053return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007054 ;
7055 return 0;
7056}
7057_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007058for ac_lib in '' x; do
7059 if test -z "$ac_lib"; then
7060 ac_res="none required"
7061 else
7062 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007063 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007064 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007065 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007067fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007068rm -f core conftest.err conftest.$ac_objext \
7069 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007070 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007071 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007073done
Victor Stinnere0be4232011-10-25 13:06:09 +02007074if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007075
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007076else
7077 ac_cv_search_opendir=no
7078fi
7079rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007080LIBS=$ac_func_search_save_LIBS
7081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7083$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007084ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007085if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007088fi
7089
7090fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007091
Matthias Kloseb9621712010-04-24 17:59:49 +00007092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7093$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007094if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007095 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007096else
Matthias Kloseb9621712010-04-24 17:59:49 +00007097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007098/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007099#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007100int
7101main ()
7102{
7103return makedev(0, 0);
7104 ;
7105 return 0;
7106}
7107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007108if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007109 ac_cv_header_sys_types_h_makedev=yes
7110else
Matthias Kloseb9621712010-04-24 17:59:49 +00007111 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007113rm -f core conftest.err conftest.$ac_objext \
7114 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007115
7116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7118$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007119
7120if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007121ac_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 +02007122if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007123
Matthias Kloseb9621712010-04-24 17:59:49 +00007124$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007125
7126fi
7127
7128
7129
7130 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007131 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 +02007132if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007133
Matthias Kloseb9621712010-04-24 17:59:49 +00007134$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007135
7136fi
7137
7138
7139 fi
7140fi
7141
Michael W. Hudson54241132001-12-07 15:38:26 +00007142
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007143# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7144for ac_header in net/if.h
7145do :
7146 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7147#ifdef STDC_HEADERS
7148# include <stdlib.h>
7149# include <stddef.h>
7150#else
7151# ifdef HAVE_STDLIB_H
7152# include <stdlib.h>
7153# endif
7154#endif
7155#ifdef HAVE_SYS_SOCKET_H
7156# include <sys/socket.h>
7157#endif
7158
7159"
Victor Stinnere0be4232011-10-25 13:06:09 +02007160if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007161 cat >>confdefs.h <<_ACEOF
7162#define HAVE_NET_IF_H 1
7163_ACEOF
7164
7165fi
7166
7167done
7168
7169
7170
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007171# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007172for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007173do :
7174 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007175#ifdef HAVE_CURSES_H
7176#include <curses.h>
7177#endif
7178
Matthias Kloseb9621712010-04-24 17:59:49 +00007179"
Victor Stinnere0be4232011-10-25 13:06:09 +02007180if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007181 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007182#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007183_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007184
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007185fi
7186
7187done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007188
7189
Martin v. Löwis11017b12006-01-14 18:12:57 +00007190# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007191for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007192do :
7193 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 +00007194#ifdef HAVE_ASM_TYPES_H
7195#include <asm/types.h>
7196#endif
7197#ifdef HAVE_SYS_SOCKET_H
7198#include <sys/socket.h>
7199#endif
7200
Matthias Kloseb9621712010-04-24 17:59:49 +00007201"
Victor Stinnere0be4232011-10-25 13:06:09 +02007202if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007203 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007204#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007205_ACEOF
7206
7207fi
7208
7209done
7210
7211
Charles-François Natali47413c12011-10-06 19:47:44 +02007212# On Linux, can.h and can/raw.h require sys/socket.h
7213for ac_header in linux/can.h linux/can/raw.h
7214do :
7215 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7216ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7217#ifdef HAVE_SYS_SOCKET_H
7218#include <sys/socket.h>
7219#endif
7220
7221"
7222if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7223 cat >>confdefs.h <<_ACEOF
7224#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7225_ACEOF
7226
7227fi
7228
7229done
7230
7231
Guido van Rossum627b2d71993-12-24 10:39:16 +00007232# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007233was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7235$as_echo_n "checking for clock_t in time.h... " >&6; }
7236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007237/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007238#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007239
7240_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007242 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007243 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007244else
Martin v. Löwis11437992002-04-12 09:54:03 +00007245
7246
Matthias Kloseb9621712010-04-24 17:59:49 +00007247$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007248
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007249
Guido van Rossum627b2d71993-12-24 10:39:16 +00007250fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007251rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007252
Matthias Kloseb9621712010-04-24 17:59:49 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7254$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007255
Matthias Kloseb9621712010-04-24 17:59:49 +00007256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7257$as_echo_n "checking for makedev... " >&6; }
7258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007259/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007260
Jesus Cea740f53a2010-04-28 11:35:30 +00007261#if defined(MAJOR_IN_MKDEV)
7262#include <sys/mkdev.h>
7263#elif defined(MAJOR_IN_SYSMACROS)
7264#include <sys/sysmacros.h>
7265#else
7266#include <sys/types.h>
7267#endif
7268
Neal Norwitz11690112002-07-30 01:08:28 +00007269int
7270main ()
7271{
Jesus Cea740f53a2010-04-28 11:35:30 +00007272
7273 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007274 ;
7275 return 0;
7276}
Matthias Kloseb159a552010-04-25 21:00:44 +00007277
Neal Norwitz11690112002-07-30 01:08:28 +00007278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007279if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007280 ac_cv_has_makedev=yes
7281else
Matthias Kloseb9621712010-04-24 17:59:49 +00007282 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007284rm -f core conftest.err conftest.$ac_objext \
7285 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7287$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007288if test "$ac_cv_has_makedev" = "yes"; then
7289
Matthias Kloseb9621712010-04-24 17:59:49 +00007290$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007291
7292fi
7293
Martin v. Löwis399a6892002-10-04 10:22:02 +00007294# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7295# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7296# defined, but the compiler does not support pragma redefine_extname,
7297# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7298# structures (such as rlimit64) without declaring them. As a
7299# work-around, disable LFS on such configurations
7300
7301use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7303$as_echo_n "checking Solaris LFS bug... " >&6; }
7304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007305/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007306
7307#define _LARGEFILE_SOURCE 1
7308#define _FILE_OFFSET_BITS 64
7309#include <sys/resource.h>
7310
Martin v. Löwis399a6892002-10-04 10:22:02 +00007311int
7312main ()
7313{
7314struct rlimit foo;
7315 ;
7316 return 0;
7317}
7318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007320 sol_lfs_bug=no
7321else
Matthias Kloseb9621712010-04-24 17:59:49 +00007322 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7326$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007327if test "$sol_lfs_bug" = "yes"; then
7328 use_lfs=no
7329fi
7330
7331if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007332# Two defines needed to enable largefile support on various platforms
7333# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007334case $ac_sys_system/$ac_sys_release in
7335AIX*)
7336
7337$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7338
7339 ;;
7340esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007341
Matthias Kloseb9621712010-04-24 17:59:49 +00007342$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007343
7344
Matthias Kloseb9621712010-04-24 17:59:49 +00007345$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007346
Martin v. Löwis399a6892002-10-04 10:22:02 +00007347fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007348
Guido van Rossum84e7b241996-08-19 21:59:00 +00007349# Add some code to confdefs.h so that the test for off_t works on SCO
7350cat >> confdefs.h <<\EOF
7351#if defined(SCO_DS)
7352#undef _OFF_T
7353#endif
7354EOF
7355
Guido van Rossumef2255b2000-03-10 22:30:29 +00007356# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007357ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007358if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007359
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007360else
Martin v. Löwis11437992002-04-12 09:54:03 +00007361
7362cat >>confdefs.h <<_ACEOF
7363#define mode_t int
7364_ACEOF
7365
7366fi
7367
Matthias Kloseb9621712010-04-24 17:59:49 +00007368ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007369if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007370
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007371else
Martin v. Löwis11437992002-04-12 09:54:03 +00007372
7373cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007374#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007375_ACEOF
7376
7377fi
7378
Matthias Kloseb9621712010-04-24 17:59:49 +00007379ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007380if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007381
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007382else
Martin v. Löwis11437992002-04-12 09:54:03 +00007383
7384cat >>confdefs.h <<_ACEOF
7385#define pid_t int
7386_ACEOF
7387
7388fi
7389
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007390
Martin v. Löwis11437992002-04-12 09:54:03 +00007391cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007392#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007393_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007394
Matthias Kloseb9621712010-04-24 17:59:49 +00007395ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007396if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007397
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007398else
Martin v. Löwis11437992002-04-12 09:54:03 +00007399
7400cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007401#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007402_ACEOF
7403
7404fi
7405
Matthias Kloseb9621712010-04-24 17:59:49 +00007406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7407$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007408if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007409 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007410else
Matthias Kloseb9621712010-04-24 17:59:49 +00007411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007412/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007413#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007414
7415_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007416if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007417 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007418 ac_cv_type_uid_t=yes
7419else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007420 ac_cv_type_uid_t=no
7421fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007422rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007423
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7426$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007427if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007428
Matthias Kloseb9621712010-04-24 17:59:49 +00007429$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007430
7431
Matthias Kloseb9621712010-04-24 17:59:49 +00007432$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007433
7434fi
7435
Matthias Kloseb9621712010-04-24 17:59:49 +00007436ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7437case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007438 no|yes) ;; #(
7439 *)
7440
Matthias Kloseb9621712010-04-24 17:59:49 +00007441$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007442
7443
7444cat >>confdefs.h <<_ACEOF
7445#define uint32_t $ac_cv_c_uint32_t
7446_ACEOF
7447;;
7448 esac
7449
Matthias Kloseb9621712010-04-24 17:59:49 +00007450ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7451case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007452 no|yes) ;; #(
7453 *)
7454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007456
7457
7458cat >>confdefs.h <<_ACEOF
7459#define uint64_t $ac_cv_c_uint64_t
7460_ACEOF
7461;;
7462 esac
7463
Matthias Kloseb9621712010-04-24 17:59:49 +00007464ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7465case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007466 no|yes) ;; #(
7467 *)
7468
7469cat >>confdefs.h <<_ACEOF
7470#define int32_t $ac_cv_c_int32_t
7471_ACEOF
7472;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007473esac
7474
Matthias Kloseb9621712010-04-24 17:59:49 +00007475ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7476case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007477 no|yes) ;; #(
7478 *)
7479
7480cat >>confdefs.h <<_ACEOF
7481#define int64_t $ac_cv_c_int64_t
7482_ACEOF
7483;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007484esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007485
Matthias Kloseb9621712010-04-24 17:59:49 +00007486ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007487if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007488
Matthias Kloseb9621712010-04-24 17:59:49 +00007489$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007490
7491fi
7492
Stefan Krah1919b7e2012-03-21 18:25:23 +01007493ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7494if test "x$ac_cv_type___uint128_t" = xyes; then :
7495
7496$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7497
7498fi
7499
Jack Jansendd19cf82001-12-06 22:36:17 +00007500
Michael W. Hudson54241132001-12-07 15:38:26 +00007501# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007502# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007503# The cast to long int works around a bug in the HP C Compiler
7504# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7505# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7506# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7508$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007509if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007510 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007511else
Matthias Kloseb9621712010-04-24 17:59:49 +00007512 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 +00007513
Martin v. Löwis11437992002-04-12 09:54:03 +00007514else
Matthias Kloseb9621712010-04-24 17:59:49 +00007515 if test "$ac_cv_type_int" = yes; then
7516 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7517$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007518as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007519See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007520 else
7521 ac_cv_sizeof_int=0
7522 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007524
Martin v. Löwis11437992002-04-12 09:54:03 +00007525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7527$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007528
7529
7530
Martin v. Löwis11437992002-04-12 09:54:03 +00007531cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007532#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007533_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007534
7535
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007536# The cast to long int works around a bug in the HP C Compiler
7537# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7538# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7539# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7541$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007542if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007543 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007544else
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 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 +00007546
Martin v. Löwis11437992002-04-12 09:54:03 +00007547else
Matthias Kloseb9621712010-04-24 17:59:49 +00007548 if test "$ac_cv_type_long" = yes; then
7549 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007551as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007552See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007553 else
7554 ac_cv_sizeof_long=0
7555 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007557
Martin v. Löwis11437992002-04-12 09:54:03 +00007558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7560$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007561
7562
7563
Martin v. Löwis11437992002-04-12 09:54:03 +00007564cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007565#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007566_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007567
7568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007569# The cast to long int works around a bug in the HP C Compiler
7570# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7571# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7572# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7574$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007575if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007576 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007577else
Matthias Kloseb9621712010-04-24 17:59:49 +00007578 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 +00007579
Martin v. Löwis11437992002-04-12 09:54:03 +00007580else
Matthias Kloseb9621712010-04-24 17:59:49 +00007581 if test "$ac_cv_type_void_p" = yes; then
7582 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007584as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007585See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007586 else
7587 ac_cv_sizeof_void_p=0
7588 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007590
Martin v. Löwis11437992002-04-12 09:54:03 +00007591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7593$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007594
7595
7596
Martin v. Löwis11437992002-04-12 09:54:03 +00007597cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007598#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007599_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007600
7601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007602# The cast to long int works around a bug in the HP C Compiler
7603# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7604# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7605# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7607$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007608if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007609 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007610else
Matthias Kloseb9621712010-04-24 17:59:49 +00007611 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 +00007612
Martin v. Löwis11437992002-04-12 09:54:03 +00007613else
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 if test "$ac_cv_type_short" = yes; then
7615 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007617as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007618See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007619 else
7620 ac_cv_sizeof_short=0
7621 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007623
Martin v. Löwis11437992002-04-12 09:54:03 +00007624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7626$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007627
7628
7629
Martin v. Löwis11437992002-04-12 09:54:03 +00007630cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007631#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007632_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007633
7634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007635# The cast to long int works around a bug in the HP C Compiler
7636# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7637# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7638# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7640$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007641if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007642 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007643else
Matthias Kloseb9621712010-04-24 17:59:49 +00007644 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 +00007645
Martin v. Löwis11437992002-04-12 09:54:03 +00007646else
Matthias Kloseb9621712010-04-24 17:59:49 +00007647 if test "$ac_cv_type_float" = yes; then
7648 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7649$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007650as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007651See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007652 else
7653 ac_cv_sizeof_float=0
7654 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007656
Martin v. Löwis11437992002-04-12 09:54:03 +00007657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7659$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660
7661
7662
Martin v. Löwis11437992002-04-12 09:54:03 +00007663cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007664#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007665_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007666
7667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007668# The cast to long int works around a bug in the HP C Compiler
7669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7671# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7673$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007674if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007676else
Matthias Kloseb9621712010-04-24 17:59:49 +00007677 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 +00007678
Martin v. Löwis11437992002-04-12 09:54:03 +00007679else
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 if test "$ac_cv_type_double" = yes; then
7681 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007683as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007684See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685 else
7686 ac_cv_sizeof_double=0
7687 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007689
Martin v. Löwis11437992002-04-12 09:54:03 +00007690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7692$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693
7694
7695
Martin v. Löwis11437992002-04-12 09:54:03 +00007696cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007697#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007698_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007699
7700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701# The cast to long int works around a bug in the HP C Compiler
7702# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7703# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7704# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7706$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007707if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007709else
Matthias Kloseb9621712010-04-24 17:59:49 +00007710 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 +00007711
Martin v. Löwis11437992002-04-12 09:54:03 +00007712else
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 if test "$ac_cv_type_fpos_t" = yes; then
7714 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7715$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007716as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007717See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007718 else
7719 ac_cv_sizeof_fpos_t=0
7720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007722
Martin v. Löwis11437992002-04-12 09:54:03 +00007723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7725$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007726
7727
7728
Martin v. Löwis11437992002-04-12 09:54:03 +00007729cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007730#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007731_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007732
Michael W. Hudson54241132001-12-07 15:38:26 +00007733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734# The cast to long int works around a bug in the HP C Compiler
7735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7737# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7739$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007740if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007741 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007742else
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 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 +00007744
Martin v. Löwis18e16552006-02-15 17:27:45 +00007745else
Matthias Kloseb9621712010-04-24 17:59:49 +00007746 if test "$ac_cv_type_size_t" = yes; then
7747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007749as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007750See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751 else
7752 ac_cv_sizeof_size_t=0
7753 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007755
Martin v. Löwis18e16552006-02-15 17:27:45 +00007756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7758$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007759
7760
7761
Martin v. Löwis18e16552006-02-15 17:27:45 +00007762cat >>confdefs.h <<_ACEOF
7763#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7764_ACEOF
7765
7766
Christian Heimes400adb02008-02-01 08:12:03 +00007767# The cast to long int works around a bug in the HP C Compiler
7768# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7769# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7770# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7772$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007773if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007774 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007775else
Matthias Kloseb9621712010-04-24 17:59:49 +00007776 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 +00007777
Christian Heimes400adb02008-02-01 08:12:03 +00007778else
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 if test "$ac_cv_type_pid_t" = yes; then
7780 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7781$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007782as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007783See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007784 else
7785 ac_cv_sizeof_pid_t=0
7786 fi
7787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007788
Christian Heimes400adb02008-02-01 08:12:03 +00007789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7791$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007792
7793
7794
7795cat >>confdefs.h <<_ACEOF
7796#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7797_ACEOF
7798
7799
Michael W. Hudson54241132001-12-07 15:38:26 +00007800
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7802$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007803have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007805/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007806
Martin v. Löwis11437992002-04-12 09:54:03 +00007807int
7808main ()
7809{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007810long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 ;
7812 return 0;
7813}
7814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007815if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007816
7817
Matthias Kloseb9621712010-04-24 17:59:49 +00007818$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007819
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007820 have_long_long=yes
7821
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7825$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007826if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007827# The cast to long int works around a bug in the HP C Compiler
7828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7830# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7832$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007833if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007835else
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 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 +00007837
Martin v. Löwis11437992002-04-12 09:54:03 +00007838else
Matthias Kloseb9621712010-04-24 17:59:49 +00007839 if test "$ac_cv_type_long_long" = yes; then
7840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7841$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007842as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007843See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844 else
7845 ac_cv_sizeof_long_long=0
7846 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007848
Martin v. Löwis11437992002-04-12 09:54:03 +00007849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7851$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007852
7853
7854
Martin v. Löwis11437992002-04-12 09:54:03 +00007855cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007856#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007857_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007858
Michael W. Hudson54241132001-12-07 15:38:26 +00007859
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007860fi
7861
Matthias Kloseb9621712010-04-24 17:59:49 +00007862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7863$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007864have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007866/* end confdefs.h. */
7867
7868int
7869main ()
7870{
7871long double x; x = (long double)0;
7872 ;
7873 return 0;
7874}
7875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007876if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007877
7878
Matthias Kloseb9621712010-04-24 17:59:49 +00007879$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007880
7881 have_long_double=yes
7882
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007883fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7886$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007887if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007888# The cast to long int works around a bug in the HP C Compiler
7889# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7890# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7891# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7893$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007894if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007895 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007896else
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 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 +00007898
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007899else
Matthias Kloseb9621712010-04-24 17:59:49 +00007900 if test "$ac_cv_type_long_double" = yes; then
7901 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007903as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007904See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007905 else
7906 ac_cv_sizeof_long_double=0
7907 fi
7908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007909
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7912$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007913
7914
7915
7916cat >>confdefs.h <<_ACEOF
7917#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7918_ACEOF
7919
7920
7921fi
7922
7923
Matthias Kloseb9621712010-04-24 17:59:49 +00007924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7925$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007926have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007928/* end confdefs.h. */
7929
7930int
7931main ()
7932{
7933_Bool x; x = (_Bool)0;
7934 ;
7935 return 0;
7936}
7937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007938if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007939
7940
Matthias Kloseb9621712010-04-24 17:59:49 +00007941$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007942
7943 have_c99_bool=yes
7944
Thomas Woutersb2137042007-02-01 18:02:27 +00007945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7948$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007949if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950# The cast to long int works around a bug in the HP C Compiler
7951# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7952# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7953# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7955$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007956if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007957 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007958else
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 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 +00007960
Thomas Woutersb2137042007-02-01 18:02:27 +00007961else
Matthias Kloseb9621712010-04-24 17:59:49 +00007962 if test "$ac_cv_type__Bool" = yes; then
7963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007965as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02007966See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007967 else
7968 ac_cv_sizeof__Bool=0
7969 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00007970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007971
Thomas Woutersb2137042007-02-01 18:02:27 +00007972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7974$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975
7976
7977
Thomas Woutersb2137042007-02-01 18:02:27 +00007978cat >>confdefs.h <<_ACEOF
7979#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7980_ACEOF
7981
7982
7983fi
7984
Matthias Kloseb9621712010-04-24 17:59:49 +00007985ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00007986 #include <stdint.h>
7987 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00007988 #ifdef HAVE_INTTYPES_H
7989 #include <inttypes.h>
7990 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00007991"
Victor Stinnere0be4232011-10-25 13:06:09 +02007992if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00007993
7994cat >>confdefs.h <<_ACEOF
7995#define HAVE_UINTPTR_T 1
7996_ACEOF
7997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998# The cast to long int works around a bug in the HP C Compiler
7999# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8000# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8001# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8003$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008004if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008005 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008006else
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 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 +00008008
Martin v. Löwis11437992002-04-12 09:54:03 +00008009else
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 if test "$ac_cv_type_uintptr_t" = yes; then
8011 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008013as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008014See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015 else
8016 ac_cv_sizeof_uintptr_t=0
8017 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008019
Martin v. Löwis11437992002-04-12 09:54:03 +00008020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8022$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023
8024
8025
Martin v. Löwis11437992002-04-12 09:54:03 +00008026cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008027#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008028_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008029
Michael W. Hudson54241132001-12-07 15:38:26 +00008030
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008031fi
8032
Thomas Wouters89f507f2006-12-13 04:49:30 +00008033
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008034# The cast to long int works around a bug in the HP C Compiler
8035# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8036# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8037# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8039$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008040if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008041 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008042else
Matthias Kloseb9621712010-04-24 17:59:49 +00008043 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008044#ifdef HAVE_SYS_TYPES_H
8045#include <sys/types.h>
8046#endif
8047
Matthias Kloseb9621712010-04-24 17:59:49 +00008048"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008049
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008050else
Matthias Kloseb9621712010-04-24 17:59:49 +00008051 if test "$ac_cv_type_off_t" = yes; then
8052 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8053$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008054as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008055See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008056 else
8057 ac_cv_sizeof_off_t=0
8058 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008060
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8063$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008064
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008065
8066
Martin v. Löwis11437992002-04-12 09:54:03 +00008067cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008068#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008069_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008070
Michael W. Hudson54241132001-12-07 15:38:26 +00008071
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008072
Matthias Kloseb9621712010-04-24 17:59:49 +00008073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8074$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008075if test "$have_long_long" = yes
8076then
8077if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008078 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008079
Matthias Kloseb9621712010-04-24 17:59:49 +00008080$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
Matthias Kloseb9621712010-04-24 17:59:49 +00008082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8083$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008084else
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8086$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008087fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008088else
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8090$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008091fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008092
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008093# The cast to long int works around a bug in the HP C Compiler
8094# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8095# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8096# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8098$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008099if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008100 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008101else
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008103#ifdef HAVE_SYS_TYPES_H
8104#include <sys/types.h>
8105#endif
8106#ifdef HAVE_TIME_H
8107#include <time.h>
8108#endif
8109
Matthias Kloseb9621712010-04-24 17:59:49 +00008110"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008111
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008112else
Matthias Kloseb9621712010-04-24 17:59:49 +00008113 if test "$ac_cv_type_time_t" = yes; then
8114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008116as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008117See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008118 else
8119 ac_cv_sizeof_time_t=0
8120 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008121fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008122
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8125$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008127
8128
Martin v. Löwis11437992002-04-12 09:54:03 +00008129cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008130#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008131_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008132
Michael W. Hudson54241132001-12-07 15:38:26 +00008133
8134
Trent Mick635f6fb2000-08-23 21:33:05 +00008135# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008136ac_save_cc="$CC"
8137if test "$ac_cv_kpthread" = "yes"
8138then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008139elif test "$ac_cv_kthread" = "yes"
8140then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008141elif test "$ac_cv_pthread" = "yes"
8142then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008143fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8146$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008147have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008149/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008150
8151 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008152int
8153main ()
8154{
Guido van Rossum12580492000-09-24 16:47:19 +00008155pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008156 ;
8157 return 0;
8158}
Matthias Kloseb159a552010-04-25 21:00:44 +00008159
Martin v. Löwis11437992002-04-12 09:54:03 +00008160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008161if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008162 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8166$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008167if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008169# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8170# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8171# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8173$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008174if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008176else
Matthias Kloseb9621712010-04-24 17:59:49 +00008177 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008178#ifdef HAVE_PTHREAD_H
8179#include <pthread.h>
8180#endif
8181
Matthias Kloseb9621712010-04-24 17:59:49 +00008182"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008183
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008184else
Matthias Kloseb9621712010-04-24 17:59:49 +00008185 if test "$ac_cv_type_pthread_t" = yes; then
8186 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8187$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008188as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008189See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008190 else
8191 ac_cv_sizeof_pthread_t=0
8192 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008194
Trent Mick635f6fb2000-08-23 21:33:05 +00008195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8197$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008198
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008199
8200
Martin v. Löwis11437992002-04-12 09:54:03 +00008201cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008202#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008203_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008204
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008205
Trent Mick635f6fb2000-08-23 21:33:05 +00008206fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008207CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008208
Michael W. Hudson54241132001-12-07 15:38:26 +00008209
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008210case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008211 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008212 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8213 ;;
8214 Darwin/*)
8215 OTHER_LIBTOOL_OPT=""
8216 ;;
8217esac
8218
8219
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008220ARCH_RUN_32BIT=""
8221
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008222case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008223 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008224 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8225 if test "${enable_universalsdk}"; then
8226 :
8227 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008228 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008229 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008230 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008231 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008232 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008233 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008234 if test ${gcc_version} '<' 4.0
8235 then
8236 LIBTOOL_CRUFT="-lcc_dynamic"
8237 else
8238 LIBTOOL_CRUFT=""
8239 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008240 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008241 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008242else
Matthias Kloseb9621712010-04-24 17:59:49 +00008243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008244/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008245
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008246 #include <unistd.h>
8247 int main(int argc, char*argv[])
8248 {
8249 if (sizeof(long) == 4) {
8250 return 0;
8251 } else {
8252 return 1;
8253 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008254 }
8255
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008257if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008258 ac_osx_32bit=yes
8259else
Matthias Kloseb9621712010-04-24 17:59:49 +00008260 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8263 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008264fi
8265
8266
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008267 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008268 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008269 i386)
8270 MACOSX_DEFAULT_ARCH="i386"
8271 ;;
8272 ppc)
8273 MACOSX_DEFAULT_ARCH="ppc"
8274 ;;
8275 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008276 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008277 ;;
8278 esac
8279 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008280 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008281 i386)
8282 MACOSX_DEFAULT_ARCH="x86_64"
8283 ;;
8284 ppc)
8285 MACOSX_DEFAULT_ARCH="ppc64"
8286 ;;
8287 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008288 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008289 ;;
8290 esac
8291
8292 #ARCH_RUN_32BIT="true"
8293 fi
8294
8295 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008296 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008297 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008298esac
8299
Matthias Kloseb9621712010-04-24 17:59:49 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8301$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008302if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008303then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008304 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008305 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008306 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008307
Matthias Kloseb9621712010-04-24 17:59:49 +00008308$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008309
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8311$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008312 if test $enable_shared = "yes"
8313 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008314 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 +00008315 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008316else
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8318$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008319fi
8320
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8322$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008323case $ac_sys_system/$ac_sys_release in
8324 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008325
Matthias Kloseb9621712010-04-24 17:59:49 +00008326$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008327
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8329$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008330 ;;
8331 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8333$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008334 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008335esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008336
Guido van Rossum0a516c91994-09-12 10:58:40 +00008337# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008338
Michael W. Hudson54241132001-12-07 15:38:26 +00008339
8340
8341
8342
Benjamin Peterson99f03762010-04-11 22:15:28 +00008343
Thomas Wouters477c8d52006-05-27 19:21:47 +00008344
Georg Brandlb1441c72009-01-03 22:33:39 +00008345
Thomas Wouters477c8d52006-05-27 19:21:47 +00008346cat >>confdefs.h <<_ACEOF
8347#define SHLIB_EXT "$SO"
8348_ACEOF
8349
Guido van Rossum0a516c91994-09-12 10:58:40 +00008350# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008351# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008352# (Shared libraries in this instance are shared modules to be loaded into
8353# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8355$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008356if test -z "$LDSHARED"
8357then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008358 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008359 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008360 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008361 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008362 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008363 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008364 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008366 if test "$GCC" = "yes" ; then
8367 LDSHARED='$(CC) -shared'
8368 LDCXXSHARED='$(CXX) -shared'
8369 else
8370 LDSHARED='$(CC) -G'
8371 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008372 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008373 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008374 if test "$GCC" = "yes" ; then
8375 LDSHARED='$(CC) -shared'
8376 LDCXXSHARED='$(CXX) -shared'
8377 else
8378 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008379 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008380 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008381 LDSHARED='$(CC) -bundle'
8382 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008383 if test "$enable_framework" ; then
8384 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008385 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8386 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008387 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008388 else
8389 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008390 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008391 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008392 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008393 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008394 LDSHARED='$(CC) -bundle'
8395 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008396 if test "$enable_framework" ; then
8397 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008398 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8399 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008400 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008401 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008402 # No framework, use the Python app as bundle-loader
8403 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008404 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008405 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008406 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008407 Darwin/*)
8408 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8409 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008410
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008411 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008412 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008413 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008414 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008415 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008416 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8417 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008418 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008419 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008420 LDSHARED='$(CC) -bundle'
8421 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008422 if test "$enable_framework" ; then
8423 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008424 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8425 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008426 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008427 else
8428 # No framework, use the Python app as bundle-loader
8429 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8430 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008431 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008432 fi
8433 fi
8434 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008435 Linux*|GNU*|QNX*)
8436 LDSHARED='$(CC) -shared'
8437 LDCXXSHARED='$(CXX) -shared';;
8438 BSD/OS*/4*)
8439 LDSHARED="gcc -shared"
8440 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008441 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008442 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008443 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008444 LDSHARED='$(CC) -shared'
8445 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008446 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008447 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008448 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008449 OpenBSD*)
8450 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8451 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008452 LDSHARED='$(CC) -shared $(CCSHARED)'
8453 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008454 else
8455 case `uname -r` in
8456 [01].* | 2.[0-7] | 2.[0-7].*)
8457 LDSHARED="ld -Bshareable ${LDFLAGS}"
8458 ;;
8459 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008460 LDSHARED='$(CC) -shared $(CCSHARED)'
8461 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008462 ;;
8463 esac
8464 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008465 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008466 LDSHARED='$(CC) -shared'
8467 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008468 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008469 if test "$GCC" = "yes" ; then
8470 LDSHARED='$(CC) -shared'
8471 LDCXXSHARED='$(CXX) -shared'
8472 else
8473 LDSHARED='$(CC) -G'
8474 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008475 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008476 SCO_SV*)
8477 LDSHARED='$(CC) -Wl,-G,-Bexport'
8478 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8479 CYGWIN*)
8480 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8481 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008482 *) LDSHARED="ld";;
8483 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8486$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008487LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008488BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008489# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008490# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8492$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008493if test -z "$CCSHARED"
8494then
Guido van Rossum07397971997-04-29 21:49:50 +00008495 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008496 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008497 then CCSHARED="-fPIC";
8498 elif test `uname -p` = sparc;
8499 then CCSHARED="-xcode=pic32";
8500 else CCSHARED="-Kpic";
8501 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008502 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008503 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008504 else CCSHARED="+z";
8505 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008506 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008507 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008508 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008509 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008510 if test "$GCC" = "yes"
8511 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008512 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008513 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008514 SCO_SV*)
8515 if test "$GCC" = "yes"
8516 then CCSHARED="-fPIC"
8517 else CCSHARED="-Kpic -belf"
8518 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008519 IRIX*/6*) case $CC in
8520 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008521 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008522 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008523 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8526$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008527# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008528# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8530$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008531if test -z "$LINKFORSHARED"
8532then
Guido van Rossum07397971997-04-29 21:49:50 +00008533 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008534 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008535 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008536 LINKFORSHARED="-Wl,-E -Wl,+s";;
8537# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008538 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008539 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008540 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008542 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008543 if test "$enable_framework"
8544 then
Jack Jansenda49e192005-01-07 13:08:22 +00008545 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008546 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008547 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008548 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008549 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008550 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008551 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008552 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8553 then
8554 LINKFORSHARED="-Wl,--export-dynamic"
8555 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008556 SunOS/5*) case $CC in
8557 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008558 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008559 then
8560 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008561 fi;;
8562 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008563 CYGWIN*)
8564 if test $enable_shared = "no"
8565 then
8566 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8567 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008568 QNX*)
8569 # -Wl,-E causes the symbols to be added to the dynamic
8570 # symbol table so that they can be found when a module
8571 # is loaded. -N 2048K causes the stack size to be set
8572 # to 2048 kilobytes so that the stack doesn't overflow
8573 # when running test_compile.py.
8574 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008575 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8578$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008579
Michael W. Hudson54241132001-12-07 15:38:26 +00008580
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008581
Matthias Kloseb9621712010-04-24 17:59:49 +00008582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8583$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008584if test ! "$LIBRARY" = "$LDLIBRARY"
8585then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008586 case $ac_sys_system in
8587 CYGWIN*)
8588 # Cygwin needs CCSHARED when building extension DLLs
8589 # but not when building the interpreter DLL.
8590 CFLAGSFORSHARED='';;
8591 *)
8592 CFLAGSFORSHARED='$(CCSHARED)'
8593 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8596$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008597
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008598# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8599# library (with --enable-shared).
8600# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008601# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8602# if it is not required, since it creates a dependency of the shared library
8603# to LIBS. This, in turn, means that applications linking the shared libpython
8604# don't need to link LIBS explicitly. The default should be only changed
8605# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008606
Matthias Kloseb9621712010-04-24 17:59:49 +00008607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8608$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008609case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008610 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008611 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008612esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8614$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008615
8616
Guido van Rossum627b2d71993-12-24 10:39:16 +00008617# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8619$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008620if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008621 $as_echo_n "(cached) " >&6
8622else
8623 ac_check_lib_save_LIBS=$LIBS
8624LIBS="-lsendfile $LIBS"
8625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8626/* end confdefs.h. */
8627
8628/* Override any GCC internal prototype to avoid an error.
8629 Use char because int might match the return type of a GCC
8630 builtin and then its argument prototype would still apply. */
8631#ifdef __cplusplus
8632extern "C"
8633#endif
8634char sendfile ();
8635int
8636main ()
8637{
8638return sendfile ();
8639 ;
8640 return 0;
8641}
8642_ACEOF
8643if ac_fn_c_try_link "$LINENO"; then :
8644 ac_cv_lib_sendfile_sendfile=yes
8645else
8646 ac_cv_lib_sendfile_sendfile=no
8647fi
8648rm -f core conftest.err conftest.$ac_objext \
8649 conftest$ac_exeext conftest.$ac_ext
8650LIBS=$ac_check_lib_save_LIBS
8651fi
8652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8653$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008654if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008655 cat >>confdefs.h <<_ACEOF
8656#define HAVE_LIBSENDFILE 1
8657_ACEOF
8658
8659 LIBS="-lsendfile $LIBS"
8660
8661fi
8662
Matthias Kloseb9621712010-04-24 17:59:49 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8664$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008665if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008667else
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008669LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008673/* Override any GCC internal prototype to avoid an error.
8674 Use char because int might match the return type of a GCC
8675 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008676#ifdef __cplusplus
8677extern "C"
8678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008679char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008680int
8681main ()
8682{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 ;
8685 return 0;
8686}
8687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008688if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008690else
Matthias Kloseb9621712010-04-24 17:59:49 +00008691 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008693rm -f core conftest.err conftest.$ac_objext \
8694 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008695LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8698$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008699if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 cat >>confdefs.h <<_ACEOF
8701#define HAVE_LIBDL 1
8702_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008703
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008704 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008705
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008706fi
8707 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8709$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008710if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008712else
Martin v. Löwis11437992002-04-12 09:54:03 +00008713 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008714LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008718/* Override any GCC internal prototype to avoid an error.
8719 Use char because int might match the return type of a GCC
8720 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008721#ifdef __cplusplus
8722extern "C"
8723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008724char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008725int
8726main ()
8727{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008728return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 ;
8730 return 0;
8731}
8732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008733if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008734 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008735else
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008738rm -f core conftest.err conftest.$ac_objext \
8739 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008740LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8743$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008744if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 cat >>confdefs.h <<_ACEOF
8746#define HAVE_LIBDLD 1
8747_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008748
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008749 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008750
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008751fi
8752 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008753
Georg Brandlb1441c72009-01-03 22:33:39 +00008754# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008755if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8757$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008758if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008760else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008761 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765/* Override any GCC internal prototype to avoid an error.
8766 Use char because int might match the return type of a GCC
8767 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008768#ifdef __cplusplus
8769extern "C"
8770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008771char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008772int
8773main ()
8774{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 ;
8777 return 0;
8778}
8779_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008780for ac_lib in '' pthread rt posix4; do
8781 if test -z "$ac_lib"; then
8782 ac_res="none required"
8783 else
8784 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008785 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008787 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008788 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790rm -f core conftest.err conftest.$ac_objext \
8791 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008792 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008793 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008795done
Victor Stinnere0be4232011-10-25 13:06:09 +02008796if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008797
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008798else
8799 ac_cv_search_sem_init=no
8800fi
8801rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008802LIBS=$ac_func_search_save_LIBS
8803fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8805$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008807if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008809
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008810fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008811 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008812 # posix4 on Solaris 2.6
8813 # pthread (first!) on Linux
8814fi
8815
Martin v. Löwis19d17342003-06-14 21:03:05 +00008816# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8818$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008819if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008821else
8822 ac_check_lib_save_LIBS=$LIBS
8823LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008825/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827/* Override any GCC internal prototype to avoid an error.
8828 Use char because int might match the return type of a GCC
8829 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008830#ifdef __cplusplus
8831extern "C"
8832#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008833char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008834int
8835main ()
8836{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008837return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008838 ;
8839 return 0;
8840}
8841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008842if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008843 ac_cv_lib_intl_textdomain=yes
8844else
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008847rm -f core conftest.err conftest.$ac_objext \
8848 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008849LIBS=$ac_check_lib_save_LIBS
8850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8852$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008853if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008854
Matthias Kloseb9621712010-04-24 17:59:49 +00008855$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008856
Brett Cannonc6d936e2009-06-07 20:09:53 +00008857 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008858fi
8859
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008860
8861# checks for system dependent C++ extensions support
8862case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8864$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008866/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008867
Georg Brandl59e87bd2011-02-15 19:48:59 +00008868 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008869int
8870main ()
8871{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008872loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 ;
8874 return 0;
8875}
Matthias Kloseb159a552010-04-25 21:00:44 +00008876
Martin v. Löwis11437992002-04-12 09:54:03 +00008877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008878if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008879
Matthias Kloseb159a552010-04-25 21:00:44 +00008880
Matthias Kloseb9621712010-04-24 17:59:49 +00008881$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008882
Matthias Kloseb159a552010-04-25 21:00:44 +00008883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008884$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008885
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008886else
Matthias Kloseb159a552010-04-25 21:00:44 +00008887
8888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008889$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008890
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008892rm -f core conftest.err conftest.$ac_objext \
8893 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008894 *) ;;
8895esac
8896
Guido van Rossum70c7f481998-03-26 18:44:10 +00008897# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8899$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008900if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008902else
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008904LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908/* Override any GCC internal prototype to avoid an error.
8909 Use char because int might match the return type of a GCC
8910 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008911#ifdef __cplusplus
8912extern "C"
8913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008914char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008915int
8916main ()
8917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ;
8920 return 0;
8921}
8922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008925else
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008928rm -f core conftest.err conftest.$ac_objext \
8929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008930LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8933$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008934if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008935 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008936fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008937 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8939$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008940if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008942else
Martin v. Löwis11437992002-04-12 09:54:03 +00008943 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008944LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008948/* Override any GCC internal prototype to avoid an error.
8949 Use char because int might match the return type of a GCC
8950 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008951#ifdef __cplusplus
8952extern "C"
8953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008954char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008955int
8956main ()
8957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008958return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 ;
8960 return 0;
8961}
8962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008963if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008965else
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008968rm -f core conftest.err conftest.$ac_objext \
8969 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008970LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8973$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008974if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008975 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008976fi
8977 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008978
Matthias Kloseb9621712010-04-24 17:59:49 +00008979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
8980$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008982# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00008983if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008984 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00008985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
8986$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00008987LIBS="$withval $LIBS"
8988
8989else
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8991$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008992fi
8993
Guido van Rossum7f43da71994-08-01 12:15:30 +00008994
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00008995if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00008996 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8997set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00008998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8999$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009000if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009001 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009002else
9003 case $PKG_CONFIG in
9004 [\\/]* | ?:[\\/]*)
9005 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9006 ;;
9007 *)
9008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9009for as_dir in $PATH
9010do
9011 IFS=$as_save_IFS
9012 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009015 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009017 break 2
9018 fi
9019done
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009021IFS=$as_save_IFS
9022
9023 ;;
9024esac
9025fi
9026PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9027if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9029$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009030else
Matthias Kloseb9621712010-04-24 17:59:49 +00009031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9032$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009033fi
9034
9035
9036fi
9037if test -z "$ac_cv_path_PKG_CONFIG"; then
9038 ac_pt_PKG_CONFIG=$PKG_CONFIG
9039 # Extract the first word of "pkg-config", so it can be a program name with args.
9040set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9042$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009043if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009045else
9046 case $ac_pt_PKG_CONFIG in
9047 [\\/]* | ?:[\\/]*)
9048 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9049 ;;
9050 *)
9051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9052for as_dir in $PATH
9053do
9054 IFS=$as_save_IFS
9055 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009057 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009058 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009060 break 2
9061 fi
9062done
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009064IFS=$as_save_IFS
9065
9066 ;;
9067esac
9068fi
9069ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9070if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9072$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009073else
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9075$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009076fi
9077
9078 if test "x$ac_pt_PKG_CONFIG" = x; then
9079 PKG_CONFIG=""
9080 else
9081 case $cross_compiling:$ac_tool_warned in
9082yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009083{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9084$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009085ac_tool_warned=yes ;;
9086esac
9087 PKG_CONFIG=$ac_pt_PKG_CONFIG
9088 fi
9089else
9090 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9091fi
9092
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009093
9094# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9096$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009097
9098# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009099if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009100 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009101else
9102 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009103fi
9104
9105
Matthias Kloseb9621712010-04-24 17:59:49 +00009106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9107$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009108
9109# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9111$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009112
9113# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009114if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009115 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009116else
9117 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009118fi
9119
9120
9121if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009122 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9123else
9124 LIBFFI_INCLUDEDIR=""
9125fi
9126
9127
Matthias Kloseb9621712010-04-24 17:59:49 +00009128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9129$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009130
Stefan Krah60187b52012-03-23 19:06:27 +01009131# Check for use of the system libmpdec library
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9133$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9134
9135# Check whether --with-system_libmpdec was given.
9136if test "${with_system_libmpdec+set}" = set; then :
9137 withval=$with_system_libmpdec;
9138else
9139 with_system_libmpdec="no"
9140fi
9141
9142
9143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9144$as_echo "$with_system_libmpdec" >&6; }
9145
Benjamin Peterson076ed002010-10-31 17:11:02 +00009146# Check for support for loadable sqlite extensions
9147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9148$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9149# Check whether --enable-loadable-sqlite-extensions was given.
9150if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9151 enableval=$enable_loadable_sqlite_extensions;
9152else
9153 enable_loadable_sqlite_extensions="no"
9154fi
9155
9156
9157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9158$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9159
Matthias Klose55708cc2009-04-30 08:06:49 +00009160# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9162$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009163
9164# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009165if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009166 withval=$with_dbmliborder;
9167if test x$with_dbmliborder = xyes
9168then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009169as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009170else
9171 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9172 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9173 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009174 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009175 fi
9176 done
9177fi
9178fi
9179
Matthias Kloseb9621712010-04-24 17:59:49 +00009180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9181$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009182
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009183# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009184
9185
Matthias Kloseb9621712010-04-24 17:59:49 +00009186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9187$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009189# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009190if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009191 withval=$with_signal_module;
9192fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009193
9194
9195if test -z "$with_signal_module"
9196then with_signal_module="yes"
9197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9199$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009200
9201if test "${with_signal_module}" = "yes"; then
9202 USE_SIGNAL_MODULE=""
9203 SIGNAL_OBJS=""
9204else
9205 USE_SIGNAL_MODULE="#"
9206 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9207fi
9208
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009209# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009210
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009211USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009213
Martin v. Löwis11437992002-04-12 09:54:03 +00009214
9215# Templates for things AC_DEFINEd more than once.
9216# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009217
9218
Martin v. Löwis11437992002-04-12 09:54:03 +00009219
Matthias Kloseb9621712010-04-24 17:59:49 +00009220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9221$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009222
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009223# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009224if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009225 withval=$with_threads;
9226fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009227
9228
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009229# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009231# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009232if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009233 withval=$with_thread; with_threads=$with_thread
9234fi
9235
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009236
9237if test -z "$with_threads"
9238then with_threads="yes"
9239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9241$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009242
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009243
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009244if test "$with_threads" = "no"
9245then
9246 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009247elif test "$ac_cv_pthread_is_default" = yes
9248then
Matthias Kloseb9621712010-04-24 17:59:49 +00009249 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009250
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009251 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009252 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009253
9254 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009255 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009256elif test "$ac_cv_kpthread" = "yes"
9257then
9258 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009259 if test "$ac_cv_cxx_thread" = "yes"; then
9260 CXX="$CXX -Kpthread"
9261 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009262 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009263
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009264 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009265 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009266elif test "$ac_cv_kthread" = "yes"
9267then
9268 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009269 if test "$ac_cv_cxx_thread" = "yes"; then
9270 CXX="$CXX -Kthread"
9271 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009272 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009273
9274 posix_threads=yes
9275 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009276elif test "$ac_cv_pthread" = "yes"
9277then
9278 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009279 if test "$ac_cv_cxx_thread" = "yes"; then
9280 CXX="$CXX -pthread"
9281 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009283
9284 posix_threads=yes
9285 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009286else
9287 if test ! -z "$with_threads" -a -d "$with_threads"
9288 then LDFLAGS="$LDFLAGS -L$with_threads"
9289 fi
9290 if test ! -z "$withval" -a -d "$withval"
9291 then LDFLAGS="$LDFLAGS -L$withval"
9292 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009293
9294 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009295 # define _POSIX_THREADS in unistd.h. Some apparently don't
9296 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9298$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009300/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009301
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009302#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009303#ifdef _POSIX_THREADS
9304yes
9305#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009306
9307_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009309 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009310 unistd_defines_pthreads=yes
9311else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009312 unistd_defines_pthreads=no
9313fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009314rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009315
Matthias Kloseb9621712010-04-24 17:59:49 +00009316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9317$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009318
Matthias Kloseb9621712010-04-24 17:59:49 +00009319 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009320
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009321 # Just looking for pthread_create in libpthread is not enough:
9322 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9323 # So we really have to include pthread.h, and then link.
9324 _libs=$LIBS
9325 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9327$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009329/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009330
9331#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009332#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009333
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009334void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009335int
9336main ()
9337{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009338
9339pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 ;
9341 return 0;
9342}
9343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009344if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009345
Matthias Kloseb9621712010-04-24 17:59:49 +00009346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9347$as_echo "yes" >&6; }
9348 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009349
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009350 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009351 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009352else
Martin v. Löwis11437992002-04-12 09:54:03 +00009353
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009354 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009355 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009356if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009357 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009358
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009359 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009360 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009361else
Guido van Rossumad678af1998-10-02 14:42:15 +00009362
Matthias Kloseb9621712010-04-24 17:59:49 +00009363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9364$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009365if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009366 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009367else
Martin v. Löwis11437992002-04-12 09:54:03 +00009368 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009369LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009371/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009372
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009373/* Override any GCC internal prototype to avoid an error.
9374 Use char because int might match the return type of a GCC
9375 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009376#ifdef __cplusplus
9377extern "C"
9378#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009379char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009380int
9381main ()
9382{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009383return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 ;
9385 return 0;
9386}
9387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009388if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009389 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009390else
Matthias Kloseb9621712010-04-24 17:59:49 +00009391 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009392fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009393rm -f core conftest.err conftest.$ac_objext \
9394 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009395LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9398$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009399if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009400 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009401
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009402 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009403 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009404 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009405else
Greg Steinadf63d62000-07-05 10:38:09 +00009406
Matthias Kloseb9621712010-04-24 17:59:49 +00009407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9408$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009409if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009410 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009411else
Martin v. Löwis11437992002-04-12 09:54:03 +00009412 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009413LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009416
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009417/* Override any GCC internal prototype to avoid an error.
9418 Use char because int might match the return type of a GCC
9419 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009420#ifdef __cplusplus
9421extern "C"
9422#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009423char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009424int
9425main ()
9426{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009427return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009428 ;
9429 return 0;
9430}
9431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009432if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009434else
Matthias Kloseb9621712010-04-24 17:59:49 +00009435 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009437rm -f core conftest.err conftest.$ac_objext \
9438 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009439LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9442$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009443if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009444 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009445
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009446 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009447 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009448 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009449else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009450
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9452$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009453if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009454 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009455else
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009457LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009460
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009461/* Override any GCC internal prototype to avoid an error.
9462 Use char because int might match the return type of a GCC
9463 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009464#ifdef __cplusplus
9465extern "C"
9466#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009467char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009468int
9469main ()
9470{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009471return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009472 ;
9473 return 0;
9474}
9475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009476if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009478else
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009481rm -f core conftest.err conftest.$ac_objext \
9482 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009483LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9486$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009487if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009488 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009489
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009490 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009491 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009492 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009493else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009494
Matthias Kloseb9621712010-04-24 17:59:49 +00009495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9496$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009497if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009498 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009499else
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009501LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009505/* Override any GCC internal prototype to avoid an error.
9506 Use char because int might match the return type of a GCC
9507 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009508#ifdef __cplusplus
9509extern "C"
9510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009511char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009512int
9513main ()
9514{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009515return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 ;
9517 return 0;
9518}
9519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009520if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009522else
Matthias Kloseb9621712010-04-24 17:59:49 +00009523 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009525rm -f core conftest.err conftest.$ac_objext \
9526 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009527LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009528fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9530$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009531if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009532 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009533
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009534 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009535 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009536 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009537else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009538
Martin v. Löwis130fb172001-07-19 11:00:41 +00009539 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009540fi
9541
Guido van Rossum627b2d71993-12-24 10:39:16 +00009542
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009543fi
9544
Guido van Rossum0be3e491997-05-22 20:33:33 +00009545fi
9546
Guido van Rossum49545951997-12-02 19:28:29 +00009547fi
9548
Guido van Rossumb93a8621998-05-07 13:27:32 +00009549fi
9550
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009552rm -f core conftest.err conftest.$ac_objext \
9553 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009554
Matthias Kloseb9621712010-04-24 17:59:49 +00009555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9556$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009557if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009558 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009559else
Martin v. Löwis11437992002-04-12 09:54:03 +00009560 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009561LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565/* Override any GCC internal prototype to avoid an error.
9566 Use char because int might match the return type of a GCC
9567 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009568#ifdef __cplusplus
9569extern "C"
9570#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009571char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009572int
9573main ()
9574{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009575return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ;
9577 return 0;
9578}
9579_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009580if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009581 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009582else
Matthias Kloseb9621712010-04-24 17:59:49 +00009583 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009585rm -f core conftest.err conftest.$ac_objext \
9586 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009587LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9590$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009591if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009593
Martin v. Löwis130fb172001-07-19 11:00:41 +00009594 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009595 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009596 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009597fi
9598
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009599
Neal Norwitza978ab02002-11-02 16:58:05 +00009600 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9602$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009603if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009604 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009605else
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009607LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009609/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611/* Override any GCC internal prototype to avoid an error.
9612 Use char because int might match the return type of a GCC
9613 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009614#ifdef __cplusplus
9615extern "C"
9616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009617char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009618int
9619main ()
9620{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009621return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 ;
9623 return 0;
9624}
9625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009626if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009628else
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009631rm -f core conftest.err conftest.$ac_objext \
9632 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009633LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9636$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009637if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009638 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009639
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009640 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009641 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009642 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009643fi
9644
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009645 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009646fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009647
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009648if test "$posix_threads" = "yes"; then
9649 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009650
Matthias Kloseb9621712010-04-24 17:59:49 +00009651$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009652
9653 fi
9654
9655 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9656 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009657 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009658$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009659
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009660 ;;
9661 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009662$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009663
9664 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009665 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009666$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009667
9668 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009669 esac
9670
Matthias Kloseb9621712010-04-24 17:59:49 +00009671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9672$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009673 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009674 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009675else
Matthias Kloseb9621712010-04-24 17:59:49 +00009676 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009677 ac_cv_pthread_system_supported=no
9678else
Matthias Kloseb9621712010-04-24 17:59:49 +00009679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009680/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009681
9682 #include <stdio.h>
9683 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009684 void *foo(void *parm) {
9685 return NULL;
9686 }
9687 main() {
9688 pthread_attr_t attr;
9689 pthread_t id;
9690 if (pthread_attr_init(&attr)) exit(-1);
9691 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9692 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9693 exit(0);
9694 }
9695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009696if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009697 ac_cv_pthread_system_supported=yes
9698else
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9702 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009703fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009705
Guido van Rossum627b2d71993-12-24 10:39:16 +00009706fi
9707
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9709$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009710 if test "$ac_cv_pthread_system_supported" = "yes"; then
9711
Matthias Kloseb9621712010-04-24 17:59:49 +00009712$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009713
9714 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009715 for ac_func in pthread_sigmask
9716do :
9717 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009718if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009719 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009720#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009721_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009722 case $ac_sys_system in
9723 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009724
Matthias Kloseb9621712010-04-24 17:59:49 +00009725$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009726
9727 ;;
9728 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009729fi
9730done
9731
9732fi
9733
9734
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009735# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009736
Matthias Kloseb9621712010-04-24 17:59:49 +00009737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9738$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009739# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009740if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009741 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009742 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9744$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009745 ipv6=no
9746 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009747 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9748$as_echo "yes" >&6; }
9749 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009750
9751 ipv6=yes
9752 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009754else
Martin v. Löwis11437992002-04-12 09:54:03 +00009755
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009757
Matthias Kloseb9621712010-04-24 17:59:49 +00009758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9759$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009760 ipv6=no
9761
9762else
Matthias Kloseb9621712010-04-24 17:59:49 +00009763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009764/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009765 /* AF_INET6 available check */
9766#include <sys/types.h>
9767#include <sys/socket.h>
9768main()
9769{
9770 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9771 exit(1);
9772 else
9773 exit(0);
9774}
9775
Martin v. Löwis11437992002-04-12 09:54:03 +00009776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009777if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009778
Matthias Kloseb9621712010-04-24 17:59:49 +00009779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9780$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009781 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009782
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009783else
Matthias Kloseb159a552010-04-25 21:00:44 +00009784
Matthias Kloseb9621712010-04-24 17:59:49 +00009785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9786$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009787 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009788
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009792fi
9793
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009795if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9797$as_echo_n "checking if RFC2553 API is available... " >&6; }
9798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009799/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009800
9801 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009802#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009803int
9804main ()
9805{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009806struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009807 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009808 ;
9809 return 0;
9810}
Matthias Kloseb159a552010-04-25 21:00:44 +00009811
Martin v. Löwis11437992002-04-12 09:54:03 +00009812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009813if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009814
9815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009816$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009817 ipv6=yes
9818
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009819else
Matthias Kloseb159a552010-04-25 21:00:44 +00009820
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009822$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009823 ipv6=no
9824
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009825fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009827fi
9828
9829if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009831
9832fi
9833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834fi
9835
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009836
9837ipv6type=unknown
9838ipv6lib=none
9839ipv6trylibc=no
9840
9841if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9843$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009844 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9845 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009846 case $i in
9847 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009849/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009850
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009851#include <netinet/in.h>
9852#ifdef IPV6_INRIA_VERSION
9853yes
9854#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009855_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009857 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009858 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009859fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009860rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009861
9862 ;;
9863 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009865/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009866
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009867#include <netinet/in.h>
9868#ifdef __KAME__
9869yes
9870#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009871_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009872if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009873 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009874 ipv6type=$i;
9875 ipv6lib=inet6
9876 ipv6libdir=/usr/local/v6/lib
9877 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009878fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009879rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009880
9881 ;;
9882 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009884/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009885
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009886#include <features.h>
9887#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9888yes
9889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009890_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009891if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009892 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893 ipv6type=$i;
9894 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009895fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009896rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009897
9898 ;;
9899 linux-inet6)
9900 if test -d /usr/inet6; then
9901 ipv6type=$i
9902 ipv6lib=inet6
9903 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009904 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009905 fi
9906 ;;
9907 solaris)
9908 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009909 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009910 ipv6type=$i
9911 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912 fi
9913 fi
9914 ;;
9915 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009917/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009919#include <sys/param.h>
9920#ifdef _TOSHIBA_INET6
9921yes
9922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009923_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009925 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009926 ipv6type=$i;
9927 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009928 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009929fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009930rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009931
9932 ;;
9933 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009935/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009936
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009937#include </usr/local/v6/include/sys/v6config.h>
9938#ifdef __V6D__
9939yes
9940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009941_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009943 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009944 ipv6type=$i;
9945 ipv6lib=v6;
9946 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009947 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009948fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009949rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009950
9951 ;;
9952 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009954/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009955
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009956#include <sys/param.h>
9957#ifdef _ZETA_MINAMI_INET6
9958yes
9959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009960_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009961if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009963 ipv6type=$i;
9964 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009965 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009966fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009967rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009968
9969 ;;
9970 esac
9971 if test "$ipv6type" != "unknown"; then
9972 break
9973 fi
9974 done
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
9976$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009977fi
9978
9979if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
9980 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
9981 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
9982 echo "using lib$ipv6lib"
9983 else
9984 if test $ipv6trylibc = "yes"; then
9985 echo "using libc"
9986 else
9987 echo 'Fatal: no $ipv6lib library found. cannot continue.'
9988 echo "You need to fetch lib$ipv6lib.a from appropriate"
9989 echo 'ipv6 kit and compile beforehand.'
9990 exit 1
9991 fi
9992 fi
9993fi
9994
Matthias Kloseb9621712010-04-24 17:59:49 +00009995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
9996$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
9997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009998/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009999
10000 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010001int
10002main ()
10003{
10004FSIORefNum fRef = 0
10005 ;
10006 return 0;
10007}
Matthias Kloseb159a552010-04-25 21:00:44 +000010008
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010010if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010011
Matthias Kloseb159a552010-04-25 21:00:44 +000010012
Matthias Kloseb9621712010-04-24 17:59:49 +000010013$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010014
Matthias Kloseb9621712010-04-24 17:59:49 +000010015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10016$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010017
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010018else
Matthias Kloseb159a552010-04-25 21:00:44 +000010019
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10021$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010022
10023fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10025
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010026# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10028$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010031if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010032 withval=$with_doc_strings;
10033fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010034
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010035
10036if test -z "$with_doc_strings"
10037then with_doc_strings="yes"
10038fi
10039if test "$with_doc_strings" != "no"
10040then
10041
Matthias Kloseb9621712010-04-24 17:59:49 +000010042$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010043
10044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10046$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010047
Antoine Pitrou042b1282010-08-13 21:15:58 +000010048# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10050$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010052# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010053if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010054 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010055if test "$withval" != no
10056then
10057
Matthias Kloseb9621712010-04-24 17:59:49 +000010058$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010059
Matthias Kloseb9621712010-04-24 17:59:49 +000010060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10061$as_echo "yes" >&6; }
10062else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10063$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010064fi
10065else
Matthias Kloseb9621712010-04-24 17:59:49 +000010066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10067$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068fi
10069
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010070
10071# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10073$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010076if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010077 withval=$with_pymalloc;
10078fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010079
Neil Schemenauera35c6882001-02-27 04:45:05 +000010080
Neil Schemenauer16c22972002-03-22 15:34:49 +000010081if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010082then
10083 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010084fi
10085if test "$with_pymalloc" != "no"
10086then
Martin v. Löwis11437992002-04-12 09:54:03 +000010087
Matthias Kloseb9621712010-04-24 17:59:49 +000010088$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010089
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010090 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10093$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010094
Benjamin Peterson05159c42009-12-03 03:01:27 +000010095# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10097$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010098
10099# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010100if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010101 withval=$with_valgrind;
10102else
10103 with_valgrind=no
10104fi
10105
Matthias Kloseb9621712010-04-24 17:59:49 +000010106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10107$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010108if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010109 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 +020010110if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010111
Matthias Kloseb9621712010-04-24 17:59:49 +000010112$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010113
10114else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010115 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010116
10117fi
10118
10119
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010120 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010121fi
10122
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010123# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010124
Guido van Rossum98935bf2001-09-05 19:13:16 +000010125DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010126
Guido van Rossume97ee181999-12-20 21:27:22 +000010127# the dlopen() function means we might want to use dynload_shlib.o. some
10128# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010129for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010130do :
10131 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010132if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010133 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010134#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010135_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010136
Guido van Rossume97ee181999-12-20 21:27:22 +000010137fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010138done
Guido van Rossume97ee181999-12-20 21:27:22 +000010139
Michael W. Hudson54241132001-12-07 15:38:26 +000010140
Guido van Rossume97ee181999-12-20 21:27:22 +000010141# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10142# loading of modules.
10143
Matthias Kloseb9621712010-04-24 17:59:49 +000010144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10145$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010146if test -z "$DYNLOADFILE"
10147then
10148 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010149 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10150 if test "$ac_cv_func_dlopen" = yes
10151 then DYNLOADFILE="dynload_shlib.o"
10152 else DYNLOADFILE="dynload_aix.o"
10153 fi
10154 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010155 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010156 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10157 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010158 *)
10159 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10160 # out any dynamic loading
10161 if test "$ac_cv_func_dlopen" = yes
10162 then DYNLOADFILE="dynload_shlib.o"
10163 else DYNLOADFILE="dynload_stub.o"
10164 fi
10165 ;;
10166 esac
10167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10169$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010170if test "$DYNLOADFILE" != "dynload_stub.o"
10171then
Martin v. Löwis11437992002-04-12 09:54:03 +000010172
Matthias Kloseb9621712010-04-24 17:59:49 +000010173$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010174
10175fi
10176
Neil Schemenauer4e425612001-06-19 15:44:15 +000010177# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10178
Michael W. Hudson54241132001-12-07 15:38:26 +000010179
Matthias Kloseb9621712010-04-24 17:59:49 +000010180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10181$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010182if test -z "$MACHDEP_OBJS"
10183then
Jack Jansene578a632001-08-15 01:27:14 +000010184 MACHDEP_OBJS=$extra_machdep_objs
10185else
10186 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010187fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010188if test -z "$MACHDEP_OBJS"; then
10189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10190$as_echo "none" >&6; }
10191else
10192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10193$as_echo "$MACHDEP_OBJS" >&6; }
10194fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010195
Guido van Rossum627b2d71993-12-24 10:39:16 +000010196# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010197for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010198 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010199 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010200 futimens futimes gai_strerror \
10201 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010202 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010203 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010204 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10205 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010206 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010207 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010208 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010209 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010210 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010211 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010212 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10213 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010214 sigaction sigaltstack siginterrupt sigpending sigrelse \
10215 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010216 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010217 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10218 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010219do :
10220 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10221ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010222if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010224#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010225_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010226
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010227fi
10228done
10229
Michael W. Hudson54241132001-12-07 15:38:26 +000010230
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010231ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10232 #include <dirent.h>
10233"
10234if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10235
10236$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10237
10238fi
10239
10240
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010241# For some functions, having a definition is not sufficient, since
10242# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10244$as_echo_n "checking for chroot... " >&6; }
10245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010246/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010247#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010248int
10249main ()
10250{
10251void *x=chroot
10252 ;
10253 return 0;
10254}
10255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010256if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010257
Matthias Kloseb9621712010-04-24 17:59:49 +000010258$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010259
Matthias Kloseb159a552010-04-25 21:00:44 +000010260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010261$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010262else
Matthias Kloseb9621712010-04-24 17:59:49 +000010263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10264$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010265
10266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10269$as_echo_n "checking for link... " >&6; }
10270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010271/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010272#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010273int
10274main ()
10275{
10276void *x=link
10277 ;
10278 return 0;
10279}
10280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010281if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010282
Matthias Kloseb9621712010-04-24 17:59:49 +000010283$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010284
Matthias Kloseb159a552010-04-25 21:00:44 +000010285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010286$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010287else
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010290
10291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10294$as_echo_n "checking for symlink... " >&6; }
10295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010296/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010297#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010298int
10299main ()
10300{
10301void *x=symlink
10302 ;
10303 return 0;
10304}
10305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010307
Matthias Kloseb9621712010-04-24 17:59:49 +000010308$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010309
Matthias Kloseb159a552010-04-25 21:00:44 +000010310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010311$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010312else
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010315
10316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10319$as_echo_n "checking for fchdir... " >&6; }
10320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010321/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010322#include <unistd.h>
10323int
10324main ()
10325{
10326void *x=fchdir
10327 ;
10328 return 0;
10329}
10330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010332
Matthias Kloseb9621712010-04-24 17:59:49 +000010333$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010334
Matthias Kloseb159a552010-04-25 21:00:44 +000010335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010336$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010337else
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10339$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010340
10341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10344$as_echo_n "checking for fsync... " >&6; }
10345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010346/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010347#include <unistd.h>
10348int
10349main ()
10350{
10351void *x=fsync
10352 ;
10353 return 0;
10354}
10355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010356if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010357
Matthias Kloseb9621712010-04-24 17:59:49 +000010358$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010359
Matthias Kloseb159a552010-04-25 21:00:44 +000010360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010361$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010362else
Matthias Kloseb9621712010-04-24 17:59:49 +000010363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10364$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010365
10366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10369$as_echo_n "checking for fdatasync... " >&6; }
10370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010371/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010372#include <unistd.h>
10373int
10374main ()
10375{
10376void *x=fdatasync
10377 ;
10378 return 0;
10379}
10380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010382
Matthias Kloseb9621712010-04-24 17:59:49 +000010383$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010384
Matthias Kloseb159a552010-04-25 21:00:44 +000010385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010386$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010387else
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10389$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010390
10391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10394$as_echo_n "checking for epoll... " >&6; }
10395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010396/* end confdefs.h. */
10397#include <sys/epoll.h>
10398int
10399main ()
10400{
10401void *x=epoll_create
10402 ;
10403 return 0;
10404}
10405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010407
Matthias Kloseb9621712010-04-24 17:59:49 +000010408$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010409
Matthias Kloseb159a552010-04-25 21:00:44 +000010410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010411$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010412else
Matthias Kloseb9621712010-04-24 17:59:49 +000010413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10414$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010415
10416fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10419$as_echo_n "checking for epoll_create1... " >&6; }
10420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10421/* end confdefs.h. */
10422#include <sys/epoll.h>
10423int
10424main ()
10425{
10426void *x=epoll_create1
10427 ;
10428 return 0;
10429}
10430_ACEOF
10431if ac_fn_c_try_compile "$LINENO"; then :
10432
10433$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10434
10435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10436$as_echo "yes" >&6; }
10437else
10438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10439$as_echo "no" >&6; }
10440
10441fi
10442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10444$as_echo_n "checking for kqueue... " >&6; }
10445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010446/* end confdefs.h. */
10447
10448#include <sys/types.h>
10449#include <sys/event.h>
10450
10451int
10452main ()
10453{
10454int x=kqueue()
10455 ;
10456 return 0;
10457}
10458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010459if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010460
Matthias Kloseb9621712010-04-24 17:59:49 +000010461$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010462
Matthias Kloseb159a552010-04-25 21:00:44 +000010463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010464$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010465else
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010468
10469fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010471# On some systems (eg. FreeBSD 5), we would find a definition of the
10472# functions ctermid_r, setgroups in the library, but no prototype
10473# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10474# address to avoid compiler warnings and potential miscompilations
10475# because of the missing prototypes.
10476
Matthias Kloseb9621712010-04-24 17:59:49 +000010477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10478$as_echo_n "checking for ctermid_r... " >&6; }
10479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010480/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010481
Martin v. Löwisd5843682002-11-21 20:41:28 +000010482#include <stdio.h>
10483
Martin v. Löwisd5843682002-11-21 20:41:28 +000010484int
10485main ()
10486{
10487void* p = ctermid_r
10488 ;
10489 return 0;
10490}
10491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010492if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010493
Matthias Kloseb9621712010-04-24 17:59:49 +000010494$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010495
Matthias Kloseb159a552010-04-25 21:00:44 +000010496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010497$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010498else
Matthias Kloseb9621712010-04-24 17:59:49 +000010499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010501
10502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10504
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10506$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010507if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010508 $as_echo_n "(cached) " >&6
10509else
10510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010511/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010512#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010513int
10514main ()
10515{
10516void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010517
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010518 ;
10519 return 0;
10520}
10521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010522if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010523 ac_cv_flock_decl=yes
10524else
10525 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010526
10527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010529
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010530fi
10531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10532$as_echo "$ac_cv_flock_decl" >&6; }
10533if test "x${ac_cv_flock_decl}" = xyes; then
10534 for ac_func in flock
10535do :
10536 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010537if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010538 cat >>confdefs.h <<_ACEOF
10539#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010540_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010541
Antoine Pitroua3000072010-09-07 14:52:42 +000010542else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010544$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010545if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010546 $as_echo_n "(cached) " >&6
10547else
10548 ac_check_lib_save_LIBS=$LIBS
10549LIBS="-lbsd $LIBS"
10550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10551/* end confdefs.h. */
10552
10553/* Override any GCC internal prototype to avoid an error.
10554 Use char because int might match the return type of a GCC
10555 builtin and then its argument prototype would still apply. */
10556#ifdef __cplusplus
10557extern "C"
10558#endif
10559char flock ();
10560int
10561main ()
10562{
10563return flock ();
10564 ;
10565 return 0;
10566}
10567_ACEOF
10568if ac_fn_c_try_link "$LINENO"; then :
10569 ac_cv_lib_bsd_flock=yes
10570else
10571 ac_cv_lib_bsd_flock=no
10572fi
10573rm -f core conftest.err conftest.$ac_objext \
10574 conftest$ac_exeext conftest.$ac_ext
10575LIBS=$ac_check_lib_save_LIBS
10576fi
10577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10578$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010579if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010580 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010581
10582
10583$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10584
10585
10586fi
10587
10588
10589fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010590done
10591
Antoine Pitroua3000072010-09-07 14:52:42 +000010592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010593
Matthias Kloseb9621712010-04-24 17:59:49 +000010594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10595$as_echo_n "checking for getpagesize... " >&6; }
10596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010597/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010598
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010599#include <unistd.h>
10600
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010601int
10602main ()
10603{
10604void* p = getpagesize
10605 ;
10606 return 0;
10607}
10608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010609if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010610
Matthias Kloseb9621712010-04-24 17:59:49 +000010611$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010612
Matthias Kloseb159a552010-04-25 21:00:44 +000010613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010614$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010615else
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10617$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010618
10619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010621
Victor Stinner984890f2011-11-24 13:53:38 +010010622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10623$as_echo_n "checking for broken unsetenv... " >&6; }
10624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10625/* end confdefs.h. */
10626
10627#include <stdlib.h>
10628
10629int
10630main ()
10631{
10632int res = unsetenv("DUMMY")
10633 ;
10634 return 0;
10635}
10636_ACEOF
10637if ac_fn_c_try_compile "$LINENO"; then :
10638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10639$as_echo "no" >&6; }
10640else
10641
10642$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10643
10644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10645$as_echo "yes" >&6; }
10646
10647fi
10648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10649
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010650for ac_prog in true
10651do
10652 # Extract the first word of "$ac_prog", so it can be a program name with args.
10653set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10655$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010656if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010658else
10659 if test -n "$TRUE"; then
10660 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10661else
10662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10663for as_dir in $PATH
10664do
10665 IFS=$as_save_IFS
10666 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010667 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010668 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010669 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 $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 +000010671 break 2
10672 fi
10673done
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010676
10677fi
10678fi
10679TRUE=$ac_cv_prog_TRUE
10680if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10682$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010683else
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10685$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010686fi
10687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010689 test -n "$TRUE" && break
10690done
10691test -n "$TRUE" || TRUE="/bin/true"
10692
10693
Matthias Kloseb9621712010-04-24 17:59:49 +000010694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10695$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010696if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010698else
10699 ac_check_lib_save_LIBS=$LIBS
10700LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010702/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010704/* Override any GCC internal prototype to avoid an error.
10705 Use char because int might match the return type of a GCC
10706 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010707#ifdef __cplusplus
10708extern "C"
10709#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010710char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010711int
10712main ()
10713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010714return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010715 ;
10716 return 0;
10717}
10718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010720 ac_cv_lib_c_inet_aton=yes
10721else
Matthias Kloseb9621712010-04-24 17:59:49 +000010722 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010724rm -f core conftest.err conftest.$ac_objext \
10725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010726LIBS=$ac_check_lib_save_LIBS
10727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10729$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010730if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010731 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010732else
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10734$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010735if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010737else
10738 ac_check_lib_save_LIBS=$LIBS
10739LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010741/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743/* Override any GCC internal prototype to avoid an error.
10744 Use char because int might match the return type of a GCC
10745 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010746#ifdef __cplusplus
10747extern "C"
10748#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010749char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010750int
10751main ()
10752{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010753return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010754 ;
10755 return 0;
10756}
10757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010758if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010759 ac_cv_lib_resolv_inet_aton=yes
10760else
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010763rm -f core conftest.err conftest.$ac_objext \
10764 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010765LIBS=$ac_check_lib_save_LIBS
10766fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10768$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010769if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010770 cat >>confdefs.h <<_ACEOF
10771#define HAVE_LIBRESOLV 1
10772_ACEOF
10773
10774 LIBS="-lresolv $LIBS"
10775
10776fi
10777
10778
10779fi
10780
10781
Christian Heimesd0764e22007-12-04 15:00:33 +000010782# On Tru64, chflags seems to be present, but calling it will
10783# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10785$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010786if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010788else
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010790 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010791else
Matthias Kloseb9621712010-04-24 17:59:49 +000010792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010793/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010794
Christian Heimesd0764e22007-12-04 15:00:33 +000010795#include <sys/stat.h>
10796#include <unistd.h>
10797int main(int argc, char*argv[])
10798{
10799 if(chflags(argv[0], 0) != 0)
10800 return 1;
10801 return 0;
10802}
Ned Deily3eb67d52011-06-28 00:00:28 -070010803
Christian Heimesd0764e22007-12-04 15:00:33 +000010804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010805if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010806 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010807else
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10811 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010812fi
10813
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010814
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10817$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010818if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010820if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010821 ac_cv_have_chflags="yes"
10822else
10823 ac_cv_have_chflags="no"
10824fi
10825
10826fi
10827if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010828
Matthias Kloseb9621712010-04-24 17:59:49 +000010829$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010830
10831fi
10832
Matthias Kloseb9621712010-04-24 17:59:49 +000010833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10834$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010835if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010837else
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010839 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010840else
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010842/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010843
Christian Heimesd0764e22007-12-04 15:00:33 +000010844#include <sys/stat.h>
10845#include <unistd.h>
10846int main(int argc, char*argv[])
10847{
10848 if(lchflags(argv[0], 0) != 0)
10849 return 1;
10850 return 0;
10851}
Ned Deily3eb67d52011-06-28 00:00:28 -070010852
Christian Heimesd0764e22007-12-04 15:00:33 +000010853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010854if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010855 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010856else
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10860 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010861fi
10862
10863
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10866$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010867if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010868 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010869if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010870 ac_cv_have_lchflags="yes"
10871else
10872 ac_cv_have_lchflags="no"
10873fi
10874
10875fi
10876if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010879
10880fi
10881
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010882case $ac_sys_system/$ac_sys_release in
10883Darwin/*)
10884 _CUR_CFLAGS="${CFLAGS}"
10885 _CUR_LDFLAGS="${LDFLAGS}"
10886 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10887 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10888 ;;
10889esac
10890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10892$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010893if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010895else
10896 ac_check_lib_save_LIBS=$LIBS
10897LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010899/* end confdefs.h. */
10900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010901/* Override any GCC internal prototype to avoid an error.
10902 Use char because int might match the return type of a GCC
10903 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010904#ifdef __cplusplus
10905extern "C"
10906#endif
10907char inflateCopy ();
10908int
10909main ()
10910{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010911return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010912 ;
10913 return 0;
10914}
10915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010916if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010917 ac_cv_lib_z_inflateCopy=yes
10918else
Matthias Kloseb9621712010-04-24 17:59:49 +000010919 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010921rm -f core conftest.err conftest.$ac_objext \
10922 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010923LIBS=$ac_check_lib_save_LIBS
10924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10926$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010927if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010928
Matthias Kloseb9621712010-04-24 17:59:49 +000010929$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010930
10931fi
10932
10933
10934case $ac_sys_system/$ac_sys_release in
10935Darwin/*)
10936 CFLAGS="${_CUR_CFLAGS}"
10937 LDFLAGS="${_CUR_LDFLAGS}"
10938 ;;
10939esac
10940
Matthias Kloseb9621712010-04-24 17:59:49 +000010941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10942$as_echo_n "checking for hstrerror... " >&6; }
10943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010944/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010945
Martin v. Löwise9416172003-05-03 10:12:45 +000010946#include <netdb.h>
10947
Martin v. Löwise9416172003-05-03 10:12:45 +000010948int
10949main ()
10950{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010951void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010952 ;
10953 return 0;
10954}
10955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010956if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010957
Matthias Kloseb9621712010-04-24 17:59:49 +000010958$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010959
Matthias Kloseb159a552010-04-25 21:00:44 +000010960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010961$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010962else
Matthias Kloseb9621712010-04-24 17:59:49 +000010963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10964$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010965
10966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010967rm -f core conftest.err conftest.$ac_objext \
10968 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969
Matthias Kloseb9621712010-04-24 17:59:49 +000010970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
10971$as_echo_n "checking for inet_aton... " >&6; }
10972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010973/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010974
Martin v. Löwis86d66262006-02-17 08:40:11 +000010975#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000010976#include <sys/socket.h>
10977#include <netinet/in.h>
10978#include <arpa/inet.h>
10979
Martin v. Löwise9416172003-05-03 10:12:45 +000010980int
10981main ()
10982{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010983void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010984 ;
10985 return 0;
10986}
10987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010988if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010989
Matthias Kloseb9621712010-04-24 17:59:49 +000010990$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010991
Matthias Kloseb159a552010-04-25 21:00:44 +000010992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010993$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010994else
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10996$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010997
10998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010999rm -f core conftest.err conftest.$ac_objext \
11000 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001
Matthias Kloseb9621712010-04-24 17:59:49 +000011002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11003$as_echo_n "checking for inet_pton... " >&6; }
11004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011005/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011006
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011007#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011008#include <sys/socket.h>
11009#include <netinet/in.h>
11010#include <arpa/inet.h>
11011
Martin v. Löwise9416172003-05-03 10:12:45 +000011012int
11013main ()
11014{
11015void* p = inet_pton
11016 ;
11017 return 0;
11018}
11019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011020if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011021
Matthias Kloseb9621712010-04-24 17:59:49 +000011022$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011023
Matthias Kloseb159a552010-04-25 21:00:44 +000011024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011025$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011026else
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11028$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011029
11030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011032
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011033# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11035$as_echo_n "checking for setgroups... " >&6; }
11036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011037/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011038
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011039#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011040#ifdef HAVE_GRP_H
11041#include <grp.h>
11042#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011043
Martin v. Löwisd5843682002-11-21 20:41:28 +000011044int
11045main ()
11046{
11047void* p = setgroups
11048 ;
11049 return 0;
11050}
11051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011052if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011053
Matthias Kloseb9621712010-04-24 17:59:49 +000011054$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011055
Matthias Kloseb159a552010-04-25 21:00:44 +000011056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011057$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011058else
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11060$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011061
11062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011064
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011065# check for openpty and forkpty
11066
11067for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011068do :
11069 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011070if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011071 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011072#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011073_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011074
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011075else
Matthias Kloseb9621712010-04-24 17:59:49 +000011076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11077$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011078if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011079 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011080else
Martin v. Löwis11437992002-04-12 09:54:03 +000011081 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011082LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086/* Override any GCC internal prototype to avoid an error.
11087 Use char because int might match the return type of a GCC
11088 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011089#ifdef __cplusplus
11090extern "C"
11091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011092char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011093int
11094main ()
11095{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011096return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 ;
11098 return 0;
11099}
11100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011101if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011102 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011103else
Matthias Kloseb9621712010-04-24 17:59:49 +000011104 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011106rm -f core conftest.err conftest.$ac_objext \
11107 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011108LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11111$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011112if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011113 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011114 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011115else
Matthias Kloseb9621712010-04-24 17:59:49 +000011116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11117$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011118if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011120else
11121 ac_check_lib_save_LIBS=$LIBS
11122LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011124/* end confdefs.h. */
11125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126/* Override any GCC internal prototype to avoid an error.
11127 Use char because int might match the return type of a GCC
11128 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011129#ifdef __cplusplus
11130extern "C"
11131#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011132char openpty ();
11133int
11134main ()
11135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011136return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011137 ;
11138 return 0;
11139}
11140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011141if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011142 ac_cv_lib_bsd_openpty=yes
11143else
Matthias Kloseb9621712010-04-24 17:59:49 +000011144 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011146rm -f core conftest.err conftest.$ac_objext \
11147 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011148LIBS=$ac_check_lib_save_LIBS
11149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11151$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011152if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011153 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011154 LIBS="$LIBS -lbsd"
11155fi
11156
11157
11158fi
11159
Fred Drake8cef4cf2000-06-28 16:40:38 +000011160
11161fi
11162done
11163
11164for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011165do :
11166 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011167if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011168 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011169#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011170_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011171
Fred Drake8cef4cf2000-06-28 16:40:38 +000011172else
Matthias Kloseb9621712010-04-24 17:59:49 +000011173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11174$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011175if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011176 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011177else
Martin v. Löwis11437992002-04-12 09:54:03 +000011178 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011179LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011180cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011183/* Override any GCC internal prototype to avoid an error.
11184 Use char because int might match the return type of a GCC
11185 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011186#ifdef __cplusplus
11187extern "C"
11188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011189char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011190int
11191main ()
11192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 ;
11195 return 0;
11196}
11197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011198if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011200else
Matthias Kloseb9621712010-04-24 17:59:49 +000011201 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011203rm -f core conftest.err conftest.$ac_objext \
11204 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011205LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11208$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011209if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011211 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011212else
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11214$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011215if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011216 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011217else
11218 ac_check_lib_save_LIBS=$LIBS
11219LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011221/* end confdefs.h. */
11222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223/* Override any GCC internal prototype to avoid an error.
11224 Use char because int might match the return type of a GCC
11225 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011226#ifdef __cplusplus
11227extern "C"
11228#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011229char forkpty ();
11230int
11231main ()
11232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011233return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011234 ;
11235 return 0;
11236}
11237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011238if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011239 ac_cv_lib_bsd_forkpty=yes
11240else
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011243rm -f core conftest.err conftest.$ac_objext \
11244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011245LIBS=$ac_check_lib_save_LIBS
11246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11248$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011249if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011250 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011251 LIBS="$LIBS -lbsd"
11252fi
11253
11254
11255fi
11256
Fred Drake8cef4cf2000-06-28 16:40:38 +000011257
11258fi
11259done
11260
Jack Jansendd19cf82001-12-06 22:36:17 +000011261
Christian Heimesb186d002008-03-18 15:15:01 +000011262# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011263for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011264do :
11265 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011266if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011267 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011268#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011269_ACEOF
11270
11271fi
11272done
11273
11274
Michael W. Hudson54241132001-12-07 15:38:26 +000011275# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011276for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011277do :
11278 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11279ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011280if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011282#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011283_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011284
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011285fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011286done
11287
Michael W. Hudson54241132001-12-07 15:38:26 +000011288
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011289ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011290if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011291 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011292
Martin v. Löwis1142de32002-03-29 16:28:31 +000011293else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011294 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011295 *" dup2.$ac_objext "* ) ;;
11296 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011297 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011298esac
11299
Martin v. Löwis1142de32002-03-29 16:28:31 +000011300fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011301
11302ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011303if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011304 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11305
11306else
11307 case " $LIBOBJS " in
11308 *" getcwd.$ac_objext "* ) ;;
11309 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11310 ;;
11311esac
11312
11313fi
11314
11315ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011316if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011317 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11318
11319else
11320 case " $LIBOBJS " in
11321 *" strdup.$ac_objext "* ) ;;
11322 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11323 ;;
11324esac
11325
11326fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011327
11328
11329for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011330do :
11331 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011332if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011334#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011337/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011338#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011339int
11340main ()
11341{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011342getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 ;
11344 return 0;
11345}
11346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011350
Guido van Rossum627b2d71993-12-24 10:39:16 +000011351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011353
Guido van Rossum627b2d71993-12-24 10:39:16 +000011354fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011355done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011356
Jack Jansen150753c2003-03-29 22:07:47 +000011357for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011358do :
11359 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011360if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011361 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011362#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011365/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011366#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011367int
11368main ()
11369{
11370setpgrp(0,0);
11371 ;
11372 return 0;
11373}
11374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011375if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011376
Matthias Kloseb9621712010-04-24 17:59:49 +000011377$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011378
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011381
11382fi
11383done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011384
Thomas Wouters3a584202000-08-05 23:28:51 +000011385for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011386do :
11387 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011388if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011390#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011393/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011394#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011395int
11396main ()
11397{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011398gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 ;
11400 return 0;
11401}
11402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011403if ac_fn_c_try_compile "$LINENO"; then :
11404
Guido van Rossum627b2d71993-12-24 10:39:16 +000011405else
Skip Montanaro6dead952003-09-25 14:50:04 +000011406
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011408
Martin v. Löwis11437992002-04-12 09:54:03 +000011409
Guido van Rossum627b2d71993-12-24 10:39:16 +000011410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011412
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011413fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011414done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011415
Michael W. Hudson54241132001-12-07 15:38:26 +000011416
Victor Stinnere0be4232011-10-25 13:06:09 +020011417for ac_func in clock_gettime
11418do :
11419 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11420if test "x$ac_cv_func_clock_gettime" = xyes; then :
11421 cat >>confdefs.h <<_ACEOF
11422#define HAVE_CLOCK_GETTIME 1
11423_ACEOF
11424
11425else
11426
11427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11428$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11429if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11430 $as_echo_n "(cached) " >&6
11431else
11432 ac_check_lib_save_LIBS=$LIBS
11433LIBS="-lrt $LIBS"
11434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11435/* end confdefs.h. */
11436
11437/* Override any GCC internal prototype to avoid an error.
11438 Use char because int might match the return type of a GCC
11439 builtin and then its argument prototype would still apply. */
11440#ifdef __cplusplus
11441extern "C"
11442#endif
11443char clock_gettime ();
11444int
11445main ()
11446{
11447return clock_gettime ();
11448 ;
11449 return 0;
11450}
11451_ACEOF
11452if ac_fn_c_try_link "$LINENO"; then :
11453 ac_cv_lib_rt_clock_gettime=yes
11454else
11455 ac_cv_lib_rt_clock_gettime=no
11456fi
11457rm -f core conftest.err conftest.$ac_objext \
11458 conftest$ac_exeext conftest.$ac_ext
11459LIBS=$ac_check_lib_save_LIBS
11460fi
11461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11462$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11463if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11464
11465 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11466
11467
11468$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11469
11470
11471fi
11472
11473
11474fi
11475done
11476
11477
11478for ac_func in clock_getres
11479do :
11480 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11481if test "x$ac_cv_func_clock_getres" = xyes; then :
11482 cat >>confdefs.h <<_ACEOF
11483#define HAVE_CLOCK_GETRES 1
11484_ACEOF
11485
11486else
11487
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11489$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11490if ${ac_cv_lib_rt_clock_getres+:} false; then :
11491 $as_echo_n "(cached) " >&6
11492else
11493 ac_check_lib_save_LIBS=$LIBS
11494LIBS="-lrt $LIBS"
11495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11496/* end confdefs.h. */
11497
11498/* Override any GCC internal prototype to avoid an error.
11499 Use char because int might match the return type of a GCC
11500 builtin and then its argument prototype would still apply. */
11501#ifdef __cplusplus
11502extern "C"
11503#endif
11504char clock_getres ();
11505int
11506main ()
11507{
11508return clock_getres ();
11509 ;
11510 return 0;
11511}
11512_ACEOF
11513if ac_fn_c_try_link "$LINENO"; then :
11514 ac_cv_lib_rt_clock_getres=yes
11515else
11516 ac_cv_lib_rt_clock_getres=no
11517fi
11518rm -f core conftest.err conftest.$ac_objext \
11519 conftest$ac_exeext conftest.$ac_ext
11520LIBS=$ac_check_lib_save_LIBS
11521fi
11522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11523$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11524if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11525
11526 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11527
11528
11529fi
11530
11531
11532fi
11533done
11534
11535
Matthias Kloseb9621712010-04-24 17:59:49 +000011536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11537$as_echo_n "checking for major... " >&6; }
11538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011539/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011540
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011541#if defined(MAJOR_IN_MKDEV)
11542#include <sys/mkdev.h>
11543#elif defined(MAJOR_IN_SYSMACROS)
11544#include <sys/sysmacros.h>
11545#else
11546#include <sys/types.h>
11547#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011548
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011549int
11550main ()
11551{
11552
11553 makedev(major(0),minor(0));
11554
11555 ;
11556 return 0;
11557}
11558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011559if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011560
11561
Matthias Kloseb9621712010-04-24 17:59:49 +000011562$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011563
Matthias Kloseb9621712010-04-24 17:59:49 +000011564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11565$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011566
11567else
Skip Montanaro6dead952003-09-25 14:50:04 +000011568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11570$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011571
11572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011573rm -f core conftest.err conftest.$ac_objext \
11574 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011575
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011576# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011577# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11579$as_echo_n "checking for getaddrinfo... " >&6; }
11580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011581/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011582
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011583#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011584#include <sys/socket.h>
11585#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011586#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011587
Martin v. Löwis11437992002-04-12 09:54:03 +000011588int
11589main ()
11590{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011591getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011592 ;
11593 return 0;
11594}
11595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011596if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011597 have_getaddrinfo=yes
11598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011601rm -f core conftest.err conftest.$ac_objext \
11602 conftest$ac_exeext conftest.$ac_ext
11603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11604$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011605if test $have_getaddrinfo = yes
11606then
Matthias Kloseb9621712010-04-24 17:59:49 +000011607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11608$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011609 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011611else
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011613
11614if test "${enable_ipv6+set}" = set; then
11615 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11616else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011617 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011618fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011619else
Matthias Kloseb9621712010-04-24 17:59:49 +000011620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011621/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011622
11623#include <sys/types.h>
11624#include <netdb.h>
11625#include <string.h>
11626#include <sys/socket.h>
11627#include <netinet/in.h>
11628
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011629int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011630{
11631 int passive, gaierr, inet4 = 0, inet6 = 0;
11632 struct addrinfo hints, *ai, *aitop;
11633 char straddr[INET6_ADDRSTRLEN], strport[16];
11634
11635 for (passive = 0; passive <= 1; passive++) {
11636 memset(&hints, 0, sizeof(hints));
11637 hints.ai_family = AF_UNSPEC;
11638 hints.ai_flags = passive ? AI_PASSIVE : 0;
11639 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011640 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011641 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11642 (void)gai_strerror(gaierr);
11643 goto bad;
11644 }
11645 for (ai = aitop; ai; ai = ai->ai_next) {
11646 if (ai->ai_addr == NULL ||
11647 ai->ai_addrlen == 0 ||
11648 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11649 straddr, sizeof(straddr), strport, sizeof(strport),
11650 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11651 goto bad;
11652 }
11653 switch (ai->ai_family) {
11654 case AF_INET:
11655 if (strcmp(strport, "54321") != 0) {
11656 goto bad;
11657 }
11658 if (passive) {
11659 if (strcmp(straddr, "0.0.0.0") != 0) {
11660 goto bad;
11661 }
11662 } else {
11663 if (strcmp(straddr, "127.0.0.1") != 0) {
11664 goto bad;
11665 }
11666 }
11667 inet4++;
11668 break;
11669 case AF_INET6:
11670 if (strcmp(strport, "54321") != 0) {
11671 goto bad;
11672 }
11673 if (passive) {
11674 if (strcmp(straddr, "::") != 0) {
11675 goto bad;
11676 }
11677 } else {
11678 if (strcmp(straddr, "::1") != 0) {
11679 goto bad;
11680 }
11681 }
11682 inet6++;
11683 break;
11684 case AF_UNSPEC:
11685 goto bad;
11686 break;
11687 default:
11688 /* another family support? */
11689 break;
11690 }
11691 }
11692 }
11693
11694 if (!(inet4 == 0 || inet4 == 2))
11695 goto bad;
11696 if (!(inet6 == 0 || inet6 == 2))
11697 goto bad;
11698
11699 if (aitop)
11700 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011701 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011702
11703 bad:
11704 if (aitop)
11705 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011706 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011707}
11708
Martin v. Löwis11437992002-04-12 09:54:03 +000011709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011710if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011711 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011712else
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11716 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011718
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011719fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011720
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011722
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11724$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11725
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011726if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011727then
11728 if test $ipv6 = yes
11729 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011730 echo 'Fatal: You must get working getaddrinfo() function.'
11731 echo ' or you can specify "--disable-ipv6"'.
11732 exit 1
11733 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011734else
Martin v. Löwis11437992002-04-12 09:54:03 +000011735
Matthias Kloseb9621712010-04-24 17:59:49 +000011736$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011737
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011738fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011739
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011740for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011741do :
11742 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011743if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011744 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011745#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011746_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011747
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011748fi
11749done
11750
Michael W. Hudson54241132001-12-07 15:38:26 +000011751
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011752# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11754$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011755if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011757else
Matthias Kloseb9621712010-04-24 17:59:49 +000011758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011759/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011760#include <sys/types.h>
11761#include <sys/time.h>
11762#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011763
Martin v. Löwis11437992002-04-12 09:54:03 +000011764int
11765main ()
11766{
11767if ((struct tm *) 0)
11768return 0;
11769 ;
11770 return 0;
11771}
11772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011773if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011774 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011775else
Matthias Kloseb9621712010-04-24 17:59:49 +000011776 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11781$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011782if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011785
11786fi
11787
Matthias Kloseb9621712010-04-24 17:59:49 +000011788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11789$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011790if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011792else
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011794/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011795#include <sys/types.h>
11796#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011797
Martin v. Löwis11437992002-04-12 09:54:03 +000011798int
11799main ()
11800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011801struct tm tm;
11802 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011804 ;
11805 return 0;
11806}
11807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011808if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011809 ac_cv_struct_tm=time.h
11810else
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11816$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011817if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011818
Matthias Kloseb9621712010-04-24 17:59:49 +000011819$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011820
11821fi
11822
Matthias Kloseb9621712010-04-24 17:59:49 +000011823ac_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 +000011824#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011825
Matthias Kloseb9621712010-04-24 17:59:49 +000011826"
Victor Stinnere0be4232011-10-25 13:06:09 +020011827if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011828
11829cat >>confdefs.h <<_ACEOF
11830#define HAVE_STRUCT_TM_TM_ZONE 1
11831_ACEOF
11832
11833
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011834fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011835
Martin v. Löwis11437992002-04-12 09:54:03 +000011836if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11837
Matthias Kloseb9621712010-04-24 17:59:49 +000011838$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011839
11840else
Matthias Kloseb9621712010-04-24 17:59:49 +000011841 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11842"
Victor Stinnere0be4232011-10-25 13:06:09 +020011843if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011844 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011845else
Matthias Kloseb9621712010-04-24 17:59:49 +000011846 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011847fi
11848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011849cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011850#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011851_ACEOF
11852
Matthias Kloseb9621712010-04-24 17:59:49 +000011853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11854$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011855if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011857else
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011859/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011860#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011861#if !HAVE_DECL_TZNAME
11862extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011864
Martin v. Löwis11437992002-04-12 09:54:03 +000011865int
11866main ()
11867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011868return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011869 ;
11870 return 0;
11871}
11872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011873if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011874 ac_cv_var_tzname=yes
11875else
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011878rm -f core conftest.err conftest.$ac_objext \
11879 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11882$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011883 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011884
Matthias Kloseb9621712010-04-24 17:59:49 +000011885$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011886
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011887 fi
11888fi
11889
Matthias Kloseb9621712010-04-24 17:59:49 +000011890ac_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 +020011891if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011892
11893cat >>confdefs.h <<_ACEOF
11894#define HAVE_STRUCT_STAT_ST_RDEV 1
11895_ACEOF
11896
11897
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011898fi
11899
Matthias Kloseb9621712010-04-24 17:59:49 +000011900ac_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 +020011901if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011902
Martin v. Löwis11437992002-04-12 09:54:03 +000011903cat >>confdefs.h <<_ACEOF
11904#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11905_ACEOF
11906
11907
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011908fi
11909
Matthias Kloseb9621712010-04-24 17:59:49 +000011910ac_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 +020011911if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011912
11913cat >>confdefs.h <<_ACEOF
11914#define HAVE_STRUCT_STAT_ST_FLAGS 1
11915_ACEOF
11916
11917
11918fi
11919
Matthias Kloseb9621712010-04-24 17:59:49 +000011920ac_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 +020011921if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011922
11923cat >>confdefs.h <<_ACEOF
11924#define HAVE_STRUCT_STAT_ST_GEN 1
11925_ACEOF
11926
11927
11928fi
11929
Matthias Kloseb9621712010-04-24 17:59:49 +000011930ac_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 +020011931if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011932
11933cat >>confdefs.h <<_ACEOF
11934#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11935_ACEOF
11936
11937
11938fi
11939
Matthias Kloseb9621712010-04-24 17:59:49 +000011940ac_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 +020011941if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011942
Martin v. Löwis11437992002-04-12 09:54:03 +000011943cat >>confdefs.h <<_ACEOF
11944#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11945_ACEOF
11946
11947
Matthias Kloseb9621712010-04-24 17:59:49 +000011948$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011949
11950else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011951 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011952 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011953 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11954 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011955esac
11956
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011957fi
11958
Michael W. Hudson54241132001-12-07 15:38:26 +000011959
Martin v. Löwis11437992002-04-12 09:54:03 +000011960
Matthias Kloseb9621712010-04-24 17:59:49 +000011961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11962$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011963if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011964 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011965else
Matthias Kloseb159a552010-04-25 21:00:44 +000011966
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011968/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011969#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011970int
11971main ()
11972{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011973return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011974 ;
11975 return 0;
11976}
11977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011978if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011979 ac_cv_header_time_altzone=yes
11980else
Matthias Kloseb9621712010-04-24 17:59:49 +000011981 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011985fi
11986
Matthias Kloseb9621712010-04-24 17:59:49 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11988$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011989if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011990
Matthias Kloseb9621712010-04-24 17:59:49 +000011991$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011992
11993fi
11994
Guido van Rossumda88dad1995-01-26 00:46:29 +000011995was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11997$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011999/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012000
12001#include <sys/types.h>
12002#include <sys/select.h>
12003#include <sys/time.h>
12004
Martin v. Löwis11437992002-04-12 09:54:03 +000012005int
12006main ()
12007{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012008;
Martin v. Löwis11437992002-04-12 09:54:03 +000012009 ;
12010 return 0;
12011}
12012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012013if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012014
12015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012017
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012018 was_it_defined=yes
12019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12023$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012024
Matthias Kloseb9621712010-04-24 17:59:49 +000012025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12026$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012027if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012029else
Matthias Kloseb9621712010-04-24 17:59:49 +000012030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012031/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012032#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012033int
12034main ()
12035{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012036struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012037 ;
12038 return 0;
12039}
12040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012041if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012042 ac_cv_struct_addrinfo=yes
12043else
Matthias Kloseb9621712010-04-24 17:59:49 +000012044 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12047fi
12048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12050$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012051if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012054
12055fi
12056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12058$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012059if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012061else
Matthias Kloseb9621712010-04-24 17:59:49 +000012062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012063/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012064
12065# include <sys/types.h>
12066# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012067int
12068main ()
12069{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012070struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012071 ;
12072 return 0;
12073}
12074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012075if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012076 ac_cv_struct_sockaddr_storage=yes
12077else
Matthias Kloseb9621712010-04-24 17:59:49 +000012078 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12081fi
12082
Matthias Kloseb9621712010-04-24 17:59:49 +000012083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12084$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012085if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012086
Matthias Kloseb9621712010-04-24 17:59:49 +000012087$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012088
12089fi
12090
Guido van Rossum627b2d71993-12-24 10:39:16 +000012091# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012092
Matthias Kloseb9621712010-04-24 17:59:49 +000012093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12094$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012095if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012097else
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012100$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012101int
12102main ()
12103{
12104static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012105test_array [0] = 0;
12106return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012107
12108 ;
12109 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012110}
Martin v. Löwis11437992002-04-12 09:54:03 +000012111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012112if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012113 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12120$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012121if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012123
12124fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012125
Matthias Kloseb9621712010-04-24 17:59:49 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12127$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012128if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012130else
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012132/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012133
Martin v. Löwis11437992002-04-12 09:54:03 +000012134int
12135main ()
12136{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012137
Martin v. Löwis11437992002-04-12 09:54:03 +000012138#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012139 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012140 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012141 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012142 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012143 char const *const *pcpcc;
12144 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012145 /* NEC SVR4.0.2 mips cc rejects this. */
12146 struct point {int x, y;};
12147 static struct point const zero = {0,0};
12148 /* AIX XL C 1.02.0.0 rejects this.
12149 It does not let you subtract one const X* pointer from another in
12150 an arm of an if-expression whose if-part is not a constant
12151 expression */
12152 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012153 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012154 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012155 ++pcpcc;
12156 ppc = (char**) pcpcc;
12157 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012158 { /* SCO 3.2v4 cc rejects this sort of thing. */
12159 char tx;
12160 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012162
Martin v. Löwis11437992002-04-12 09:54:03 +000012163 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012164 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012165 }
12166 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12167 int x[] = {25, 17};
12168 const int *foo = &x[0];
12169 ++foo;
12170 }
12171 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12172 typedef const int *iptr;
12173 iptr p = 0;
12174 ++p;
12175 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012176 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012178 struct s { int j; const int *ap[3]; } bx;
12179 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 }
12181 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12182 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012185 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012186#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012187
Martin v. Löwis11437992002-04-12 09:54:03 +000012188 ;
12189 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012190}
Martin v. Löwis11437992002-04-12 09:54:03 +000012191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012192if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012193 ac_cv_c_const=yes
12194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12200$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012201if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012202
Matthias Kloseb9621712010-04-24 17:59:49 +000012203$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012204
12205fi
12206
Michael W. Hudson54241132001-12-07 15:38:26 +000012207
Guido van Rossumda88dad1995-01-26 00:46:29 +000012208works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12210$as_echo_n "checking for working volatile... " >&6; }
12211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012212/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012213
Martin v. Löwis11437992002-04-12 09:54:03 +000012214int
12215main ()
12216{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012217volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 ;
12219 return 0;
12220}
12221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012222if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012223 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012224else
Skip Montanaro6dead952003-09-25 14:50:04 +000012225
Matthias Kloseb9621712010-04-24 17:59:49 +000012226$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012227
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012228
Guido van Rossum627b2d71993-12-24 10:39:16 +000012229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12232$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012233
Guido van Rossumda88dad1995-01-26 00:46:29 +000012234works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12236$as_echo_n "checking for working signed char... " >&6; }
12237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012238/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012239
Martin v. Löwis11437992002-04-12 09:54:03 +000012240int
12241main ()
12242{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012243signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012244 ;
12245 return 0;
12246}
12247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012248if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012249 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012250else
Skip Montanaro6dead952003-09-25 14:50:04 +000012251
Matthias Kloseb9621712010-04-24 17:59:49 +000012252$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012253
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012254
Guido van Rossum7f43da71994-08-01 12:15:30 +000012255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12258$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012259
Guido van Rossumda88dad1995-01-26 00:46:29 +000012260have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12262$as_echo_n "checking for prototypes... " >&6; }
12263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012264/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012265int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012266int
12267main ()
12268{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012269return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012270 ;
12271 return 0;
12272}
12273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012275
Matthias Kloseb9621712010-04-24 17:59:49 +000012276$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012277
Matthias Kloseb159a552010-04-25 21:00:44 +000012278 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12282$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012283
Guido van Rossumda88dad1995-01-26 00:46:29 +000012284works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12286$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012288/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012289
12290#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012291int foo(int x, ...) {
12292 va_list va;
12293 va_start(va, x);
12294 va_arg(va, int);
12295 va_arg(va, char *);
12296 va_arg(va, double);
12297 return 0;
12298}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012299
Martin v. Löwis11437992002-04-12 09:54:03 +000012300int
12301main ()
12302{
Guido van Rossum90eea071996-08-30 20:58:57 +000012303return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012304 ;
12305 return 0;
12306}
12307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012308if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012309
12310
Matthias Kloseb9621712010-04-24 17:59:49 +000012311$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012312
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012313 works=yes
12314
Guido van Rossum627b2d71993-12-24 10:39:16 +000012315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12318$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012319
Martin v. Löwisd6320502004-08-12 13:45:08 +000012320# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12322$as_echo_n "checking for socketpair... " >&6; }
12323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012324/* end confdefs.h. */
12325
12326#include <sys/types.h>
12327#include <sys/socket.h>
12328
12329int
12330main ()
12331{
12332void *x=socketpair
12333 ;
12334 return 0;
12335}
12336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012337if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012338
Matthias Kloseb9621712010-04-24 17:59:49 +000012339$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012340
Matthias Kloseb159a552010-04-25 21:00:44 +000012341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012342$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012343else
Matthias Kloseb9621712010-04-24 17:59:49 +000012344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12345$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012346
12347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012349
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012350# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12352$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012354/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012355#include <sys/types.h>
12356#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012357int
12358main ()
12359{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012360struct sockaddr x;
12361x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012362 ;
12363 return 0;
12364}
12365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012366if ac_fn_c_try_compile "$LINENO"; then :
12367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12368$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012371
12372else
Matthias Kloseb9621712010-04-24 17:59:49 +000012373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12374$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012375
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012378
Guido van Rossumda88dad1995-01-26 00:46:29 +000012379va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12381$as_echo_n "checking whether va_list is an array... " >&6; }
12382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012383/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012384
12385#ifdef HAVE_STDARG_PROTOTYPES
12386#include <stdarg.h>
12387#else
12388#include <varargs.h>
12389#endif
12390
Martin v. Löwis11437992002-04-12 09:54:03 +000012391int
12392main ()
12393{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012394va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012395 ;
12396 return 0;
12397}
12398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012399if ac_fn_c_try_compile "$LINENO"; then :
12400
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012401else
Skip Montanaro6dead952003-09-25 14:50:04 +000012402
Martin v. Löwis11437992002-04-12 09:54:03 +000012403
Matthias Kloseb9621712010-04-24 17:59:49 +000012404$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012405
Guido van Rossumda88dad1995-01-26 00:46:29 +000012406 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012407
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012408fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12411$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012412
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012413# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012414
12415
Matthias Kloseb9621712010-04-24 17:59:49 +000012416ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012417if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012418
Matthias Kloseb9621712010-04-24 17:59:49 +000012419 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012420
Matthias Kloseb9621712010-04-24 17:59:49 +000012421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12422$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012423 OLD_CFLAGS=$CFLAGS
12424 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012426/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012427
12428# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012429
Martin v. Löwis11437992002-04-12 09:54:03 +000012430int
12431main ()
12432{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012433
12434 char *name;
12435 struct hostent *he, *res;
12436 char buffer[2048];
12437 int buflen = 2048;
12438 int h_errnop;
12439
12440 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
12442 ;
12443 return 0;
12444}
12445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012446if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012449
Martin v. Löwis11437992002-04-12 09:54:03 +000012450
Matthias Kloseb9621712010-04-24 17:59:49 +000012451$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012452
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12454$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012455
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012456else
Skip Montanaro6dead952003-09-25 14:50:04 +000012457
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12459$as_echo "no" >&6; }
12460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12461$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012463/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012464
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012465# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012466
Martin v. Löwis11437992002-04-12 09:54:03 +000012467int
12468main ()
12469{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012470
12471 char *name;
12472 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012473 char buffer[2048];
12474 int buflen = 2048;
12475 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012476
Matthias Kloseb159a552010-04-25 21:00:44 +000012477 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
12479 ;
12480 return 0;
12481}
12482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012483if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012486
Martin v. Löwis11437992002-04-12 09:54:03 +000012487
Matthias Kloseb159a552010-04-25 21:00:44 +000012488$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12491$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012492
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012493else
Skip Montanaro6dead952003-09-25 14:50:04 +000012494
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12496$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12498$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12500/* end confdefs.h. */
12501
12502# include <netdb.h>
12503
12504int
12505main ()
12506{
12507
12508 char *name;
12509 struct hostent *he;
12510 struct hostent_data data;
12511
12512 (void) gethostbyname_r(name, he, &data);
12513
12514 ;
12515 return 0;
12516}
12517_ACEOF
12518if ac_fn_c_try_compile "$LINENO"; then :
12519
12520 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12521
12522
12523$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12524
12525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12526$as_echo "yes" >&6; }
12527
12528else
12529
12530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12531$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012532
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012535
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012538
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012541 CFLAGS=$OLD_CFLAGS
12542
12543else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545 for ac_func in gethostbyname
12546do :
12547 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012548if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012549 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012550#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012551_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012552
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012553fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012554done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012555
Michael W. Hudson54241132001-12-07 15:38:26 +000012556
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012557fi
12558
Michael W. Hudson54241132001-12-07 15:38:26 +000012559
12560
12561
12562
12563
12564
Guido van Rossum627b2d71993-12-24 10:39:16 +000012565# checks for system services
12566# (none yet)
12567
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012568# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012569ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012570if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012571
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012572else
Matthias Kloseb9621712010-04-24 17:59:49 +000012573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12574$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012575if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012577else
Martin v. Löwis11437992002-04-12 09:54:03 +000012578 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012579LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012583/* Override any GCC internal prototype to avoid an error.
12584 Use char because int might match the return type of a GCC
12585 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012586#ifdef __cplusplus
12587extern "C"
12588#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012589char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012590int
12591main ()
12592{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012593return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012594 ;
12595 return 0;
12596}
12597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012598if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012599 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012600else
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012603rm -f core conftest.err conftest.$ac_objext \
12604 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012605LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12608$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012609if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012610 cat >>confdefs.h <<_ACEOF
12611#define HAVE_LIBIEEE 1
12612_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012613
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012614 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012615
Guido van Rossum627b2d71993-12-24 10:39:16 +000012616fi
12617
Michael W. Hudson54241132001-12-07 15:38:26 +000012618
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012619fi
12620
Michael W. Hudson54241132001-12-07 15:38:26 +000012621
Guido van Rossum7f253911997-05-09 02:42:48 +000012622# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12624$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012626# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012627if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012629if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012630then
12631
Matthias Kloseb9621712010-04-24 17:59:49 +000012632$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012633
Matthias Kloseb9621712010-04-24 17:59:49 +000012634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12635$as_echo "yes" >&6; }
12636else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12637$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012638fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012639else
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12641$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012642fi
12643
Guido van Rossum7f253911997-05-09 02:42:48 +000012644
Guido van Rossum7f43da71994-08-01 12:15:30 +000012645# check for --with-libm=...
12646
Guido van Rossum563e7081996-09-10 18:20:48 +000012647case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012648Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012649*) LIBM=-lm
12650esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12652$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012653
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012654# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012655if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012656 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012657if test "$withval" = no
12658then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12660$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012661elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012662then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12664$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012665else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012666fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012667else
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12669$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012670fi
12671
Guido van Rossum7f43da71994-08-01 12:15:30 +000012672
12673# check for --with-libc=...
12674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12676$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012679if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012680 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012681if test "$withval" = no
12682then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12684$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012685elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012686then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12688$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012689else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012690fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012691else
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12693$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694fi
12695
Guido van Rossum7f43da71994-08-01 12:15:30 +000012696
Stefan Krah1919b7e2012-03-21 18:25:23 +010012697# **************************************
12698# * Check for gcc x64 inline assembler *
12699# **************************************
12700
12701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12702$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12704/* end confdefs.h. */
12705
12706int
12707main ()
12708{
12709
12710 __asm__ __volatile__ ("movq %rcx, %rax");
12711
12712 ;
12713 return 0;
12714}
12715_ACEOF
12716if ac_fn_c_try_compile "$LINENO"; then :
12717 have_gcc_asm_for_x64=yes
12718else
12719 have_gcc_asm_for_x64=no
12720fi
12721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12723$as_echo "$have_gcc_asm_for_x64" >&6; }
12724if test "$have_gcc_asm_for_x64" = yes
12725then
12726
12727$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12728
12729fi
12730
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012731# **************************************************
12732# * Check for various properties of floating point *
12733# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012734
Matthias Kloseb9621712010-04-24 17:59:49 +000012735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12736$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012737if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012739else
12740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012742 ac_cv_little_endian_double=no
12743else
Matthias Kloseb9621712010-04-24 17:59:49 +000012744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012745/* end confdefs.h. */
12746
12747#include <string.h>
12748int main() {
12749 double x = 9006104071832581.0;
12750 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12751 return 0;
12752 else
12753 return 1;
12754}
12755
12756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012757if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012758 ac_cv_little_endian_double=yes
12759else
Matthias Kloseb9621712010-04-24 17:59:49 +000012760 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12763 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012764fi
12765
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012766fi
12767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12769$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012770if test "$ac_cv_little_endian_double" = yes
12771then
12772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012774
12775fi
12776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12778$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012779if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012781else
12782
Matthias Kloseb9621712010-04-24 17:59:49 +000012783if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012784 ac_cv_big_endian_double=no
12785else
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012787/* end confdefs.h. */
12788
12789#include <string.h>
12790int main() {
12791 double x = 9006104071832581.0;
12792 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12793 return 0;
12794 else
12795 return 1;
12796}
12797
12798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012799if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012800 ac_cv_big_endian_double=yes
12801else
Matthias Kloseb9621712010-04-24 17:59:49 +000012802 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012803fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12805 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012806fi
12807
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012808fi
12809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12811$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012812if test "$ac_cv_big_endian_double" = yes
12813then
12814
Matthias Kloseb9621712010-04-24 17:59:49 +000012815$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012816
12817fi
12818
12819# Some ARM platforms use a mixed-endian representation for doubles.
12820# While Python doesn't currently have full support for these platforms
12821# (see e.g., issue 1762561), we can at least make sure that float <-> string
12822# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12824$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012825if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012827else
12828
Matthias Kloseb9621712010-04-24 17:59:49 +000012829if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012830 ac_cv_mixed_endian_double=no
12831else
Matthias Kloseb9621712010-04-24 17:59:49 +000012832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012833/* end confdefs.h. */
12834
12835#include <string.h>
12836int main() {
12837 double x = 9006104071832581.0;
12838 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12839 return 0;
12840 else
12841 return 1;
12842}
12843
12844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012845if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012846 ac_cv_mixed_endian_double=yes
12847else
Matthias Kloseb9621712010-04-24 17:59:49 +000012848 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012852fi
12853
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012854fi
12855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12857$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012858if test "$ac_cv_mixed_endian_double" = yes
12859then
12860
Matthias Kloseb9621712010-04-24 17:59:49 +000012861$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012862
12863fi
12864
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012865# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012866# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012867# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012868# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012869# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012870# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012871
12872# This inline assembler syntax may also work for suncc and icc,
12873# so we try it on all platforms.
12874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12876$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012878/* end confdefs.h. */
12879
12880int
12881main ()
12882{
12883
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012884 unsigned short cw;
12885 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12886 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012887
12888 ;
12889 return 0;
12890}
12891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012892if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012893 have_gcc_asm_for_x87=yes
12894else
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012896fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12899$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012900if test "$have_gcc_asm_for_x87" = yes
12901then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012902
Matthias Kloseb9621712010-04-24 17:59:49 +000012903$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012904
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012905fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012906
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012907# Detect whether system arithmetic is subject to x87-style double
12908# rounding issues. The result of this test has little meaning on non
12909# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12910# mode is round-to-nearest and double rounding issues are present, and
12911# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12913$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012914# $BASECFLAGS may affect the result
12915ac_save_cc="$CC"
12916CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012917if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012918 ac_cv_x87_double_rounding=no
12919else
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012921/* end confdefs.h. */
12922
12923#include <stdlib.h>
12924#include <math.h>
12925int main() {
12926 volatile double x, y, z;
12927 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12928 x = 0.99999999999999989; /* 1-2**-53 */
12929 y = 1./x;
12930 if (y != 1.)
12931 exit(0);
12932 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12933 x = 1e16;
12934 y = 2.99999;
12935 z = x + y;
12936 if (z != 1e16+4.)
12937 exit(0);
12938 /* both tests show evidence of double rounding */
12939 exit(1);
12940}
12941
12942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012943if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012944 ac_cv_x87_double_rounding=no
12945else
Matthias Kloseb9621712010-04-24 17:59:49 +000012946 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012948rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12949 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012950fi
12951
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012952CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12954$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012955if test "$ac_cv_x87_double_rounding" = yes
12956then
12957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012959
12960fi
12961
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012962# ************************************
12963# * Check for mathematical functions *
12964# ************************************
12965
12966LIBS_SAVE=$LIBS
12967LIBS="$LIBS $LIBM"
12968
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012969for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12970do :
12971 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12972ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012973if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012974 cat >>confdefs.h <<_ACEOF
12975#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12976_ACEOF
12977
12978fi
12979done
12980
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012981for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012982do :
12983 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12984ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012985if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012986 cat >>confdefs.h <<_ACEOF
12987#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12988_ACEOF
12989
12990fi
12991done
12992
12993ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12994"
Victor Stinnere0be4232011-10-25 13:06:09 +020012995if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012996 ac_have_decl=1
12997else
12998 ac_have_decl=0
12999fi
13000
13001cat >>confdefs.h <<_ACEOF
13002#define HAVE_DECL_ISINF $ac_have_decl
13003_ACEOF
13004ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13005"
Victor Stinnere0be4232011-10-25 13:06:09 +020013006if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013007 ac_have_decl=1
13008else
13009 ac_have_decl=0
13010fi
13011
13012cat >>confdefs.h <<_ACEOF
13013#define HAVE_DECL_ISNAN $ac_have_decl
13014_ACEOF
13015ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13016"
Victor Stinnere0be4232011-10-25 13:06:09 +020013017if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013018 ac_have_decl=1
13019else
13020 ac_have_decl=0
13021fi
13022
13023cat >>confdefs.h <<_ACEOF
13024#define HAVE_DECL_ISFINITE $ac_have_decl
13025_ACEOF
13026
13027
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013028# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13029# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13031$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013032if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013033 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013034else
13035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013037 ac_cv_tanh_preserves_zero_sign=no
13038else
Matthias Kloseb9621712010-04-24 17:59:49 +000013039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013040/* end confdefs.h. */
13041
13042#include <math.h>
13043#include <stdlib.h>
13044int main() {
13045 /* return 0 if either negative zeros don't exist
13046 on this platform or if negative zeros exist
13047 and tanh(-0.) == -0. */
13048 if (atan2(0., -1.) == atan2(-0., -1.) ||
13049 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13050 else exit(1);
13051}
13052
13053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013054if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013055 ac_cv_tanh_preserves_zero_sign=yes
13056else
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13060 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013061fi
13062
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013063fi
13064
Matthias Kloseb9621712010-04-24 17:59:49 +000013065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13066$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013067if test "$ac_cv_tanh_preserves_zero_sign" = yes
13068then
13069
Matthias Kloseb9621712010-04-24 17:59:49 +000013070$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013071
13072fi
13073
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013074if test "$ac_cv_func_log1p" = yes
13075then
13076 # On some versions of AIX, log1p(-0.) returns 0. instead of
13077 # -0. See issue #9920.
13078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13079$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013080 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013081 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013082else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013083
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013084 if test "$cross_compiling" = yes; then :
13085 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013086else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13088/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013089
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013090 #include <math.h>
13091 #include <stdlib.h>
13092 int main() {
13093 /* Fail if the signs of log1p(-0.) and -0. can be
13094 distinguished. */
13095 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13096 return 0;
13097 else
13098 return 1;
13099 }
13100
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013101_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013102if ac_fn_c_try_run "$LINENO"; then :
13103 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013104else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013105 ac_cv_log1p_drops_zero_sign=yes
13106fi
13107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13108 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013109fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013110
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013111fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013112
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13114$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13115fi
13116if test "$ac_cv_log1p_drops_zero_sign" = yes
13117then
13118
13119$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13120
13121fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013122
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013123LIBS=$LIBS_SAVE
13124
Mark Dickinsona614f042009-11-28 12:48:43 +000013125# For multiprocessing module, check that sem_open
13126# actually works. For FreeBSD versions <= 7.2,
13127# the kernel module that provides POSIX semaphores
13128# isn't loaded by default, so an attempt to call
13129# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13131$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013132if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013134else
Matthias Kloseb9621712010-04-24 17:59:49 +000013135 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013136 ac_cv_posix_semaphores_enabled=yes
13137else
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013139/* end confdefs.h. */
13140
13141#include <unistd.h>
13142#include <fcntl.h>
13143#include <stdio.h>
13144#include <semaphore.h>
13145#include <sys/stat.h>
13146
13147int main(void) {
13148 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13149 if (a == SEM_FAILED) {
13150 perror("sem_open");
13151 return 1;
13152 }
13153 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013154 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013155 return 0;
13156}
13157
13158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013159if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013160 ac_cv_posix_semaphores_enabled=yes
13161else
Matthias Kloseb9621712010-04-24 17:59:49 +000013162 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13165 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013166fi
13167
13168
Mark Dickinsona614f042009-11-28 12:48:43 +000013169fi
13170
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13172$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013173if test $ac_cv_posix_semaphores_enabled = no
13174then
13175
Matthias Kloseb9621712010-04-24 17:59:49 +000013176$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013177
13178fi
13179
Mark Dickinson10683072009-04-18 21:18:19 +000013180# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13182$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013183if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013184 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013185else
Matthias Kloseb9621712010-04-24 17:59:49 +000013186 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013187 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013188else
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013190/* end confdefs.h. */
13191
13192#include <unistd.h>
13193#include <fcntl.h>
13194#include <stdio.h>
13195#include <semaphore.h>
13196#include <sys/stat.h>
13197
13198int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013199 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013200 int count;
13201 int res;
13202 if(a==SEM_FAILED){
13203 perror("sem_open");
13204 return 1;
13205
13206 }
13207 res = sem_getvalue(a, &count);
13208 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013209 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013210 return res==-1 ? 1 : 0;
13211}
13212
Mark Dickinson10683072009-04-18 21:18:19 +000013213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013214if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013215 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013216else
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13220 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013221fi
13222
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013223
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013224fi
13225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13227$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013228if test $ac_cv_broken_sem_getvalue = yes
13229then
13230
Matthias Kloseb9621712010-04-24 17:59:49 +000013231$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013232
13233fi
13234
Mark Dickinsonbd792642009-03-18 20:06:12 +000013235# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13237$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013238# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013239if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013240 enableval=$enable_big_digits; case $enable_big_digits in
13241yes)
13242 enable_big_digits=30 ;;
13243no)
13244 enable_big_digits=15 ;;
1324515|30)
13246 ;;
13247*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013248 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 +000013249esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13251$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013252
13253cat >>confdefs.h <<_ACEOF
13254#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13255_ACEOF
13256
13257
13258else
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13260$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013261fi
13262
13263
Guido van Rossumef2255b2000-03-10 22:30:29 +000013264# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013265ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013266if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013267
13268
Matthias Kloseb9621712010-04-24 17:59:49 +000013269$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013270
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013271 wchar_h="yes"
13272
Guido van Rossumef2255b2000-03-10 22:30:29 +000013273else
Martin v. Löwis11437992002-04-12 09:54:03 +000013274 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013275
13276fi
13277
Michael W. Hudson54241132001-12-07 15:38:26 +000013278
Martin v. Löwis11437992002-04-12 09:54:03 +000013279
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013280# determine wchar_t size
13281if test "$wchar_h" = yes
13282then
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013284# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13285# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13286# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13288$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013289if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013290 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013291else
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13293"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013294
Martin v. Löwis11437992002-04-12 09:54:03 +000013295else
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 if test "$ac_cv_type_wchar_t" = yes; then
13297 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013299as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013300See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013301 else
13302 ac_cv_sizeof_wchar_t=0
13303 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013304fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013305
Martin v. Löwis11437992002-04-12 09:54:03 +000013306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13308$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013309
13310
13311
Martin v. Löwis11437992002-04-12 09:54:03 +000013312cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013313#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013314_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013315
Michael W. Hudson54241132001-12-07 15:38:26 +000013316
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013317fi
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13320$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013321have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013323/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013324
13325#include <tcl.h>
13326#if TCL_UTF_MAX != 6
13327# error "NOT UCS4_TCL"
13328#endif
13329int
13330main ()
13331{
13332
13333 ;
13334 return 0;
13335}
13336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013337if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013338
13339
Matthias Kloseb9621712010-04-24 17:59:49 +000013340$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013341
13342 have_ucs4_tcl=yes
13343
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13347$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013348
Skip Montanaro6dead952003-09-25 14:50:04 +000013349# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013350if test "$wchar_h" = yes
13351then
13352 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13354$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013355 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013356 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013357else
13358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013360 ac_cv_wchar_t_signed=yes
13361else
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013363/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013364
13365 #include <wchar.h>
13366 int main()
13367 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013368 /* Success: exit code 0 */
13369 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013370 }
13371
13372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013373if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013374 ac_cv_wchar_t_signed=yes
13375else
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013378rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13379 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013380fi
13381
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013382fi
13383
Matthias Kloseb9621712010-04-24 17:59:49 +000013384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13385$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013386fi
13387
Georg Brandl52d168a2008-01-07 18:10:24 +000013388# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013389if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013390 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013391then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013392 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013393
Matthias Kloseb9621712010-04-24 17:59:49 +000013394$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013395
Georg Brandl52d168a2008-01-07 18:10:24 +000013396else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013397 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013398fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13400$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013401
13402# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13404$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013405if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013407else
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 ac_cv_c_bigendian=unknown
13409 # See if we're dealing with a universal compiler.
13410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13411/* end confdefs.h. */
13412#ifndef __APPLE_CC__
13413 not a universal capable compiler
13414 #endif
13415 typedef int dummy;
13416
Skip Montanaro6dead952003-09-25 14:50:04 +000013417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013418if ac_fn_c_try_compile "$LINENO"; then :
13419
13420 # Check for potential -arch flags. It is not universal unless
13421 # there are at least two -arch flags with different values.
13422 ac_arch=
13423 ac_prev=
13424 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13425 if test -n "$ac_prev"; then
13426 case $ac_word in
13427 i?86 | x86_64 | ppc | ppc64)
13428 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13429 ac_arch=$ac_word
13430 else
13431 ac_cv_c_bigendian=universal
13432 break
13433 fi
13434 ;;
13435 esac
13436 ac_prev=
13437 elif test "x$ac_word" = "x-arch"; then
13438 ac_prev=arch
13439 fi
13440 done
13441fi
13442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13443 if test $ac_cv_c_bigendian = unknown; then
13444 # See if sys/param.h defines the BYTE_ORDER macro.
13445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013446/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013447#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013448 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013449
Martin v. Löwis11437992002-04-12 09:54:03 +000013450int
13451main ()
13452{
Matthias Kloseb9621712010-04-24 17:59:49 +000013453#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13454 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13455 && LITTLE_ENDIAN)
13456 bogus endian macros
13457 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013458
13459 ;
13460 return 0;
13461}
13462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013463if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013464 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013466/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013467#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470int
13471main ()
13472{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013473#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 not big endian
13475 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013476
13477 ;
13478 return 0;
13479}
13480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013481if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013482 ac_cv_c_bigendian=yes
13483else
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013487fi
13488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13489 fi
13490 if test $ac_cv_c_bigendian = unknown; then
13491 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013493/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013494#include <limits.h>
13495
Martin v. Löwis11437992002-04-12 09:54:03 +000013496int
13497main ()
13498{
Matthias Kloseb9621712010-04-24 17:59:49 +000013499#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13500 bogus endian macros
13501 #endif
13502
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 ;
13504 return 0;
13505}
13506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013507if ac_fn_c_try_compile "$LINENO"; then :
13508 # It does; now see whether it defined to _BIG_ENDIAN or not.
13509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13510/* end confdefs.h. */
13511#include <limits.h>
13512
13513int
13514main ()
13515{
13516#ifndef _BIG_ENDIAN
13517 not big endian
13518 #endif
13519
13520 ;
13521 return 0;
13522}
13523_ACEOF
13524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013525 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013526else
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13530fi
13531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13532 fi
13533 if test $ac_cv_c_bigendian = unknown; then
13534 # Compile a test program.
13535 if test "$cross_compiling" = yes; then :
13536 # Try to guess by grepping values from an object file.
13537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13538/* end confdefs.h. */
13539short int ascii_mm[] =
13540 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13541 short int ascii_ii[] =
13542 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13543 int use_ascii (int i) {
13544 return ascii_mm[i] + ascii_ii[i];
13545 }
13546 short int ebcdic_ii[] =
13547 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13548 short int ebcdic_mm[] =
13549 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13550 int use_ebcdic (int i) {
13551 return ebcdic_mm[i] + ebcdic_ii[i];
13552 }
13553 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555int
13556main ()
13557{
13558return use_ascii (foo) == use_ebcdic (foo);
13559 ;
13560 return 0;
13561}
13562_ACEOF
13563if ac_fn_c_try_compile "$LINENO"; then :
13564 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13565 ac_cv_c_bigendian=yes
13566 fi
13567 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13568 if test "$ac_cv_c_bigendian" = unknown; then
13569 ac_cv_c_bigendian=no
13570 else
13571 # finding both strings is unlikely to happen, but who knows?
13572 ac_cv_c_bigendian=unknown
13573 fi
13574 fi
13575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013577else
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013579/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013580$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013581int
13582main ()
13583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 /* Are we little or big endian? From Harbison&Steele. */
13586 union
13587 {
13588 long int l;
13589 char c[sizeof (long int)];
13590 } u;
13591 u.l = 1;
13592 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013593
13594 ;
13595 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013596}
Martin v. Löwis11437992002-04-12 09:54:03 +000013597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013598if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013599 ac_cv_c_bigendian=no
13600else
Matthias Kloseb9621712010-04-24 17:59:49 +000013601 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013603rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13604 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13610$as_echo "$ac_cv_c_bigendian" >&6; }
13611 case $ac_cv_c_bigendian in #(
13612 yes)
13613 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13614;; #(
13615 no)
13616 ;; #(
13617 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013618
Matthias Kloseb9621712010-04-24 17:59:49 +000013619$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013620
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 ;; #(
13622 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013623 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013624 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013625 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013626
Michael W. Hudson54241132001-12-07 15:38:26 +000013627
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013628# ABI version string for Python extension modules. This appears between the
13629# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13630# from the following attributes which affect the ABI of this Python build (in
13631# this order):
13632#
13633# * The Python implementation (always 'cpython-' for us)
13634# * The major and minor version numbers
13635# * --with-pydebug (adds a 'd')
13636# * --with-pymalloc (adds a 'm')
13637# * --with-wide-unicode (adds a 'u')
13638#
13639# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013640# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13641# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013642
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13644$as_echo_n "checking ABIFLAGS... " >&6; }
13645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13646$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13648$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013649SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13651$as_echo "$SOABI" >&6; }
13652
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13654$as_echo_n "checking LDVERSION... " >&6; }
13655LDVERSION='$(VERSION)$(ABIFLAGS)'
13656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13657$as_echo "$LDVERSION" >&6; }
13658
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013659# SO is the extension of shared libraries `(including the dot!)
13660# -- usually .so, .sl on HP-UX, .dll on Cygwin
13661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13662$as_echo_n "checking SO... " >&6; }
13663if test -z "$SO"
13664then
13665 case $ac_sys_system in
13666 hp*|HP*)
13667 case `uname -m` in
13668 ia64) SO=.so;;
13669 *) SO=.sl;;
13670 esac
13671 ;;
13672 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013673 Linux*|GNU*)
13674 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013675 *) SO=.so;;
13676 esac
13677else
13678 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013679 echo
13680 echo '====================================================================='
13681 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013682 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013683 echo '+ Do you really mean to change the extension for shared libraries? +'
13684 echo '+ Continuing in 10 seconds to let you to ponder. +'
13685 echo '+ +'
13686 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013687 sleep 10
13688fi
13689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13690$as_echo "$SO" >&6; }
13691
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013692# Check whether right shifting a negative integer extends the sign bit
13693# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13695$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013696if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013698else
Martin v. Löwis11437992002-04-12 09:54:03 +000013699
Matthias Kloseb9621712010-04-24 17:59:49 +000013700if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013701 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013702else
Matthias Kloseb9621712010-04-24 17:59:49 +000013703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013704/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013705
13706int main()
13707{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013708 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013709}
13710
Martin v. Löwis11437992002-04-12 09:54:03 +000013711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013712if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013713 ac_cv_rshift_extends_sign=yes
13714else
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013719fi
13720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013721fi
13722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13724$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013725if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013726then
Martin v. Löwis11437992002-04-12 09:54:03 +000013727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013729
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013730fi
13731
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013732# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13734$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013735if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013737else
Martin v. Löwis11437992002-04-12 09:54:03 +000013738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013740/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013741#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013742int
13743main ()
13744{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013745
13746 FILE *f = fopen("/dev/null", "r");
13747 flockfile(f);
13748 getc_unlocked(f);
13749 funlockfile(f);
13750
Martin v. Löwis11437992002-04-12 09:54:03 +000013751 ;
13752 return 0;
13753}
13754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013755if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013756 ac_cv_have_getc_unlocked=yes
13757else
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 ac_cv_have_getc_unlocked=no
13759fi
13760rm -f core conftest.err conftest.$ac_objext \
13761 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13765$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013766if test "$ac_cv_have_getc_unlocked" = yes
13767then
Martin v. Löwis11437992002-04-12 09:54:03 +000013768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013770
13771fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013772
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013773# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013774# save the value of LIBS so we don't actually link Python with readline
13775LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013776
Gregory P. Smith18820942008-09-07 06:24:49 +000013777# On some systems we need to link readline to a termcap compatible
13778# library. NOTE: Keep the precedence of listed libraries synchronised
13779# with setup.py.
13780py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13782$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013783for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013784 if test -z "$py_libtermcap"; then
13785 READLINE_LIBS="-lreadline"
13786 else
13787 READLINE_LIBS="-lreadline -l$py_libtermcap"
13788 fi
13789 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013791/* end confdefs.h. */
13792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013793/* Override any GCC internal prototype to avoid an error.
13794 Use char because int might match the return type of a GCC
13795 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013796#ifdef __cplusplus
13797extern "C"
13798#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013799char readline ();
13800int
13801main ()
13802{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013803return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013804 ;
13805 return 0;
13806}
13807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013808if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013809 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013811rm -f core conftest.err conftest.$ac_objext \
13812 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013813 if test $py_cv_lib_readline = yes; then
13814 break
13815 fi
13816done
13817# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13818#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013819if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13821$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013822else
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13824$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013825
Matthias Kloseb9621712010-04-24 17:59:49 +000013826$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013827
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013828fi
13829
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013830# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13832$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013833if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013835else
13836 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013837LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013839/* end confdefs.h. */
13840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013841/* Override any GCC internal prototype to avoid an error.
13842 Use char because int might match the return type of a GCC
13843 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013844#ifdef __cplusplus
13845extern "C"
13846#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013847char rl_callback_handler_install ();
13848int
13849main ()
13850{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013851return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013852 ;
13853 return 0;
13854}
13855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013856if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013857 ac_cv_lib_readline_rl_callback_handler_install=yes
13858else
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013860fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013861rm -f core conftest.err conftest.$ac_objext \
13862 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013863LIBS=$ac_check_lib_save_LIBS
13864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13866$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013867if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013870
13871fi
13872
13873
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013874# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013876/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013877#include <readline/readline.h>
13878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013879if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013880 have_readline=yes
13881else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013882 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013883
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013884fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013885rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013886if test $have_readline = yes
13887then
Matthias Kloseb9621712010-04-24 17:59:49 +000013888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013889/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013890#include <readline/readline.h>
13891
13892_ACEOF
13893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013895
Matthias Kloseb9621712010-04-24 17:59:49 +000013896$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013897
13898fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013899rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013900
Matthias Kloseb9621712010-04-24 17:59:49 +000013901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013902/* end confdefs.h. */
13903#include <readline/readline.h>
13904
13905_ACEOF
13906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013907 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013908
Matthias Kloseb9621712010-04-24 17:59:49 +000013909$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013910
13911fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013912rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013913
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013914fi
13915
Martin v. Löwis0daad592001-09-30 21:09:59 +000013916# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13918$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013919if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013921else
Martin v. Löwis11437992002-04-12 09:54:03 +000013922 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013923LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013927/* Override any GCC internal prototype to avoid an error.
13928 Use char because int might match the return type of a GCC
13929 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013930#ifdef __cplusplus
13931extern "C"
13932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013933char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013934int
13935main ()
13936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013937return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 ;
13939 return 0;
13940}
13941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013942if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013943 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013944else
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013947rm -f core conftest.err conftest.$ac_objext \
13948 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013949LIBS=$ac_check_lib_save_LIBS
13950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13952$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013953if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013954
Matthias Kloseb9621712010-04-24 17:59:49 +000013955$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013956
Martin v. Löwis0daad592001-09-30 21:09:59 +000013957fi
13958
Michael W. Hudson54241132001-12-07 15:38:26 +000013959
Thomas Wouters89d996e2007-09-08 17:39:28 +000013960# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13962$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013963if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013965else
13966 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013967LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013969/* end confdefs.h. */
13970
13971/* Override any GCC internal prototype to avoid an error.
13972 Use char because int might match the return type of a GCC
13973 builtin and then its argument prototype would still apply. */
13974#ifdef __cplusplus
13975extern "C"
13976#endif
13977char rl_completion_display_matches_hook ();
13978int
13979main ()
13980{
13981return rl_completion_display_matches_hook ();
13982 ;
13983 return 0;
13984}
13985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013986if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013987 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13988else
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013990fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013991rm -f core conftest.err conftest.$ac_objext \
13992 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013993LIBS=$ac_check_lib_save_LIBS
13994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13996$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013997if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013998
Matthias Kloseb9621712010-04-24 17:59:49 +000013999$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014000
14001fi
14002
14003
Martin v. Löwis0daad592001-09-30 21:09:59 +000014004# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14006$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014007if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014009else
Martin v. Löwis11437992002-04-12 09:54:03 +000014010 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014011LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014015/* Override any GCC internal prototype to avoid an error.
14016 Use char because int might match the return type of a GCC
14017 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014018#ifdef __cplusplus
14019extern "C"
14020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014021char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014022int
14023main ()
14024{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014025return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014026 ;
14027 return 0;
14028}
14029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014030if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014031 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014032else
Matthias Kloseb9621712010-04-24 17:59:49 +000014033 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014035rm -f core conftest.err conftest.$ac_objext \
14036 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014037LIBS=$ac_check_lib_save_LIBS
14038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14040$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014041if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014042
Matthias Kloseb9621712010-04-24 17:59:49 +000014043$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014044
Guido van Rossum353ae582001-07-10 16:45:32 +000014045fi
14046
Jack Jansendd19cf82001-12-06 22:36:17 +000014047
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014048# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014050/* end confdefs.h. */
14051#include <readline/readline.h>
14052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014053if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014054 have_readline=yes
14055else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014056 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014057
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014058fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014059rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014060if test $have_readline = yes
14061then
Matthias Kloseb9621712010-04-24 17:59:49 +000014062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014063/* end confdefs.h. */
14064#include <readline/readline.h>
14065
14066_ACEOF
14067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014069
Matthias Kloseb9621712010-04-24 17:59:49 +000014070$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014071
14072fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014073rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014074
14075fi
14076
Martin v. Löwis82bca632006-02-10 20:49:30 +000014077# End of readline checks: restore LIBS
14078LIBS=$LIBS_no_readline
14079
Matthias Kloseb9621712010-04-24 17:59:49 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14081$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014082if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014083 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014084else
Martin v. Löwis11437992002-04-12 09:54:03 +000014085
Matthias Kloseb9621712010-04-24 17:59:49 +000014086if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014087 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014088else
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014090/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014091
14092int main()
14093{
14094 int val1 = nice(1);
14095 if (val1 != -1 && val1 == nice(2))
14096 exit(0);
14097 exit(1);
14098}
14099
Martin v. Löwis11437992002-04-12 09:54:03 +000014100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014101if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014102 ac_cv_broken_nice=yes
14103else
Matthias Kloseb9621712010-04-24 17:59:49 +000014104 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14107 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014108fi
14109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014110fi
14111
Matthias Kloseb9621712010-04-24 17:59:49 +000014112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14113$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014114if test "$ac_cv_broken_nice" = yes
14115then
Martin v. Löwis11437992002-04-12 09:54:03 +000014116
Matthias Kloseb9621712010-04-24 17:59:49 +000014117$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014118
14119fi
14120
Matthias Kloseb9621712010-04-24 17:59:49 +000014121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14122$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014123if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014124 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014125else
Matthias Kloseb9621712010-04-24 17:59:49 +000014126 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014127 ac_cv_broken_poll=no
14128else
Matthias Kloseb9621712010-04-24 17:59:49 +000014129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014130/* end confdefs.h. */
14131
14132#include <poll.h>
14133
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014134int main()
14135{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014136 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014137 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014138
14139 close (42);
14140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014141 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014142 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014143 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014144 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014145 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014146 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014147 return 1;
14148}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014149
14150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014151if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014152 ac_cv_broken_poll=yes
14153else
Matthias Kloseb9621712010-04-24 17:59:49 +000014154 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014160fi
14161
Matthias Kloseb9621712010-04-24 17:59:49 +000014162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14163$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014164if test "$ac_cv_broken_poll" = yes
14165then
14166
Matthias Kloseb9621712010-04-24 17:59:49 +000014167$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014168
14169fi
14170
Brett Cannon43802422005-02-10 20:48:03 +000014171# 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 +000014172# (which is not required by ISO C or UNIX spec) and/or if we support
14173# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014174ac_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 +000014175#include <$ac_cv_struct_tm>
14176
Matthias Kloseb9621712010-04-24 17:59:49 +000014177"
Victor Stinnere0be4232011-10-25 13:06:09 +020014178if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014179
14180cat >>confdefs.h <<_ACEOF
14181#define HAVE_STRUCT_TM_TM_ZONE 1
14182_ACEOF
14183
14184
14185fi
14186
14187if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14188
Matthias Kloseb9621712010-04-24 17:59:49 +000014189$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014190
14191else
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14193"
Victor Stinnere0be4232011-10-25 13:06:09 +020014194if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196else
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198fi
14199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014201#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014202_ACEOF
14203
Matthias Kloseb9621712010-04-24 17:59:49 +000014204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14205$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014206if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014208else
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014210/* end confdefs.h. */
14211#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014212#if !HAVE_DECL_TZNAME
14213extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014214#endif
14215
14216int
14217main ()
14218{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014219return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014220 ;
14221 return 0;
14222}
14223_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014224if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014225 ac_cv_var_tzname=yes
14226else
Matthias Kloseb9621712010-04-24 17:59:49 +000014227 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014229rm -f core conftest.err conftest.$ac_objext \
14230 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14233$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014234 if test $ac_cv_var_tzname = yes; then
14235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014237
14238 fi
14239fi
14240
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014241
Martin v. Löwis1d459062005-03-14 21:23:33 +000014242# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14244$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014245if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014247else
14248
Matthias Kloseb9621712010-04-24 17:59:49 +000014249if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014250 ac_cv_working_tzset=no
14251else
Matthias Kloseb9621712010-04-24 17:59:49 +000014252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014253/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014254
14255#include <stdlib.h>
14256#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014257#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014258
14259#if HAVE_TZNAME
14260extern char *tzname[];
14261#endif
14262
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014263int main()
14264{
Brett Cannon18367812003-09-19 00:59:16 +000014265 /* Note that we need to ensure that not only does tzset(3)
14266 do 'something' with localtime, but it works as documented
14267 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014268 This includes making sure that tzname is set properly if
14269 tm->tm_zone does not exist since it is the alternative way
14270 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014271
14272 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014273 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014274 */
14275
Martin v. Löwis1d459062005-03-14 21:23:33 +000014276 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014277 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14278
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014279 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014280 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014281 if (localtime(&groundhogday)->tm_hour != 0)
14282 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014283#if HAVE_TZNAME
14284 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14285 if (strcmp(tzname[0], "UTC") ||
14286 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14287 exit(1);
14288#endif
Brett Cannon18367812003-09-19 00:59:16 +000014289
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014290 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014291 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014292 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014293 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014294#if HAVE_TZNAME
14295 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14296 exit(1);
14297#endif
Brett Cannon18367812003-09-19 00:59:16 +000014298
14299 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14300 tzset();
14301 if (localtime(&groundhogday)->tm_hour != 11)
14302 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014303#if HAVE_TZNAME
14304 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14305 exit(1);
14306#endif
14307
14308#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014309 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14310 exit(1);
14311 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14312 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014313#endif
Brett Cannon18367812003-09-19 00:59:16 +000014314
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014315 exit(0);
14316}
14317
14318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014319if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014320 ac_cv_working_tzset=yes
14321else
Matthias Kloseb9621712010-04-24 17:59:49 +000014322 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14325 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014326fi
14327
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328fi
14329
Matthias Kloseb9621712010-04-24 17:59:49 +000014330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14331$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014332if test "$ac_cv_working_tzset" = yes
14333then
14334
Matthias Kloseb9621712010-04-24 17:59:49 +000014335$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014336
14337fi
14338
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014339# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14341$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014342if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014343 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014344else
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014346/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014347#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014348int
14349main ()
14350{
14351
14352struct stat st;
14353st.st_mtim.tv_nsec = 1;
14354
14355 ;
14356 return 0;
14357}
14358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014360 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014361else
Matthias Kloseb9621712010-04-24 17:59:49 +000014362 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14365fi
14366
Matthias Kloseb9621712010-04-24 17:59:49 +000014367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14368$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014369if test "$ac_cv_stat_tv_nsec" = yes
14370then
14371
Matthias Kloseb9621712010-04-24 17:59:49 +000014372$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014373
14374fi
14375
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014376# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14378$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014379if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014380 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014381else
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014383/* end confdefs.h. */
14384#include <sys/stat.h>
14385int
14386main ()
14387{
14388
14389struct stat st;
14390st.st_mtimespec.tv_nsec = 1;
14391
14392 ;
14393 return 0;
14394}
14395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014397 ac_cv_stat_tv_nsec2=yes
14398else
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14402fi
14403
Matthias Kloseb9621712010-04-24 17:59:49 +000014404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14405$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014406if test "$ac_cv_stat_tv_nsec2" = yes
14407then
14408
Matthias Kloseb9621712010-04-24 17:59:49 +000014409$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014410
14411fi
14412
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014413ac_save_cppflags="$CPPFLAGS"
14414CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014415# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14417$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014418if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014420else
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014422/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014423#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014424int
14425main ()
14426{
Jack Jansen666b1e72001-10-31 12:11:48 +000014427
14428 int rtn;
14429 rtn = mvwdelch(0,0,0);
14430
Martin v. Löwis11437992002-04-12 09:54:03 +000014431 ;
14432 return 0;
14433}
14434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014435if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014436 ac_cv_mvwdelch_is_expression=yes
14437else
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14441fi
14442
Matthias Kloseb9621712010-04-24 17:59:49 +000014443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14444$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014445
14446if test "$ac_cv_mvwdelch_is_expression" = yes
14447then
Martin v. Löwis11437992002-04-12 09:54:03 +000014448
Matthias Kloseb9621712010-04-24 17:59:49 +000014449$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014450
14451fi
14452
Matthias Kloseb9621712010-04-24 17:59:49 +000014453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14454$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014455if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014457else
Matthias Kloseb9621712010-04-24 17:59:49 +000014458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014459/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014460#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014461int
14462main ()
14463{
Jack Jansen666b1e72001-10-31 12:11:48 +000014464
14465 WINDOW *w;
14466 w->_flags = 0;
14467
Martin v. Löwis11437992002-04-12 09:54:03 +000014468 ;
14469 return 0;
14470}
14471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014472if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014473 ac_cv_window_has_flags=yes
14474else
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14478fi
14479
Matthias Kloseb9621712010-04-24 17:59:49 +000014480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14481$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014482
Jack Jansen666b1e72001-10-31 12:11:48 +000014483
14484if test "$ac_cv_window_has_flags" = yes
14485then
Martin v. Löwis11437992002-04-12 09:54:03 +000014486
Matthias Kloseb9621712010-04-24 17:59:49 +000014487$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014488
14489fi
14490
Matthias Kloseb9621712010-04-24 17:59:49 +000014491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14492$as_echo_n "checking for is_term_resized... " >&6; }
14493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014494/* end confdefs.h. */
14495#include <curses.h>
14496int
14497main ()
14498{
14499void *x=is_term_resized
14500 ;
14501 return 0;
14502}
14503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014505
Matthias Kloseb9621712010-04-24 17:59:49 +000014506$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014507
Matthias Kloseb159a552010-04-25 21:00:44 +000014508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014509$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014510else
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14512$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014513
14514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14516
Matthias Kloseb9621712010-04-24 17:59:49 +000014517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14518$as_echo_n "checking for resize_term... " >&6; }
14519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014520/* end confdefs.h. */
14521#include <curses.h>
14522int
14523main ()
14524{
14525void *x=resize_term
14526 ;
14527 return 0;
14528}
14529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014530if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014533
Matthias Kloseb159a552010-04-25 21:00:44 +000014534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014535$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014536else
Matthias Kloseb9621712010-04-24 17:59:49 +000014537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14538$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014539
14540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14542
Matthias Kloseb9621712010-04-24 17:59:49 +000014543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14544$as_echo_n "checking for resizeterm... " >&6; }
14545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014546/* end confdefs.h. */
14547#include <curses.h>
14548int
14549main ()
14550{
14551void *x=resizeterm
14552 ;
14553 return 0;
14554}
14555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014556if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014557
Matthias Kloseb9621712010-04-24 17:59:49 +000014558$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014559
Matthias Kloseb159a552010-04-25 21:00:44 +000014560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014561$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014562else
Matthias Kloseb9621712010-04-24 17:59:49 +000014563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14564$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014565
14566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014568# last curses configure check
14569CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014570
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14572$as_echo "$as_me: checking for device files" >&6;}
14573
14574if test "x$cross_compiling" = xyes; then
14575 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14577$as_echo_n "checking for /dev/ptmx... " >&6; }
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14579$as_echo "not set" >&6; }
14580 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14581 fi
14582 if test "${ac_cv_file__dev_ptc+set}" != set; then
14583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14584$as_echo_n "checking for /dev/ptc... " >&6; }
14585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14586$as_echo "not set" >&6; }
14587 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14588 fi
14589fi
14590
Matthias Kloseb9621712010-04-24 17:59:49 +000014591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14592$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014593if ${ac_cv_file__dev_ptmx+:} false; then :
14594 $as_echo_n "(cached) " >&6
14595else
14596 test "$cross_compiling" = yes &&
14597 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14598if test -r "/dev/ptmx"; then
14599 ac_cv_file__dev_ptmx=yes
14600else
14601 ac_cv_file__dev_ptmx=no
14602fi
14603fi
14604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14605$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14606if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014607
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014608fi
14609
14610if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014611
Matthias Kloseb9621712010-04-24 17:59:49 +000014612$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014613
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14616$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014617if ${ac_cv_file__dev_ptc+:} false; then :
14618 $as_echo_n "(cached) " >&6
14619else
14620 test "$cross_compiling" = yes &&
14621 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14622if test -r "/dev/ptc"; then
14623 ac_cv_file__dev_ptc=yes
14624else
14625 ac_cv_file__dev_ptc=no
14626fi
14627fi
14628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14629$as_echo "$ac_cv_file__dev_ptc" >&6; }
14630if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014631
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014632fi
14633
14634if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014635
Matthias Kloseb9621712010-04-24 17:59:49 +000014636$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014637
Neal Norwitz865400f2003-03-21 01:42:58 +000014638fi
14639
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014640if test "$have_long_long" = yes
14641then
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14643$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014644 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014646else
Matthias Kloseb9621712010-04-24 17:59:49 +000014647 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014648 ac_cv_have_long_long_format="cross -- assuming no"
14649 if test x$GCC = xyes; then
14650 save_CFLAGS=$CFLAGS
14651 CFLAGS="$CFLAGS -Werror -Wformat"
14652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14653/* end confdefs.h. */
14654
14655 #include <stdio.h>
14656 #include <stddef.h>
14657
14658int
14659main ()
14660{
14661
14662 char *buffer;
14663 sprintf(buffer, "%lld", (long long)123);
14664 sprintf(buffer, "%lld", (long long)-123);
14665 sprintf(buffer, "%llu", (unsigned long long)123);
14666
14667 ;
14668 return 0;
14669}
14670_ACEOF
14671if ac_fn_c_try_compile "$LINENO"; then :
14672 ac_cv_have_long_long_format=yes
14673
14674fi
14675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14676 CFLAGS=$save_CFLAGS
14677 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014678else
Matthias Kloseb9621712010-04-24 17:59:49 +000014679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014680/* end confdefs.h. */
14681
14682 #include <stdio.h>
14683 #include <stddef.h>
14684 #include <string.h>
14685
14686 #ifdef HAVE_SYS_TYPES_H
14687 #include <sys/types.h>
14688 #endif
14689
14690 int main()
14691 {
14692 char buffer[256];
14693
14694 if (sprintf(buffer, "%lld", (long long)123) < 0)
14695 return 1;
14696 if (strcmp(buffer, "123"))
14697 return 1;
14698
14699 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14700 return 1;
14701 if (strcmp(buffer, "-123"))
14702 return 1;
14703
14704 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14705 return 1;
14706 if (strcmp(buffer, "123"))
14707 return 1;
14708
14709 return 0;
14710 }
14711
14712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014713if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014714 ac_cv_have_long_long_format=yes
14715else
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14719 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014720fi
14721
14722
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014723fi
14724
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14726$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014727fi
14728
Mark Dickinson89d7d412009-12-31 20:50:59 +000014729if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014730then
14731
Matthias Kloseb9621712010-04-24 17:59:49 +000014732$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014733
14734fi
14735
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014736if test $ac_sys_system = Darwin
14737then
14738 LIBS="$LIBS -framework CoreFoundation"
14739fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014740
Matthias Kloseb9621712010-04-24 17:59:49 +000014741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14742$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014743if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014744 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014745else
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014747 ac_cv_have_size_t_format="cross -- assuming yes"
14748
Thomas Wouters477c8d52006-05-27 19:21:47 +000014749else
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014751/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014752
Thomas Wouters477c8d52006-05-27 19:21:47 +000014753#include <stdio.h>
14754#include <stddef.h>
14755#include <string.h>
14756
Christian Heimes2c181612007-12-17 20:04:13 +000014757#ifdef HAVE_SYS_TYPES_H
14758#include <sys/types.h>
14759#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014760
14761#ifdef HAVE_SSIZE_T
14762typedef ssize_t Py_ssize_t;
14763#elif SIZEOF_VOID_P == SIZEOF_LONG
14764typedef long Py_ssize_t;
14765#else
14766typedef int Py_ssize_t;
14767#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014768
Christian Heimes2c181612007-12-17 20:04:13 +000014769int main()
14770{
14771 char buffer[256];
14772
Thomas Wouters477c8d52006-05-27 19:21:47 +000014773 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14774 return 1;
14775
Thomas Wouters89f507f2006-12-13 04:49:30 +000014776 if (strcmp(buffer, "123"))
14777 return 1;
14778
14779 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14780 return 1;
14781
14782 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014783 return 1;
14784
14785 return 0;
14786}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014787
Thomas Wouters477c8d52006-05-27 19:21:47 +000014788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014789if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014790 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014791else
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014793fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14795 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014796fi
14797
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14800$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014801if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014802
Matthias Kloseb9621712010-04-24 17:59:49 +000014803$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014804
14805fi
14806
Matthias Kloseb9621712010-04-24 17:59:49 +000014807ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014808#ifdef HAVE_SYS_TYPES_H
14809#include <sys/types.h>
14810#endif
14811#ifdef HAVE_SYS_SOCKET_H
14812#include <sys/socket.h>
14813#endif
14814
Matthias Kloseb9621712010-04-24 17:59:49 +000014815"
Victor Stinnere0be4232011-10-25 13:06:09 +020014816if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014817
Martin v. Löwis11437992002-04-12 09:54:03 +000014818else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014819
Matthias Kloseb9621712010-04-24 17:59:49 +000014820$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014821
14822fi
14823
Michael W. Hudson54241132001-12-07 15:38:26 +000014824
Matthias Kloseb9621712010-04-24 17:59:49 +000014825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14826$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014827if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014828 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014829else
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014831 ac_cv_broken_mbstowcs=no
14832else
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014834/* end confdefs.h. */
14835
14836#include<stdlib.h>
14837int main() {
14838 size_t len = -1;
14839 const char *str = "text";
14840 len = mbstowcs(NULL, str, 0);
14841 return (len != 4);
14842}
14843
14844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014845if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014846 ac_cv_broken_mbstowcs=no
14847else
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014852fi
14853
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014854fi
14855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14857$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014858if test "$ac_cv_broken_mbstowcs" = yes
14859then
14860
Matthias Kloseb9621712010-04-24 17:59:49 +000014861$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014862
14863fi
14864
Antoine Pitroub52ec782009-01-25 16:34:23 +000014865# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14867$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014868
14869# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014870if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014871 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014872if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014873then
14874
Matthias Kloseb9621712010-04-24 17:59:49 +000014875$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014876
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14878$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014879fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014880if test "$withval" = no
14881then
14882
14883$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14884
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14886$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014887fi
14888
Antoine Pitrou042b1282010-08-13 21:15:58 +000014889else
14890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14891$as_echo "no value specified" >&6; }
14892fi
14893
Antoine Pitroub52ec782009-01-25 16:34:23 +000014894
Matthias Kloseb17289e2012-03-15 19:51:34 +010014895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14896$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14897if ${ac_cv_computed_gotos+:} false; then :
14898 $as_echo_n "(cached) " >&6
14899else
14900 if test "$cross_compiling" = yes; then :
14901 if test "${with_computed_gotos+set}" = set; then
14902 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14903 else
14904 ac_cv_computed_gotos=no
14905 fi
14906else
14907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14908/* end confdefs.h. */
14909
14910int main(int argc, char **argv)
14911{
14912 static void *targets[1] = { &&LABEL1 };
14913 goto LABEL2;
14914LABEL1:
14915 return 0;
14916LABEL2:
14917 goto *targets[0];
14918 return 1;
14919}
14920
14921_ACEOF
14922if ac_fn_c_try_run "$LINENO"; then :
14923 ac_cv_computed_gotos=yes
14924else
14925 ac_cv_computed_gotos=no
14926fi
14927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14928 conftest.$ac_objext conftest.beam conftest.$ac_ext
14929fi
14930
14931fi
14932
14933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14934$as_echo "$ac_cv_computed_gotos" >&6; }
14935case "$ac_cv_computed_gotos" in yes*)
14936
14937$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14938
14939esac
14940
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014941case $ac_sys_system in
14942AIX*)
14943
14944$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14945 ;;
14946esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014947
Michael W. Hudson54241132001-12-07 15:38:26 +000014948
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014949
14950
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014951for h in `(cd $srcdir;echo Python/thread_*.h)`
14952do
14953 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14954done
14955
Michael W. Hudson54241132001-12-07 15:38:26 +000014956
Neal Norwitzd24499d2005-12-18 21:36:39 +000014957SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14959$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014960for dir in $SRCDIRS; do
14961 if test ! -d $dir; then
14962 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014963 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014964done
Matthias Kloseb9621712010-04-24 17:59:49 +000014965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14966$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014967
Stefan Krah1919b7e2012-03-21 18:25:23 +010014968# Availability of -O2:
14969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14970$as_echo_n "checking for -O2... " >&6; }
14971saved_cflags="$CFLAGS"
14972CFLAGS="-O2"
14973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14974/* end confdefs.h. */
14975
14976int
14977main ()
14978{
14979
14980
14981 ;
14982 return 0;
14983}
14984_ACEOF
14985if ac_fn_c_try_compile "$LINENO"; then :
14986 have_O2=yes
14987else
14988 have_O2=no
14989fi
14990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14992$as_echo "$have_O2" >&6; }
14993CFLAGS="$saved_cflags"
14994
14995# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14996# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
14998$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
14999saved_cflags="$CFLAGS"
15000CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15001if test "$have_O2" = no; then
15002 CFLAGS=""
15003fi
15004if test "$cross_compiling" = yes; then :
15005 have_glibc_memmove_bug=undefined
15006else
15007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15008/* end confdefs.h. */
15009
15010#include <stdio.h>
15011#include <stdlib.h>
15012#include <string.h>
15013void foo(void *p, void *q) { memmove(p, q, 19); }
15014int main() {
15015 char a[32] = "123456789000000000";
15016 foo(&a[9], a);
15017 if (strcmp(a, "123456789123456789000000000") != 0)
15018 return 1;
15019 foo(a, &a[9]);
15020 if (strcmp(a, "123456789000000000") != 0)
15021 return 1;
15022 return 0;
15023}
15024
15025_ACEOF
15026if ac_fn_c_try_run "$LINENO"; then :
15027 have_glibc_memmove_bug=no
15028else
15029 have_glibc_memmove_bug=yes
15030fi
15031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15032 conftest.$ac_objext conftest.beam conftest.$ac_ext
15033fi
15034
15035CFLAGS="$saved_cflags"
15036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15037$as_echo "$have_glibc_memmove_bug" >&6; }
15038if test "$have_glibc_memmove_bug" = yes; then
15039
15040$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15041
15042fi
15043
15044if test "$have_gcc_asm_for_x87" = yes; then
15045 # Some versions of gcc miscompile inline asm:
15046 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15047 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15048 case $CC in
15049 *gcc*)
15050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15051$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15052 saved_cflags="$CFLAGS"
15053 CFLAGS="-O2"
15054 if test "$cross_compiling" = yes; then :
15055 have_ipa_pure_const_bug=undefined
15056else
15057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15058/* end confdefs.h. */
15059
15060 __attribute__((noinline)) int
15061 foo(int *p) {
15062 int r;
15063 asm ( "movl \$6, (%1)\n\t"
15064 "xorl %0, %0\n\t"
15065 : "=r" (r) : "r" (p) : "memory"
15066 );
15067 return r;
15068 }
15069 int main() {
15070 int p = 8;
15071 if ((foo(&p) ? : p) != 6)
15072 return 1;
15073 return 0;
15074 }
15075
15076_ACEOF
15077if ac_fn_c_try_run "$LINENO"; then :
15078 have_ipa_pure_const_bug=no
15079else
15080 have_ipa_pure_const_bug=yes
15081fi
15082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15083 conftest.$ac_objext conftest.beam conftest.$ac_ext
15084fi
15085
15086 CFLAGS="$saved_cflags"
15087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15088$as_echo "$have_ipa_pure_const_bug" >&6; }
15089 if test "$have_ipa_pure_const_bug" = yes; then
15090
15091$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15092
15093 fi
15094 ;;
15095 esac
15096fi
15097
Guido van Rossum627b2d71993-12-24 10:39:16 +000015098# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015099ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015100
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015101ac_config_files="$ac_config_files Modules/ld_so_aix"
15102
Martin v. Löwis11437992002-04-12 09:54:03 +000015103cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015104# This file is a shell script that caches the results of configure
15105# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015106# scripts and configure runs, see configure's option --config-cache.
15107# It is not useful on other systems. If it contains results you don't
15108# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015109#
Martin v. Löwis11437992002-04-12 09:54:03 +000015110# config.status only pays attention to the cache file if you give it
15111# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015112#
Skip Montanaro6dead952003-09-25 14:50:04 +000015113# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015114# loading this file, other *unset* `ac_cv_foo' will be assigned the
15115# following values.
15116
15117_ACEOF
15118
Guido van Rossumf78abae1997-01-21 22:02:36 +000015119# The following way of writing the cache mishandles newlines in values,
15120# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015122# Ultrix sh set writes to stderr and can't be redirected directly,
15123# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015124(
15125 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15126 eval ac_val=\$$ac_var
15127 case $ac_val in #(
15128 *${as_nl}*)
15129 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15131$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132 esac
15133 case $ac_var in #(
15134 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015135 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15136 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137 esac ;;
15138 esac
15139 done
15140
Martin v. Löwis11437992002-04-12 09:54:03 +000015141 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15143 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015144 # `set' does not quote correctly, so add quotes: double-quote
15145 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015147 "s/'/'\\\\''/g;
15148 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015149 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015150 *)
15151 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015153 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154 esac |
15155 sort
15156) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015158 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015160 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15162 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15164 :end' >>confcache
15165if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15166 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015167 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15169$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015170 if test ! -f "$cache_file" || test -h "$cache_file"; then
15171 cat confcache >"$cache_file"
15172 else
15173 case $cache_file in #(
15174 */* | ?:*)
15175 mv -f confcache "$cache_file"$$ &&
15176 mv -f "$cache_file"$$ "$cache_file" ;; #(
15177 *)
15178 mv -f confcache "$cache_file" ;;
15179 esac
15180 fi
15181 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015182 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15184$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015185 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015186fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015187rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015188
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015189test "x$prefix" = xNONE && prefix=$ac_default_prefix
15190# Let make expand exec_prefix.
15191test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015192
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015193DEFS=-DHAVE_CONFIG_H
15194
Skip Montanaro6dead952003-09-25 14:50:04 +000015195ac_libobjs=
15196ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015197U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015198for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15199 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015201 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15203 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015204 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15205 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015206done
15207LIBOBJS=$ac_libobjs
15208
15209LTLIBOBJS=$ac_ltlibobjs
15210
15211
Martin v. Löwis11437992002-04-12 09:54:03 +000015212
Matthias Kloseb9621712010-04-24 17:59:49 +000015213
Victor Stinnere0be4232011-10-25 13:06:09 +020015214: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015215ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015216ac_clean_files_save=$ac_clean_files
15217ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015218{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15219$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15220as_write_fail=0
15221cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015222#! $SHELL
15223# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015224# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015225# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015226# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015227
Martin v. Löwis11437992002-04-12 09:54:03 +000015228debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015229ac_cs_recheck=false
15230ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015231
Matthias Kloseb9621712010-04-24 17:59:49 +000015232SHELL=\${CONFIG_SHELL-$SHELL}
15233export SHELL
15234_ASEOF
15235cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15236## -------------------- ##
15237## M4sh Initialization. ##
15238## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240# Be more Bourne compatible
15241DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015242if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015243 emulate sh
15244 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015246 # is contrary to our usage. Disable this feature.
15247 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015248 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015249else
Matthias Kloseb9621712010-04-24 17:59:49 +000015250 case `(set -o) 2>/dev/null` in #(
15251 *posix*) :
15252 set -o posix ;; #(
15253 *) :
15254 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015256fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015257
15258
Matthias Kloseb9621712010-04-24 17:59:49 +000015259as_nl='
15260'
15261export as_nl
15262# Printing a long string crashes Solaris 7 /usr/bin/printf.
15263as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15264as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15265as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15266# Prefer a ksh shell builtin over an external printf program on Solaris,
15267# but without wasting forks for bash or zsh.
15268if test -z "$BASH_VERSION$ZSH_VERSION" \
15269 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15270 as_echo='print -r --'
15271 as_echo_n='print -rn --'
15272elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15273 as_echo='printf %s\n'
15274 as_echo_n='printf %s'
15275else
15276 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15277 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15278 as_echo_n='/usr/ucb/echo -n'
15279 else
15280 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15281 as_echo_n_body='eval
15282 arg=$1;
15283 case $arg in #(
15284 *"$as_nl"*)
15285 expr "X$arg" : "X\\(.*\\)$as_nl";
15286 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15287 esac;
15288 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15289 '
15290 export as_echo_n_body
15291 as_echo_n='sh -c $as_echo_n_body as_echo'
15292 fi
15293 export as_echo_body
15294 as_echo='sh -c $as_echo_body as_echo'
15295fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015296
15297# The user is always right.
15298if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015299 PATH_SEPARATOR=:
15300 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15301 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15302 PATH_SEPARATOR=';'
15303 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015305
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306
15307# IFS
15308# We need space, tab and new line, in precisely that order. Quoting is
15309# there to prevent editors from complaining about space-tab.
15310# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15311# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015312IFS=" "" $as_nl"
15313
15314# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015315as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015316case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317 *[\\/]* ) as_myself=$0 ;;
15318 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015319for as_dir in $PATH
15320do
15321 IFS=$as_save_IFS
15322 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015323 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15324 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015325IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015327 ;;
15328esac
15329# We did not find ourselves, most probably we were run as `sh COMMAND'
15330# in which case we are not to be found in the path.
15331if test "x$as_myself" = x; then
15332 as_myself=$0
15333fi
15334if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15336 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015337fi
15338
Matthias Kloseb9621712010-04-24 17:59:49 +000015339# Unset variables that we do not need and which cause bugs (e.g. in
15340# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15341# suppresses any "Segmentation fault" message there. '((' could
15342# trigger a bug in pdksh 5.2.14.
15343for as_var in BASH_ENV ENV MAIL MAILPATH
15344do eval test x\${$as_var+set} = xset \
15345 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346done
15347PS1='$ '
15348PS2='> '
15349PS4='+ '
15350
15351# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015352LC_ALL=C
15353export LC_ALL
15354LANGUAGE=C
15355export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356
Matthias Kloseb9621712010-04-24 17:59:49 +000015357# CDPATH.
15358(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15359
15360
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015361# as_fn_error STATUS ERROR [LINENO LOG_FD]
15362# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015363# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15364# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015365# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015366as_fn_error ()
15367{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015368 as_status=$1; test $as_status -eq 0 && as_status=1
15369 if test "$4"; then
15370 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15371 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015372 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015373 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015374 as_fn_exit $as_status
15375} # as_fn_error
15376
15377
15378# as_fn_set_status STATUS
15379# -----------------------
15380# Set $? to STATUS, without forking.
15381as_fn_set_status ()
15382{
15383 return $1
15384} # as_fn_set_status
15385
15386# as_fn_exit STATUS
15387# -----------------
15388# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15389as_fn_exit ()
15390{
15391 set +e
15392 as_fn_set_status $1
15393 exit $1
15394} # as_fn_exit
15395
15396# as_fn_unset VAR
15397# ---------------
15398# Portably unset VAR.
15399as_fn_unset ()
15400{
15401 { eval $1=; unset $1;}
15402}
15403as_unset=as_fn_unset
15404# as_fn_append VAR VALUE
15405# ----------------------
15406# Append the text in VALUE to the end of the definition contained in VAR. Take
15407# advantage of any shell optimizations that allow amortized linear growth over
15408# repeated appends, instead of the typical quadratic growth present in naive
15409# implementations.
15410if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15411 eval 'as_fn_append ()
15412 {
15413 eval $1+=\$2
15414 }'
15415else
15416 as_fn_append ()
15417 {
15418 eval $1=\$$1\$2
15419 }
15420fi # as_fn_append
15421
15422# as_fn_arith ARG...
15423# ------------------
15424# Perform arithmetic evaluation on the ARGs, and store the result in the
15425# global $as_val. Take advantage of shells that can avoid forks. The arguments
15426# must be portable across $(()) and expr.
15427if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15428 eval 'as_fn_arith ()
15429 {
15430 as_val=$(( $* ))
15431 }'
15432else
15433 as_fn_arith ()
15434 {
15435 as_val=`expr "$@" || test $? -eq 1`
15436 }
15437fi # as_fn_arith
15438
15439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015440if expr a : '\(a\)' >/dev/null 2>&1 &&
15441 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15442 as_expr=expr
15443else
15444 as_expr=false
15445fi
15446
15447if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15448 as_basename=basename
15449else
15450 as_basename=false
15451fi
15452
Matthias Kloseb9621712010-04-24 17:59:49 +000015453if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15454 as_dirname=dirname
15455else
15456 as_dirname=false
15457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015459as_me=`$as_basename -- "$0" ||
15460$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15461 X"$0" : 'X\(//\)$' \| \
15462 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015463$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015464 sed '/^.*\/\([^/][^/]*\)\/*$/{
15465 s//\1/
15466 q
15467 }
15468 /^X\/\(\/\/\)$/{
15469 s//\1/
15470 q
15471 }
15472 /^X\/\(\/\).*/{
15473 s//\1/
15474 q
15475 }
15476 s/.*/./; q'`
15477
Matthias Kloseb9621712010-04-24 17:59:49 +000015478# Avoid depending upon Character Ranges.
15479as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15480as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15481as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15482as_cr_digits='0123456789'
15483as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015484
15485ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015486case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015487-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015489 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015490 xy) ECHO_C='\c';;
15491 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15492 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015493 esac;;
15494*)
15495 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015496esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015497
Martin v. Löwis11437992002-04-12 09:54:03 +000015498rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015499if test -d conf$$.dir; then
15500 rm -f conf$$.dir/conf$$.file
15501else
15502 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015505if (echo >conf$$.file) 2>/dev/null; then
15506 if ln -s conf$$.file conf$$ 2>/dev/null; then
15507 as_ln_s='ln -s'
15508 # ... but there are two gotchas:
15509 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15510 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015511 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015512 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015513 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015514 elif ln conf$$.file conf$$ 2>/dev/null; then
15515 as_ln_s=ln
15516 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015517 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015518 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015519else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015520 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15523rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015524
Matthias Kloseb9621712010-04-24 17:59:49 +000015525
15526# as_fn_mkdir_p
15527# -------------
15528# Create "$as_dir" as a directory, including parents if necessary.
15529as_fn_mkdir_p ()
15530{
15531
15532 case $as_dir in #(
15533 -*) as_dir=./$as_dir;;
15534 esac
15535 test -d "$as_dir" || eval $as_mkdir_p || {
15536 as_dirs=
15537 while :; do
15538 case $as_dir in #(
15539 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15540 *) as_qdir=$as_dir;;
15541 esac
15542 as_dirs="'$as_qdir' $as_dirs"
15543 as_dir=`$as_dirname -- "$as_dir" ||
15544$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15545 X"$as_dir" : 'X\(//\)[^/]' \| \
15546 X"$as_dir" : 'X\(//\)$' \| \
15547 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15548$as_echo X"$as_dir" |
15549 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15550 s//\1/
15551 q
15552 }
15553 /^X\(\/\/\)[^/].*/{
15554 s//\1/
15555 q
15556 }
15557 /^X\(\/\/\)$/{
15558 s//\1/
15559 q
15560 }
15561 /^X\(\/\).*/{
15562 s//\1/
15563 q
15564 }
15565 s/.*/./; q'`
15566 test -d "$as_dir" && break
15567 done
15568 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015569 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015570
15571
15572} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015573if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015574 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015575else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015576 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015577 as_mkdir_p=false
15578fi
15579
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015580
15581# as_fn_executable_p FILE
15582# -----------------------
15583# Test if FILE is an executable regular file.
15584as_fn_executable_p ()
15585{
15586 test -f "$1" && test -x "$1"
15587} # as_fn_executable_p
15588as_test_x='test -x'
15589as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015590
15591# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015592as_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 +000015593
15594# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015595as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015596
15597
Martin v. Löwis11437992002-04-12 09:54:03 +000015598exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015599## ----------------------------------- ##
15600## Main body of $CONFIG_STATUS script. ##
15601## ----------------------------------- ##
15602_ASEOF
15603test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015604
Matthias Kloseb9621712010-04-24 17:59:49 +000015605cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15606# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015607# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015608# values after options handling.
15609ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015610This file was extended by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015611generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015612
15613 CONFIG_FILES = $CONFIG_FILES
15614 CONFIG_HEADERS = $CONFIG_HEADERS
15615 CONFIG_LINKS = $CONFIG_LINKS
15616 CONFIG_COMMANDS = $CONFIG_COMMANDS
15617 $ $0 $@
15618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015619on `(hostname || uname -n) 2>/dev/null | sed 1q`
15620"
15621
Martin v. Löwis11437992002-04-12 09:54:03 +000015622_ACEOF
15623
Matthias Kloseb9621712010-04-24 17:59:49 +000015624case $ac_config_files in *"
15625"*) set x $ac_config_files; shift; ac_config_files=$*;;
15626esac
15627
15628case $ac_config_headers in *"
15629"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15630esac
15631
15632
15633cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015634# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015635config_files="$ac_config_files"
15636config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015638_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015639
Matthias Kloseb9621712010-04-24 17:59:49 +000015640cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015641ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015642\`$as_me' instantiates files and other configuration actions
15643from templates according to the current configuration. Unless the files
15644and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015645
Matthias Kloseb9621712010-04-24 17:59:49 +000015646Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015647
15648 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015649 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015650 --config print configuration, then exit
15651 -q, --quiet, --silent
15652 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 -d, --debug don't remove temporary files
15654 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 --file=FILE[:TEMPLATE]
15656 instantiate the configuration file FILE
15657 --header=FILE[:TEMPLATE]
15658 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015659
15660Configuration files:
15661$config_files
15662
15663Configuration headers:
15664$config_headers
15665
Matthias Kloseb9621712010-04-24 17:59:49 +000015666Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015669cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15670ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015671ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015672python config.status 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015673configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015674 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015675
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015676Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015677This config.status script is free software; the Free Software Foundation
15678gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015679
15680ac_pwd='$ac_pwd'
15681srcdir='$srcdir'
15682INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015683MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015684test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015685_ACEOF
15686
Matthias Kloseb9621712010-04-24 17:59:49 +000015687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15688# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015689ac_need_defaults=:
15690while test $# != 0
15691do
15692 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015693 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015694 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15695 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015696 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015697 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015698 --*=)
15699 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15700 ac_optarg=
15701 ac_shift=:
15702 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015703 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015704 ac_option=$1
15705 ac_optarg=$2
15706 ac_shift=shift
15707 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 esac
15709
Skip Montanaro6dead952003-09-25 14:50:04 +000015710 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015712 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15713 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 $as_echo "$ac_cs_version"; exit ;;
15716 --config | --confi | --conf | --con | --co | --c )
15717 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015718 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015719 debug=: ;;
15720 --file | --fil | --fi | --f )
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"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015724 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015725 esac
15726 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015727 ac_need_defaults=false;;
15728 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015729 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015730 case $ac_optarg in
15731 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15732 esac
15733 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015734 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015735 --he | --h)
15736 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015737 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015738Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015739 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015740 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015741 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15742 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15743 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015744
15745 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015746 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015747Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015748
Matthias Kloseb9621712010-04-24 17:59:49 +000015749 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015751
15752 esac
15753 shift
15754done
15755
Skip Montanaro6dead952003-09-25 14:50:04 +000015756ac_configure_extra_args=
15757
15758if $ac_cs_silent; then
15759 exec 6>/dev/null
15760 ac_configure_extra_args="$ac_configure_extra_args --silent"
15761fi
15762
15763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015764cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015765if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015766 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015767 shift
15768 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15769 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015771 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015772fi
15773
Martin v. Löwis11437992002-04-12 09:54:03 +000015774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015775cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015776exec 5>>config.log
15777{
15778 echo
15779 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15780## Running $as_me. ##
15781_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015782 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015783} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015786cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015787_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015788
Matthias Kloseb9621712010-04-24 17:59:49 +000015789cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015790
15791# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015792for ac_config_target in $ac_config_targets
15793do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015794 case $ac_config_target in
15795 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15796 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15797 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015798 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15799 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015800 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15801 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015802 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015803 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015804
Victor Stinnere0be4232011-10-25 13:06:09 +020015805 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015806 esac
15807done
15808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809
Martin v. Löwis11437992002-04-12 09:54:03 +000015810# If the user did not use the arguments to specify the items to instantiate,
15811# then the envvar interface is used. Set only those that are not.
15812# We use the long form for the default assignment because of an extremely
15813# bizarre bug on SunOS 4.1.3.
15814if $ac_need_defaults; then
15815 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15816 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15817fi
15818
Skip Montanaro6dead952003-09-25 14:50:04 +000015819# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015820# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015821# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015822# Hook for its removal unless debugging.
15823# Note that there is a small window in which the directory will not be cleaned:
15824# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015825$debug ||
15826{
Victor Stinnere0be4232011-10-25 13:06:09 +020015827 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015828 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015829 : "${ac_tmp:=$tmp}"
15830 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015831' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015832 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015833}
Martin v. Löwis11437992002-04-12 09:54:03 +000015834# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015835
Martin v. Löwis11437992002-04-12 09:54:03 +000015836{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015837 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015838 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015839} ||
15840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015841 tmp=./conf$$-$RANDOM
15842 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015843} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015844ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015845
Matthias Kloseb9621712010-04-24 17:59:49 +000015846# Set up the scripts for CONFIG_FILES section.
15847# No need to generate them if there are no CONFIG_FILES.
15848# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015849if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015850
Matthias Kloseb9621712010-04-24 17:59:49 +000015851
15852ac_cr=`echo X | tr X '\015'`
15853# On cygwin, bash can eat \r inside `` if the user requested igncr.
15854# But we know of no other shell where ac_cr would be empty at this
15855# point, so we can use a bashism as a fallback.
15856if test "x$ac_cr" = x; then
15857 eval ac_cr=\$\'\\r\'
15858fi
15859ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15860if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015861 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015862else
15863 ac_cs_awk_cr=$ac_cr
15864fi
15865
Victor Stinnere0be4232011-10-25 13:06:09 +020015866echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015867_ACEOF
15868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015869
Matthias Kloseb9621712010-04-24 17:59:49 +000015870{
15871 echo "cat >conf$$subs.awk <<_ACEOF" &&
15872 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15873 echo "_ACEOF"
15874} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015875 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15876ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877ac_delim='%!_!# '
15878for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015879 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015880 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015881
Matthias Kloseb9621712010-04-24 17:59:49 +000015882 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15883 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015884 break
15885 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015886 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015887 else
15888 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015889 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015890done
Matthias Kloseb9621712010-04-24 17:59:49 +000015891rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015892
Matthias Kloseb9621712010-04-24 17:59:49 +000015893cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015894cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015896sed -n '
15897h
15898s/^/S["/; s/!.*/"]=/
15899p
15900g
15901s/^[^!]*!//
15902:repl
15903t repl
15904s/'"$ac_delim"'$//
15905t delim
15906:nl
15907h
15908s/\(.\{148\}\)..*/\1/
15909t more1
15910s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15911p
15912n
15913b repl
15914:more1
15915s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15916p
15917g
15918s/.\{148\}//
15919t nl
15920:delim
15921h
15922s/\(.\{148\}\)..*/\1/
15923t more2
15924s/["\\]/\\&/g; s/^/"/; s/$/"/
15925p
15926b
15927:more2
15928s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15929p
15930g
15931s/.\{148\}//
15932t delim
15933' <conf$$subs.awk | sed '
15934/^[^""]/{
15935 N
15936 s/\n//
15937}
15938' >>$CONFIG_STATUS || ac_write_fail=1
15939rm -f conf$$subs.awk
15940cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15941_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015942cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015943 for (key in S) S_is_set[key] = 1
15944 FS = ""
15945
15946}
15947{
15948 line = $ 0
15949 nfields = split(line, field, "@")
15950 substed = 0
15951 len = length(field[1])
15952 for (i = 2; i < nfields; i++) {
15953 key = field[i]
15954 keylen = length(key)
15955 if (S_is_set[key]) {
15956 value = S[key]
15957 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15958 len += length(value) + length(field[++i])
15959 substed = 1
15960 } else
15961 len += 1 + keylen
15962 }
15963
15964 print line
15965}
15966
15967_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015969cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15970if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15971 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15972else
15973 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015974fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015975 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015976_ACEOF
15977
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015978# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15979# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015980# trailing colons and then remove the whole line if VPATH becomes empty
15981# (actually we leave an empty line to preserve line numbers).
15982if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015983 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15984h
15985s///
15986s/^/:/
15987s/[ ]*$/:/
15988s/:\$(srcdir):/:/g
15989s/:\${srcdir}:/:/g
15990s/:@srcdir@:/:/g
15991s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015992s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015993x
15994s/\(=[ ]*\).*/\1/
15995G
15996s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015997s/^[^=]*=[ ]*$//
15998}'
15999fi
16000
Matthias Kloseb9621712010-04-24 17:59:49 +000016001cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016002fi # test -n "$CONFIG_FILES"
16003
Matthias Kloseb9621712010-04-24 17:59:49 +000016004# Set up the scripts for CONFIG_HEADERS section.
16005# No need to generate them if there are no CONFIG_HEADERS.
16006# This happens for instance with `./config.status Makefile'.
16007if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016008cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016009BEGIN {
16010_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016011
Matthias Kloseb9621712010-04-24 17:59:49 +000016012# Transform confdefs.h into an awk script `defines.awk', embedded as
16013# here-document in config.status, that substitutes the proper values into
16014# config.h.in to produce config.h.
16015
16016# Create a delimiter string that does not exist in confdefs.h, to ease
16017# handling of long lines.
16018ac_delim='%!_!# '
16019for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016020 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16021 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016022 break
16023 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016024 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016025 else
16026 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16027 fi
16028done
16029
16030# For the awk script, D is an array of macro values keyed by name,
16031# likewise P contains macro parameters if any. Preserve backslash
16032# newline sequences.
16033
16034ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16035sed -n '
16036s/.\{148\}/&'"$ac_delim"'/g
16037t rset
16038:rset
16039s/^[ ]*#[ ]*define[ ][ ]*/ /
16040t def
16041d
16042:def
16043s/\\$//
16044t bsnl
16045s/["\\]/\\&/g
16046s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16047D["\1"]=" \3"/p
16048s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16049d
16050:bsnl
16051s/["\\]/\\&/g
16052s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16053D["\1"]=" \3\\\\\\n"\\/p
16054t cont
16055s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16056t cont
16057d
16058:cont
16059n
16060s/.\{148\}/&'"$ac_delim"'/g
16061t clear
16062:clear
16063s/\\$//
16064t bsnlc
16065s/["\\]/\\&/g; s/^/"/; s/$/"/p
16066d
16067:bsnlc
16068s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16069b cont
16070' <confdefs.h | sed '
16071s/'"$ac_delim"'/"\\\
16072"/g' >>$CONFIG_STATUS || ac_write_fail=1
16073
16074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16075 for (key in D) D_is_set[key] = 1
16076 FS = ""
16077}
16078/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16079 line = \$ 0
16080 split(line, arg, " ")
16081 if (arg[1] == "#") {
16082 defundef = arg[2]
16083 mac1 = arg[3]
16084 } else {
16085 defundef = substr(arg[1], 2)
16086 mac1 = arg[2]
16087 }
16088 split(mac1, mac2, "(") #)
16089 macro = mac2[1]
16090 prefix = substr(line, 1, index(line, defundef) - 1)
16091 if (D_is_set[macro]) {
16092 # Preserve the white space surrounding the "#".
16093 print prefix "define", macro P[macro] D[macro]
16094 next
16095 } else {
16096 # Replace #undef with comments. This is necessary, for example,
16097 # in the case of _POSIX_SOURCE, which is predefined and required
16098 # on some systems where configure will not decide to define it.
16099 if (defundef == "undef") {
16100 print "/*", prefix defundef, macro, "*/"
16101 next
16102 }
16103 }
16104}
16105{ print }
16106_ACAWK
16107_ACEOF
16108cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016109 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016110fi # test -n "$CONFIG_HEADERS"
16111
16112
16113eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16114shift
16115for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016116do
16117 case $ac_tag in
16118 :[FHLC]) ac_mode=$ac_tag; continue;;
16119 esac
16120 case $ac_mode$ac_tag in
16121 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016122 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016123 :[FH]-) ac_tag=-:-;;
16124 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16125 esac
16126 ac_save_IFS=$IFS
16127 IFS=:
16128 set x $ac_tag
16129 IFS=$ac_save_IFS
16130 shift
16131 ac_file=$1
16132 shift
16133
16134 case $ac_mode in
16135 :L) ac_source=$1;;
16136 :[FH])
16137 ac_file_inputs=
16138 for ac_f
16139 do
16140 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016141 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016142 *) # Look for the file first in the build tree, then in the source tree
16143 # (if the path is not absolute). The absolute path cannot be DOS-style,
16144 # because $ac_f cannot contain `:'.
16145 test -f "$ac_f" ||
16146 case $ac_f in
16147 [\\/$]*) false;;
16148 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16149 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016150 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016151 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016152 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16153 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016154 done
16155
16156 # Let's still pretend it is `configure' which instantiates (i.e., don't
16157 # use $as_me), people would be surprised to read:
16158 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016159 configure_input='Generated from '`
16160 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16161 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016162 if test x"$ac_file" != x-; then
16163 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016164 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16165$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016166 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016167 # Neutralize special characters interpreted by sed in replacement strings.
16168 case $configure_input in #(
16169 *\&* | *\|* | *\\* )
16170 ac_sed_conf_input=`$as_echo "$configure_input" |
16171 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16172 *) ac_sed_conf_input=$configure_input;;
16173 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016174
16175 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016176 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16177 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016178 esac
16179 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016180 esac
16181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016182 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016183$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016184 X"$ac_file" : 'X\(//\)[^/]' \| \
16185 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016186 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016187$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016188 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16189 s//\1/
16190 q
16191 }
16192 /^X\(\/\/\)[^/].*/{
16193 s//\1/
16194 q
16195 }
16196 /^X\(\/\/\)$/{
16197 s//\1/
16198 q
16199 }
16200 /^X\(\/\).*/{
16201 s//\1/
16202 q
16203 }
16204 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016205 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016206 ac_builddir=.
16207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208case "$ac_dir" in
16209.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16210*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016211 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016212 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016213 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214 case $ac_top_builddir_sub in
16215 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16216 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16217 esac ;;
16218esac
16219ac_abs_top_builddir=$ac_pwd
16220ac_abs_builddir=$ac_pwd$ac_dir_suffix
16221# for backward compatibility:
16222ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016223
16224case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016225 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016226 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227 ac_top_srcdir=$ac_top_builddir_sub
16228 ac_abs_top_srcdir=$ac_pwd ;;
16229 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016231 ac_top_srcdir=$srcdir
16232 ac_abs_top_srcdir=$srcdir ;;
16233 *) # Relative name.
16234 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16235 ac_top_srcdir=$ac_top_build_prefix$srcdir
16236 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016237esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016238ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016239
Martin v. Löwis11437992002-04-12 09:54:03 +000016240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016241 case $ac_mode in
16242 :F)
16243 #
16244 # CONFIG_FILE
16245 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016246
16247 case $INSTALL in
16248 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016249 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016250 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016251 ac_MKDIR_P=$MKDIR_P
16252 case $MKDIR_P in
16253 [\\/$]* | ?:[\\/]* ) ;;
16254 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16255 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016256_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016257
Matthias Kloseb9621712010-04-24 17:59:49 +000016258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259# If the template does not know about datarootdir, expand it.
16260# FIXME: This hack should be removed a few years after 2.60.
16261ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016262ac_sed_dataroot='
16263/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264 p
16265 q
16266}
16267/@datadir@/p
16268/@docdir@/p
16269/@infodir@/p
16270/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016271/@mandir@/p'
16272case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273*datarootdir*) ac_datarootdir_seen=yes;;
16274*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016275 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16276$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016278cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016279 ac_datarootdir_hack='
16280 s&@datadir@&$datadir&g
16281 s&@docdir@&$docdir&g
16282 s&@infodir@&$infodir&g
16283 s&@localedir@&$localedir&g
16284 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016285 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016286esac
16287_ACEOF
16288
16289# Neutralize VPATH when `$srcdir' = `.'.
16290# Shell code in configure.ac might set extrasub.
16291# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016292cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16293ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016294$extrasub
16295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016296cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016297:t
16298/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016299s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016301s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016302s&@srcdir@&$ac_srcdir&;t t
16303s&@abs_srcdir@&$ac_abs_srcdir&;t t
16304s&@top_srcdir@&$ac_top_srcdir&;t t
16305s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16306s&@builddir@&$ac_builddir&;t t
16307s&@abs_builddir@&$ac_abs_builddir&;t t
16308s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16309s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016310s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016311$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016312"
Victor Stinnere0be4232011-10-25 13:06:09 +020016313eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16314 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016316test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016317 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16318 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16319 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016320 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016321which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016322$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016323which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016324
Victor Stinnere0be4232011-10-25 13:06:09 +020016325 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016326 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016327 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16328 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016329 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016330 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016331 ;;
16332 :H)
16333 #
16334 # CONFIG_HEADER
16335 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016336 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016337 {
16338 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016339 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16340 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016341 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016342 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016343 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16344$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016345 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016346 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016347 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016348 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016349 fi
16350 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016351 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016352 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016353 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016354 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016357
16358 esac
16359
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016360
16361 case $ac_file$ac_mode in
16362 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16363
16364 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016365done # for ac_tag
16366
Guido van Rossum627b2d71993-12-24 10:39:16 +000016367
Matthias Kloseb9621712010-04-24 17:59:49 +000016368as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016369_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016370ac_clean_files=$ac_clean_files_save
16371
Matthias Kloseb9621712010-04-24 17:59:49 +000016372test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016373 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016374
Martin v. Löwis11437992002-04-12 09:54:03 +000016375
16376# configure is writing to config.log, and then calls config.status.
16377# config.status does its own redirection, appending to config.log.
16378# Unfortunately, on DOS this fails, as config.log is still kept open
16379# by configure, so config.status won't be able to write to it; its
16380# output is simply discarded. So we exec the FD to /dev/null,
16381# effectively closing config.log, so it can be properly (re)opened and
16382# appended to by config.status. When coming back to configure, we
16383# need to make the FD available again.
16384if test "$no_create" != yes; then
16385 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016386 ac_config_status_args=
16387 test "$silent" = yes &&
16388 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016390 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016391 exec 5>>config.log
16392 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16393 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016394 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016395fi
16396if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16398$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016399fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016400
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016401
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016402echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016403if test ! -f Modules/Setup
16404then
16405 cp $srcdir/Modules/Setup.dist Modules/Setup
16406fi
16407
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016408echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016409if test ! -f Modules/Setup.local
16410then
16411 echo "# Edit this file for local setup changes" >Modules/Setup.local
16412fi
16413
16414echo "creating Makefile"
16415$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16416 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016417 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016418mv config.c Modules