blob: bea5062c2032b39b1b731f4d74ce2306e5d86617 [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
Stefan Krah19c21392012-11-22 23:47:32 +010011623#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011624#include <sys/types.h>
11625#include <netdb.h>
11626#include <string.h>
11627#include <sys/socket.h>
11628#include <netinet/in.h>
11629
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011630int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011631{
11632 int passive, gaierr, inet4 = 0, inet6 = 0;
11633 struct addrinfo hints, *ai, *aitop;
11634 char straddr[INET6_ADDRSTRLEN], strport[16];
11635
11636 for (passive = 0; passive <= 1; passive++) {
11637 memset(&hints, 0, sizeof(hints));
11638 hints.ai_family = AF_UNSPEC;
11639 hints.ai_flags = passive ? AI_PASSIVE : 0;
11640 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011641 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011642 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11643 (void)gai_strerror(gaierr);
11644 goto bad;
11645 }
11646 for (ai = aitop; ai; ai = ai->ai_next) {
11647 if (ai->ai_addr == NULL ||
11648 ai->ai_addrlen == 0 ||
11649 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11650 straddr, sizeof(straddr), strport, sizeof(strport),
11651 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11652 goto bad;
11653 }
11654 switch (ai->ai_family) {
11655 case AF_INET:
11656 if (strcmp(strport, "54321") != 0) {
11657 goto bad;
11658 }
11659 if (passive) {
11660 if (strcmp(straddr, "0.0.0.0") != 0) {
11661 goto bad;
11662 }
11663 } else {
11664 if (strcmp(straddr, "127.0.0.1") != 0) {
11665 goto bad;
11666 }
11667 }
11668 inet4++;
11669 break;
11670 case AF_INET6:
11671 if (strcmp(strport, "54321") != 0) {
11672 goto bad;
11673 }
11674 if (passive) {
11675 if (strcmp(straddr, "::") != 0) {
11676 goto bad;
11677 }
11678 } else {
11679 if (strcmp(straddr, "::1") != 0) {
11680 goto bad;
11681 }
11682 }
11683 inet6++;
11684 break;
11685 case AF_UNSPEC:
11686 goto bad;
11687 break;
11688 default:
11689 /* another family support? */
11690 break;
11691 }
11692 }
11693 }
11694
11695 if (!(inet4 == 0 || inet4 == 2))
11696 goto bad;
11697 if (!(inet6 == 0 || inet6 == 2))
11698 goto bad;
11699
11700 if (aitop)
11701 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011702 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011703
11704 bad:
11705 if (aitop)
11706 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011707 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011708}
11709
Martin v. Löwis11437992002-04-12 09:54:03 +000011710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011711if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011712 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011713else
Matthias Kloseb9621712010-04-24 17:59:49 +000011714 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011715fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011716rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11717 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011719
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011720fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011721
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011723
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11725$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11726
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011727if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011728then
11729 if test $ipv6 = yes
11730 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011731 echo 'Fatal: You must get working getaddrinfo() function.'
11732 echo ' or you can specify "--disable-ipv6"'.
11733 exit 1
11734 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011735else
Martin v. Löwis11437992002-04-12 09:54:03 +000011736
Matthias Kloseb9621712010-04-24 17:59:49 +000011737$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011738
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011739fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011740
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011741for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011742do :
11743 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011744if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011745 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011746#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011747_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011748
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011749fi
11750done
11751
Michael W. Hudson54241132001-12-07 15:38:26 +000011752
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011753# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11755$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011756if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011757 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011758else
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011760/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011761#include <sys/types.h>
11762#include <sys/time.h>
11763#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011764
Martin v. Löwis11437992002-04-12 09:54:03 +000011765int
11766main ()
11767{
11768if ((struct tm *) 0)
11769return 0;
11770 ;
11771 return 0;
11772}
11773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011774if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011775 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011776else
Matthias Kloseb9621712010-04-24 17:59:49 +000011777 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11782$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011783if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011784
Matthias Kloseb9621712010-04-24 17:59:49 +000011785$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011786
11787fi
11788
Matthias Kloseb9621712010-04-24 17:59:49 +000011789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11790$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011791if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011792 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011793else
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011795/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011796#include <sys/types.h>
11797#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011798
Martin v. Löwis11437992002-04-12 09:54:03 +000011799int
11800main ()
11801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011802struct tm tm;
11803 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011804 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011805 ;
11806 return 0;
11807}
11808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011809if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011810 ac_cv_struct_tm=time.h
11811else
Matthias Kloseb9621712010-04-24 17:59:49 +000011812 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11817$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011818if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011819
Matthias Kloseb9621712010-04-24 17:59:49 +000011820$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011821
11822fi
11823
Matthias Kloseb9621712010-04-24 17:59:49 +000011824ac_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 +000011825#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011826
Matthias Kloseb9621712010-04-24 17:59:49 +000011827"
Victor Stinnere0be4232011-10-25 13:06:09 +020011828if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011829
11830cat >>confdefs.h <<_ACEOF
11831#define HAVE_STRUCT_TM_TM_ZONE 1
11832_ACEOF
11833
11834
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011835fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011836
Martin v. Löwis11437992002-04-12 09:54:03 +000011837if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11838
Matthias Kloseb9621712010-04-24 17:59:49 +000011839$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011840
11841else
Matthias Kloseb9621712010-04-24 17:59:49 +000011842 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11843"
Victor Stinnere0be4232011-10-25 13:06:09 +020011844if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011845 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011846else
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011848fi
11849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011850cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011851#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011852_ACEOF
11853
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11855$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011856if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011857 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011858else
Matthias Kloseb9621712010-04-24 17:59:49 +000011859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011860/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011861#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011862#if !HAVE_DECL_TZNAME
11863extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011865
Martin v. Löwis11437992002-04-12 09:54:03 +000011866int
11867main ()
11868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011869return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011870 ;
11871 return 0;
11872}
11873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011874if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011875 ac_cv_var_tzname=yes
11876else
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011879rm -f core conftest.err conftest.$ac_objext \
11880 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011881fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11883$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011884 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011885
Matthias Kloseb9621712010-04-24 17:59:49 +000011886$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011887
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011888 fi
11889fi
11890
Matthias Kloseb9621712010-04-24 17:59:49 +000011891ac_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 +020011892if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011893
11894cat >>confdefs.h <<_ACEOF
11895#define HAVE_STRUCT_STAT_ST_RDEV 1
11896_ACEOF
11897
11898
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011899fi
11900
Matthias Kloseb9621712010-04-24 17:59:49 +000011901ac_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 +020011902if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011903
Martin v. Löwis11437992002-04-12 09:54:03 +000011904cat >>confdefs.h <<_ACEOF
11905#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11906_ACEOF
11907
11908
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011909fi
11910
Matthias Kloseb9621712010-04-24 17:59:49 +000011911ac_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 +020011912if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011913
11914cat >>confdefs.h <<_ACEOF
11915#define HAVE_STRUCT_STAT_ST_FLAGS 1
11916_ACEOF
11917
11918
11919fi
11920
Matthias Kloseb9621712010-04-24 17:59:49 +000011921ac_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 +020011922if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011923
11924cat >>confdefs.h <<_ACEOF
11925#define HAVE_STRUCT_STAT_ST_GEN 1
11926_ACEOF
11927
11928
11929fi
11930
Matthias Kloseb9621712010-04-24 17:59:49 +000011931ac_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 +020011932if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011933
11934cat >>confdefs.h <<_ACEOF
11935#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11936_ACEOF
11937
11938
11939fi
11940
Matthias Kloseb9621712010-04-24 17:59:49 +000011941ac_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 +020011942if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011943
Martin v. Löwis11437992002-04-12 09:54:03 +000011944cat >>confdefs.h <<_ACEOF
11945#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11946_ACEOF
11947
11948
Matthias Kloseb9621712010-04-24 17:59:49 +000011949$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011950
11951else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011952 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011953 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011954 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11955 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011956esac
11957
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011958fi
11959
Michael W. Hudson54241132001-12-07 15:38:26 +000011960
Martin v. Löwis11437992002-04-12 09:54:03 +000011961
Matthias Kloseb9621712010-04-24 17:59:49 +000011962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11963$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011964if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011966else
Matthias Kloseb159a552010-04-25 21:00:44 +000011967
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011969/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011970#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011971int
11972main ()
11973{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011974return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 ;
11976 return 0;
11977}
11978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011979if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011980 ac_cv_header_time_altzone=yes
11981else
Matthias Kloseb9621712010-04-24 17:59:49 +000011982 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000011983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000011985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011986fi
11987
Matthias Kloseb9621712010-04-24 17:59:49 +000011988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11989$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011990if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011991
Matthias Kloseb9621712010-04-24 17:59:49 +000011992$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011993
11994fi
11995
Guido van Rossumda88dad1995-01-26 00:46:29 +000011996was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000011997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
11998$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
11999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012000/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012001
12002#include <sys/types.h>
12003#include <sys/select.h>
12004#include <sys/time.h>
12005
Martin v. Löwis11437992002-04-12 09:54:03 +000012006int
12007main ()
12008{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012009;
Martin v. Löwis11437992002-04-12 09:54:03 +000012010 ;
12011 return 0;
12012}
12013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012014if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012015
12016
Matthias Kloseb9621712010-04-24 17:59:49 +000012017$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012018
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012019 was_it_defined=yes
12020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12024$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012025
Matthias Kloseb9621712010-04-24 17:59:49 +000012026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12027$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012028if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012030else
Matthias Kloseb9621712010-04-24 17:59:49 +000012031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012032/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012033#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012034int
12035main ()
12036{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012037struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012038 ;
12039 return 0;
12040}
12041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012042if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012043 ac_cv_struct_addrinfo=yes
12044else
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012046fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12048fi
12049
Matthias Kloseb9621712010-04-24 17:59:49 +000012050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12051$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012052if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012053
Matthias Kloseb9621712010-04-24 17:59:49 +000012054$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012055
12056fi
12057
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12059$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012060if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012062else
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012064/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012065
12066# include <sys/types.h>
12067# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012068int
12069main ()
12070{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012071struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 ;
12073 return 0;
12074}
12075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012077 ac_cv_struct_sockaddr_storage=yes
12078else
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12082fi
12083
Matthias Kloseb9621712010-04-24 17:59:49 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12085$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012086if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012087
Matthias Kloseb9621712010-04-24 17:59:49 +000012088$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012089
12090fi
12091
Guido van Rossum627b2d71993-12-24 10:39:16 +000012092# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012093
Matthias Kloseb9621712010-04-24 17:59:49 +000012094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12095$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012096if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012098else
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012101$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012102int
12103main ()
12104{
12105static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012106test_array [0] = 0;
12107return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012108
12109 ;
12110 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012111}
Martin v. Löwis11437992002-04-12 09:54:03 +000012112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012113if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012114 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012115else
Matthias Kloseb9621712010-04-24 17:59:49 +000012116 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12121$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012122if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012124
12125fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012126
Matthias Kloseb9621712010-04-24 17:59:49 +000012127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12128$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012129if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012131else
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012133/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012134
Martin v. Löwis11437992002-04-12 09:54:03 +000012135int
12136main ()
12137{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012138
Martin v. Löwis11437992002-04-12 09:54:03 +000012139#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012140 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012141 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012142 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012143 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012144 char const *const *pcpcc;
12145 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012146 /* NEC SVR4.0.2 mips cc rejects this. */
12147 struct point {int x, y;};
12148 static struct point const zero = {0,0};
12149 /* AIX XL C 1.02.0.0 rejects this.
12150 It does not let you subtract one const X* pointer from another in
12151 an arm of an if-expression whose if-part is not a constant
12152 expression */
12153 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012155 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012156 ++pcpcc;
12157 ppc = (char**) pcpcc;
12158 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012159 { /* SCO 3.2v4 cc rejects this sort of thing. */
12160 char tx;
12161 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012162 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012163
Martin v. Löwis11437992002-04-12 09:54:03 +000012164 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012166 }
12167 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12168 int x[] = {25, 17};
12169 const int *foo = &x[0];
12170 ++foo;
12171 }
12172 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12173 typedef const int *iptr;
12174 iptr p = 0;
12175 ++p;
12176 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012177 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012178 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012179 struct s { int j; const int *ap[3]; } bx;
12180 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012181 }
12182 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12183 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012184 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012185 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012186 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012187#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012188
Martin v. Löwis11437992002-04-12 09:54:03 +000012189 ;
12190 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012191}
Martin v. Löwis11437992002-04-12 09:54:03 +000012192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012193if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012194 ac_cv_c_const=yes
12195else
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12201$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012202if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012203
Matthias Kloseb9621712010-04-24 17:59:49 +000012204$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012205
12206fi
12207
Michael W. Hudson54241132001-12-07 15:38:26 +000012208
Guido van Rossumda88dad1995-01-26 00:46:29 +000012209works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12211$as_echo_n "checking for working volatile... " >&6; }
12212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012213/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012214
Martin v. Löwis11437992002-04-12 09:54:03 +000012215int
12216main ()
12217{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012218volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 ;
12220 return 0;
12221}
12222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012223if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012224 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012225else
Skip Montanaro6dead952003-09-25 14:50:04 +000012226
Matthias Kloseb9621712010-04-24 17:59:49 +000012227$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012228
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012229
Guido van Rossum627b2d71993-12-24 10:39:16 +000012230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12233$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012234
Guido van Rossumda88dad1995-01-26 00:46:29 +000012235works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12237$as_echo_n "checking for working signed char... " >&6; }
12238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012239/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012240
Martin v. Löwis11437992002-04-12 09:54:03 +000012241int
12242main ()
12243{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012244signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012245 ;
12246 return 0;
12247}
12248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012249if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012250 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012251else
Skip Montanaro6dead952003-09-25 14:50:04 +000012252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012254
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012255
Guido van Rossum7f43da71994-08-01 12:15:30 +000012256fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12259$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012260
Guido van Rossumda88dad1995-01-26 00:46:29 +000012261have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12263$as_echo_n "checking for prototypes... " >&6; }
12264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012265/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012266int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012267int
12268main ()
12269{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012270return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012271 ;
12272 return 0;
12273}
12274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012275if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012276
Matthias Kloseb9621712010-04-24 17:59:49 +000012277$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012278
Matthias Kloseb159a552010-04-25 21:00:44 +000012279 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12283$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012284
Guido van Rossumda88dad1995-01-26 00:46:29 +000012285works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12287$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012289/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012290
12291#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012292int foo(int x, ...) {
12293 va_list va;
12294 va_start(va, x);
12295 va_arg(va, int);
12296 va_arg(va, char *);
12297 va_arg(va, double);
12298 return 0;
12299}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012300
Martin v. Löwis11437992002-04-12 09:54:03 +000012301int
12302main ()
12303{
Guido van Rossum90eea071996-08-30 20:58:57 +000012304return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012305 ;
12306 return 0;
12307}
12308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012310
12311
Matthias Kloseb9621712010-04-24 17:59:49 +000012312$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012313
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012314 works=yes
12315
Guido van Rossum627b2d71993-12-24 10:39:16 +000012316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12319$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012320
Martin v. Löwisd6320502004-08-12 13:45:08 +000012321# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12323$as_echo_n "checking for socketpair... " >&6; }
12324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012325/* end confdefs.h. */
12326
12327#include <sys/types.h>
12328#include <sys/socket.h>
12329
12330int
12331main ()
12332{
12333void *x=socketpair
12334 ;
12335 return 0;
12336}
12337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012339
Matthias Kloseb9621712010-04-24 17:59:49 +000012340$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012341
Matthias Kloseb159a552010-04-25 21:00:44 +000012342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012343$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012344else
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12346$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012347
12348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012350
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012351# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12353$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012355/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012356#include <sys/types.h>
12357#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012358int
12359main ()
12360{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012361struct sockaddr x;
12362x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012363 ;
12364 return 0;
12365}
12366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012367if ac_fn_c_try_compile "$LINENO"; then :
12368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12369$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012370
Matthias Kloseb9621712010-04-24 17:59:49 +000012371$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012372
12373else
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12375$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012376
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012379
Guido van Rossumda88dad1995-01-26 00:46:29 +000012380va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12382$as_echo_n "checking whether va_list is an array... " >&6; }
12383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012384/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385
12386#ifdef HAVE_STDARG_PROTOTYPES
12387#include <stdarg.h>
12388#else
12389#include <varargs.h>
12390#endif
12391
Martin v. Löwis11437992002-04-12 09:54:03 +000012392int
12393main ()
12394{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012395va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012396 ;
12397 return 0;
12398}
12399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012400if ac_fn_c_try_compile "$LINENO"; then :
12401
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012402else
Skip Montanaro6dead952003-09-25 14:50:04 +000012403
Martin v. Löwis11437992002-04-12 09:54:03 +000012404
Matthias Kloseb9621712010-04-24 17:59:49 +000012405$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012406
Guido van Rossumda88dad1995-01-26 00:46:29 +000012407 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012408
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12412$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012413
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012414# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012415
12416
Matthias Kloseb9621712010-04-24 17:59:49 +000012417ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012418if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012419
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012421
Matthias Kloseb9621712010-04-24 17:59:49 +000012422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12423$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012424 OLD_CFLAGS=$CFLAGS
12425 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012427/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012428
12429# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012430
Martin v. Löwis11437992002-04-12 09:54:03 +000012431int
12432main ()
12433{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012434
12435 char *name;
12436 struct hostent *he, *res;
12437 char buffer[2048];
12438 int buflen = 2048;
12439 int h_errnop;
12440
12441 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012442
12443 ;
12444 return 0;
12445}
12446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012447if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012448
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012450
Martin v. Löwis11437992002-04-12 09:54:03 +000012451
Matthias Kloseb9621712010-04-24 17:59:49 +000012452$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12455$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012456
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012457else
Skip Montanaro6dead952003-09-25 14:50:04 +000012458
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12460$as_echo "no" >&6; }
12461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12462$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012464/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012465
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012466# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012467
Martin v. Löwis11437992002-04-12 09:54:03 +000012468int
12469main ()
12470{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012471
12472 char *name;
12473 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012474 char buffer[2048];
12475 int buflen = 2048;
12476 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012477
Matthias Kloseb159a552010-04-25 21:00:44 +000012478 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012479
12480 ;
12481 return 0;
12482}
12483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012485
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012487
Martin v. Löwis11437992002-04-12 09:54:03 +000012488
Matthias Kloseb159a552010-04-25 21:00:44 +000012489$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012490
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12492$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012493
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012494else
Skip Montanaro6dead952003-09-25 14:50:04 +000012495
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12497$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12499$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12501/* end confdefs.h. */
12502
12503# include <netdb.h>
12504
12505int
12506main ()
12507{
12508
12509 char *name;
12510 struct hostent *he;
12511 struct hostent_data data;
12512
12513 (void) gethostbyname_r(name, he, &data);
12514
12515 ;
12516 return 0;
12517}
12518_ACEOF
12519if ac_fn_c_try_compile "$LINENO"; then :
12520
12521 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12522
12523
12524$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12525
12526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12527$as_echo "yes" >&6; }
12528
12529else
12530
12531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12532$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012533
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012536
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012542 CFLAGS=$OLD_CFLAGS
12543
12544else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012545
Matthias Kloseb9621712010-04-24 17:59:49 +000012546 for ac_func in gethostbyname
12547do :
12548 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012549if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012551#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012552_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012553
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012554fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012555done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012556
Michael W. Hudson54241132001-12-07 15:38:26 +000012557
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012558fi
12559
Michael W. Hudson54241132001-12-07 15:38:26 +000012560
12561
12562
12563
12564
12565
Guido van Rossum627b2d71993-12-24 10:39:16 +000012566# checks for system services
12567# (none yet)
12568
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012569# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012570ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012571if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012572
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012573else
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12575$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012576if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012577 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012578else
Martin v. Löwis11437992002-04-12 09:54:03 +000012579 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012580LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012584/* Override any GCC internal prototype to avoid an error.
12585 Use char because int might match the return type of a GCC
12586 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012587#ifdef __cplusplus
12588extern "C"
12589#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012590char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012591int
12592main ()
12593{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012594return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012595 ;
12596 return 0;
12597}
12598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012599if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012600 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012601else
Matthias Kloseb9621712010-04-24 17:59:49 +000012602 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012604rm -f core conftest.err conftest.$ac_objext \
12605 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012606LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12609$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012610if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012611 cat >>confdefs.h <<_ACEOF
12612#define HAVE_LIBIEEE 1
12613_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012614
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012615 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012616
Guido van Rossum627b2d71993-12-24 10:39:16 +000012617fi
12618
Michael W. Hudson54241132001-12-07 15:38:26 +000012619
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012620fi
12621
Michael W. Hudson54241132001-12-07 15:38:26 +000012622
Guido van Rossum7f253911997-05-09 02:42:48 +000012623# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12625$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012627# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012628if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012630if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012631then
12632
Matthias Kloseb9621712010-04-24 17:59:49 +000012633$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012634
Matthias Kloseb9621712010-04-24 17:59:49 +000012635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12636$as_echo "yes" >&6; }
12637else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12638$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012639fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012640else
Matthias Kloseb9621712010-04-24 17:59:49 +000012641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12642$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643fi
12644
Guido van Rossum7f253911997-05-09 02:42:48 +000012645
Guido van Rossum7f43da71994-08-01 12:15:30 +000012646# check for --with-libm=...
12647
Guido van Rossum563e7081996-09-10 18:20:48 +000012648case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012649Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012650*) LIBM=-lm
12651esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12653$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012654
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012655# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012656if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012658if test "$withval" = no
12659then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12661$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012662elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012663then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12665$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012666else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012667fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012668else
Matthias Kloseb9621712010-04-24 17:59:49 +000012669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12670$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671fi
12672
Guido van Rossum7f43da71994-08-01 12:15:30 +000012673
12674# check for --with-libc=...
12675
Matthias Kloseb9621712010-04-24 17:59:49 +000012676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12677$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012679# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012680if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012682if test "$withval" = no
12683then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12685$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012686elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012687then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12689$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012690else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012691fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012692else
Matthias Kloseb9621712010-04-24 17:59:49 +000012693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12694$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695fi
12696
Guido van Rossum7f43da71994-08-01 12:15:30 +000012697
Stefan Krah1919b7e2012-03-21 18:25:23 +010012698# **************************************
12699# * Check for gcc x64 inline assembler *
12700# **************************************
12701
12702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12703$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12705/* end confdefs.h. */
12706
12707int
12708main ()
12709{
12710
12711 __asm__ __volatile__ ("movq %rcx, %rax");
12712
12713 ;
12714 return 0;
12715}
12716_ACEOF
12717if ac_fn_c_try_compile "$LINENO"; then :
12718 have_gcc_asm_for_x64=yes
12719else
12720 have_gcc_asm_for_x64=no
12721fi
12722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12724$as_echo "$have_gcc_asm_for_x64" >&6; }
12725if test "$have_gcc_asm_for_x64" = yes
12726then
12727
12728$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12729
12730fi
12731
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012732# **************************************************
12733# * Check for various properties of floating point *
12734# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012735
Matthias Kloseb9621712010-04-24 17:59:49 +000012736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12737$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012738if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012739 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012740else
12741
Matthias Kloseb9621712010-04-24 17:59:49 +000012742if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012743 ac_cv_little_endian_double=no
12744else
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012746/* end confdefs.h. */
12747
12748#include <string.h>
12749int main() {
12750 double x = 9006104071832581.0;
12751 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12752 return 0;
12753 else
12754 return 1;
12755}
12756
12757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012758if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012759 ac_cv_little_endian_double=yes
12760else
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012762fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12764 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012765fi
12766
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012767fi
12768
Matthias Kloseb9621712010-04-24 17:59:49 +000012769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12770$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012771if test "$ac_cv_little_endian_double" = yes
12772then
12773
Matthias Kloseb9621712010-04-24 17:59:49 +000012774$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012775
12776fi
12777
Matthias Kloseb9621712010-04-24 17:59:49 +000012778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12779$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012780if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012782else
12783
Matthias Kloseb9621712010-04-24 17:59:49 +000012784if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012785 ac_cv_big_endian_double=no
12786else
Matthias Kloseb9621712010-04-24 17:59:49 +000012787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012788/* end confdefs.h. */
12789
12790#include <string.h>
12791int main() {
12792 double x = 9006104071832581.0;
12793 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12794 return 0;
12795 else
12796 return 1;
12797}
12798
12799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012800if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012801 ac_cv_big_endian_double=yes
12802else
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12806 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012807fi
12808
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012809fi
12810
Matthias Kloseb9621712010-04-24 17:59:49 +000012811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12812$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012813if test "$ac_cv_big_endian_double" = yes
12814then
12815
Matthias Kloseb9621712010-04-24 17:59:49 +000012816$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012817
12818fi
12819
12820# Some ARM platforms use a mixed-endian representation for doubles.
12821# While Python doesn't currently have full support for these platforms
12822# (see e.g., issue 1762561), we can at least make sure that float <-> string
12823# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12825$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012826if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012827 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012828else
12829
Matthias Kloseb9621712010-04-24 17:59:49 +000012830if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012831 ac_cv_mixed_endian_double=no
12832else
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012834/* end confdefs.h. */
12835
12836#include <string.h>
12837int main() {
12838 double x = 9006104071832581.0;
12839 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12840 return 0;
12841 else
12842 return 1;
12843}
12844
12845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012846if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012847 ac_cv_mixed_endian_double=yes
12848else
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12852 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012853fi
12854
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012855fi
12856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12858$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012859if test "$ac_cv_mixed_endian_double" = yes
12860then
12861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012863
12864fi
12865
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012866# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012867# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012868# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012869# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012870# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012871# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012872
12873# This inline assembler syntax may also work for suncc and icc,
12874# so we try it on all platforms.
12875
Matthias Kloseb9621712010-04-24 17:59:49 +000012876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12877$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012879/* end confdefs.h. */
12880
12881int
12882main ()
12883{
12884
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012885 unsigned short cw;
12886 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12887 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012888
12889 ;
12890 return 0;
12891}
12892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012893if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012894 have_gcc_asm_for_x87=yes
12895else
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012897fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12900$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012901if test "$have_gcc_asm_for_x87" = yes
12902then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012903
Matthias Kloseb9621712010-04-24 17:59:49 +000012904$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012905
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012906fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012907
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012908# Detect whether system arithmetic is subject to x87-style double
12909# rounding issues. The result of this test has little meaning on non
12910# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12911# mode is round-to-nearest and double rounding issues are present, and
12912# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12914$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012915# $BASECFLAGS may affect the result
12916ac_save_cc="$CC"
12917CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012918if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012919 ac_cv_x87_double_rounding=no
12920else
Matthias Kloseb9621712010-04-24 17:59:49 +000012921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012922/* end confdefs.h. */
12923
12924#include <stdlib.h>
12925#include <math.h>
12926int main() {
12927 volatile double x, y, z;
12928 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12929 x = 0.99999999999999989; /* 1-2**-53 */
12930 y = 1./x;
12931 if (y != 1.)
12932 exit(0);
12933 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12934 x = 1e16;
12935 y = 2.99999;
12936 z = x + y;
12937 if (z != 1e16+4.)
12938 exit(0);
12939 /* both tests show evidence of double rounding */
12940 exit(1);
12941}
12942
12943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012944if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012945 ac_cv_x87_double_rounding=no
12946else
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012949rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12950 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012951fi
12952
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012953CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12955$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012956if test "$ac_cv_x87_double_rounding" = yes
12957then
12958
Matthias Kloseb9621712010-04-24 17:59:49 +000012959$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012960
12961fi
12962
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012963# ************************************
12964# * Check for mathematical functions *
12965# ************************************
12966
12967LIBS_SAVE=$LIBS
12968LIBS="$LIBS $LIBM"
12969
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012970for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
12971do :
12972 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12973ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012974if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012975 cat >>confdefs.h <<_ACEOF
12976#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12977_ACEOF
12978
12979fi
12980done
12981
Victor Stinner8f9f8d62011-05-09 12:45:41 +020012982for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012983do :
12984 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12985ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012986if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012987 cat >>confdefs.h <<_ACEOF
12988#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12989_ACEOF
12990
12991fi
12992done
12993
12994ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
12995"
Victor Stinnere0be4232011-10-25 13:06:09 +020012996if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000012997 ac_have_decl=1
12998else
12999 ac_have_decl=0
13000fi
13001
13002cat >>confdefs.h <<_ACEOF
13003#define HAVE_DECL_ISINF $ac_have_decl
13004_ACEOF
13005ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13006"
Victor Stinnere0be4232011-10-25 13:06:09 +020013007if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013008 ac_have_decl=1
13009else
13010 ac_have_decl=0
13011fi
13012
13013cat >>confdefs.h <<_ACEOF
13014#define HAVE_DECL_ISNAN $ac_have_decl
13015_ACEOF
13016ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13017"
Victor Stinnere0be4232011-10-25 13:06:09 +020013018if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013019 ac_have_decl=1
13020else
13021 ac_have_decl=0
13022fi
13023
13024cat >>confdefs.h <<_ACEOF
13025#define HAVE_DECL_ISFINITE $ac_have_decl
13026_ACEOF
13027
13028
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013029# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13030# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13032$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013033if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013035else
13036
Matthias Kloseb9621712010-04-24 17:59:49 +000013037if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013038 ac_cv_tanh_preserves_zero_sign=no
13039else
Matthias Kloseb9621712010-04-24 17:59:49 +000013040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013041/* end confdefs.h. */
13042
13043#include <math.h>
13044#include <stdlib.h>
13045int main() {
13046 /* return 0 if either negative zeros don't exist
13047 on this platform or if negative zeros exist
13048 and tanh(-0.) == -0. */
13049 if (atan2(0., -1.) == atan2(-0., -1.) ||
13050 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13051 else exit(1);
13052}
13053
13054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013055if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013056 ac_cv_tanh_preserves_zero_sign=yes
13057else
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13061 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013062fi
13063
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013064fi
13065
Matthias Kloseb9621712010-04-24 17:59:49 +000013066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13067$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013068if test "$ac_cv_tanh_preserves_zero_sign" = yes
13069then
13070
Matthias Kloseb9621712010-04-24 17:59:49 +000013071$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013072
13073fi
13074
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013075if test "$ac_cv_func_log1p" = yes
13076then
13077 # On some versions of AIX, log1p(-0.) returns 0. instead of
13078 # -0. See issue #9920.
13079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13080$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013081 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013082 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013083else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013084
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013085 if test "$cross_compiling" = yes; then :
13086 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013087else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13089/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013090
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013091 #include <math.h>
13092 #include <stdlib.h>
13093 int main() {
13094 /* Fail if the signs of log1p(-0.) and -0. can be
13095 distinguished. */
13096 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13097 return 0;
13098 else
13099 return 1;
13100 }
13101
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013102_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013103if ac_fn_c_try_run "$LINENO"; then :
13104 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013105else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013106 ac_cv_log1p_drops_zero_sign=yes
13107fi
13108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13109 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013110fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013111
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013112fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013113
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13115$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13116fi
13117if test "$ac_cv_log1p_drops_zero_sign" = yes
13118then
13119
13120$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13121
13122fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013123
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013124LIBS=$LIBS_SAVE
13125
Mark Dickinsona614f042009-11-28 12:48:43 +000013126# For multiprocessing module, check that sem_open
13127# actually works. For FreeBSD versions <= 7.2,
13128# the kernel module that provides POSIX semaphores
13129# isn't loaded by default, so an attempt to call
13130# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13132$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013133if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013134 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013135else
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013137 ac_cv_posix_semaphores_enabled=yes
13138else
Matthias Kloseb9621712010-04-24 17:59:49 +000013139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013140/* end confdefs.h. */
13141
13142#include <unistd.h>
13143#include <fcntl.h>
13144#include <stdio.h>
13145#include <semaphore.h>
13146#include <sys/stat.h>
13147
13148int main(void) {
13149 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13150 if (a == SEM_FAILED) {
13151 perror("sem_open");
13152 return 1;
13153 }
13154 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013155 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013156 return 0;
13157}
13158
13159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013160if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013161 ac_cv_posix_semaphores_enabled=yes
13162else
Matthias Kloseb9621712010-04-24 17:59:49 +000013163 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13166 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013167fi
13168
13169
Mark Dickinsona614f042009-11-28 12:48:43 +000013170fi
13171
Matthias Kloseb9621712010-04-24 17:59:49 +000013172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13173$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013174if test $ac_cv_posix_semaphores_enabled = no
13175then
13176
Matthias Kloseb9621712010-04-24 17:59:49 +000013177$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013178
13179fi
13180
Mark Dickinson10683072009-04-18 21:18:19 +000013181# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13183$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013184if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013186else
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013188 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013189else
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013191/* end confdefs.h. */
13192
13193#include <unistd.h>
13194#include <fcntl.h>
13195#include <stdio.h>
13196#include <semaphore.h>
13197#include <sys/stat.h>
13198
13199int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013200 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013201 int count;
13202 int res;
13203 if(a==SEM_FAILED){
13204 perror("sem_open");
13205 return 1;
13206
13207 }
13208 res = sem_getvalue(a, &count);
13209 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013210 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013211 return res==-1 ? 1 : 0;
13212}
13213
Mark Dickinson10683072009-04-18 21:18:19 +000013214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013215if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013216 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013217else
Matthias Kloseb9621712010-04-24 17:59:49 +000013218 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13221 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013222fi
13223
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013224
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013225fi
13226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13228$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013229if test $ac_cv_broken_sem_getvalue = yes
13230then
13231
Matthias Kloseb9621712010-04-24 17:59:49 +000013232$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013233
13234fi
13235
Mark Dickinsonbd792642009-03-18 20:06:12 +000013236# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13238$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013239# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013240if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013241 enableval=$enable_big_digits; case $enable_big_digits in
13242yes)
13243 enable_big_digits=30 ;;
13244no)
13245 enable_big_digits=15 ;;
1324615|30)
13247 ;;
13248*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013249 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 +000013250esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13252$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013253
13254cat >>confdefs.h <<_ACEOF
13255#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13256_ACEOF
13257
13258
13259else
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13261$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013262fi
13263
13264
Guido van Rossumef2255b2000-03-10 22:30:29 +000013265# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013266ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013267if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013268
13269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013271
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013272 wchar_h="yes"
13273
Guido van Rossumef2255b2000-03-10 22:30:29 +000013274else
Martin v. Löwis11437992002-04-12 09:54:03 +000013275 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013276
13277fi
13278
Michael W. Hudson54241132001-12-07 15:38:26 +000013279
Martin v. Löwis11437992002-04-12 09:54:03 +000013280
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013281# determine wchar_t size
13282if test "$wchar_h" = yes
13283then
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013285# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13286# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13287# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13289$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013290if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013292else
Matthias Kloseb9621712010-04-24 17:59:49 +000013293 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13294"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013295
Martin v. Löwis11437992002-04-12 09:54:03 +000013296else
Matthias Kloseb9621712010-04-24 17:59:49 +000013297 if test "$ac_cv_type_wchar_t" = yes; then
13298 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13299$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013300as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013301See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013302 else
13303 ac_cv_sizeof_wchar_t=0
13304 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013306
Martin v. Löwis11437992002-04-12 09:54:03 +000013307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13309$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013310
13311
13312
Martin v. Löwis11437992002-04-12 09:54:03 +000013313cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013314#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013315_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013316
Michael W. Hudson54241132001-12-07 15:38:26 +000013317
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013318fi
13319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13321$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013322have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013324/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013325
13326#include <tcl.h>
13327#if TCL_UTF_MAX != 6
13328# error "NOT UCS4_TCL"
13329#endif
13330int
13331main ()
13332{
13333
13334 ;
13335 return 0;
13336}
13337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013339
13340
Matthias Kloseb9621712010-04-24 17:59:49 +000013341$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013342
13343 have_ucs4_tcl=yes
13344
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13348$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013349
Skip Montanaro6dead952003-09-25 14:50:04 +000013350# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013351if test "$wchar_h" = yes
13352then
13353 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13355$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013356 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013358else
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013361 ac_cv_wchar_t_signed=yes
13362else
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013364/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013365
13366 #include <wchar.h>
13367 int main()
13368 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013369 /* Success: exit code 0 */
13370 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013371 }
13372
13373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013374if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013375 ac_cv_wchar_t_signed=yes
13376else
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13380 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013381fi
13382
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013383fi
13384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13386$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387fi
13388
Georg Brandl52d168a2008-01-07 18:10:24 +000013389# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013390if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013391 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013392then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013393 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013396
Georg Brandl52d168a2008-01-07 18:10:24 +000013397else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013398 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013399fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13401$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013402
13403# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13405$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013406if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013407 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013408else
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 ac_cv_c_bigendian=unknown
13410 # See if we're dealing with a universal compiler.
13411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13412/* end confdefs.h. */
13413#ifndef __APPLE_CC__
13414 not a universal capable compiler
13415 #endif
13416 typedef int dummy;
13417
Skip Montanaro6dead952003-09-25 14:50:04 +000013418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013419if ac_fn_c_try_compile "$LINENO"; then :
13420
13421 # Check for potential -arch flags. It is not universal unless
13422 # there are at least two -arch flags with different values.
13423 ac_arch=
13424 ac_prev=
13425 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13426 if test -n "$ac_prev"; then
13427 case $ac_word in
13428 i?86 | x86_64 | ppc | ppc64)
13429 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13430 ac_arch=$ac_word
13431 else
13432 ac_cv_c_bigendian=universal
13433 break
13434 fi
13435 ;;
13436 esac
13437 ac_prev=
13438 elif test "x$ac_word" = "x-arch"; then
13439 ac_prev=arch
13440 fi
13441 done
13442fi
13443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13444 if test $ac_cv_c_bigendian = unknown; then
13445 # See if sys/param.h defines the BYTE_ORDER macro.
13446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013447/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013448#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013450
Martin v. Löwis11437992002-04-12 09:54:03 +000013451int
13452main ()
13453{
Matthias Kloseb9621712010-04-24 17:59:49 +000013454#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13455 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13456 && LITTLE_ENDIAN)
13457 bogus endian macros
13458 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013459
13460 ;
13461 return 0;
13462}
13463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013464if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013465 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013467/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013468#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013470
Martin v. Löwis11437992002-04-12 09:54:03 +000013471int
13472main ()
13473{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013474#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 not big endian
13476 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013477
13478 ;
13479 return 0;
13480}
13481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013482if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013483 ac_cv_c_bigendian=yes
13484else
Matthias Kloseb9621712010-04-24 17:59:49 +000013485 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013488fi
13489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13490 fi
13491 if test $ac_cv_c_bigendian = unknown; then
13492 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013494/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013495#include <limits.h>
13496
Martin v. Löwis11437992002-04-12 09:54:03 +000013497int
13498main ()
13499{
Matthias Kloseb9621712010-04-24 17:59:49 +000013500#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13501 bogus endian macros
13502 #endif
13503
Martin v. Löwis11437992002-04-12 09:54:03 +000013504 ;
13505 return 0;
13506}
13507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013508if ac_fn_c_try_compile "$LINENO"; then :
13509 # It does; now see whether it defined to _BIG_ENDIAN or not.
13510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13511/* end confdefs.h. */
13512#include <limits.h>
13513
13514int
13515main ()
13516{
13517#ifndef _BIG_ENDIAN
13518 not big endian
13519 #endif
13520
13521 ;
13522 return 0;
13523}
13524_ACEOF
13525if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013527else
Matthias Kloseb9621712010-04-24 17:59:49 +000013528 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13531fi
13532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13533 fi
13534 if test $ac_cv_c_bigendian = unknown; then
13535 # Compile a test program.
13536 if test "$cross_compiling" = yes; then :
13537 # Try to guess by grepping values from an object file.
13538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13539/* end confdefs.h. */
13540short int ascii_mm[] =
13541 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13542 short int ascii_ii[] =
13543 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13544 int use_ascii (int i) {
13545 return ascii_mm[i] + ascii_ii[i];
13546 }
13547 short int ebcdic_ii[] =
13548 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13549 short int ebcdic_mm[] =
13550 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13551 int use_ebcdic (int i) {
13552 return ebcdic_mm[i] + ebcdic_ii[i];
13553 }
13554 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556int
13557main ()
13558{
13559return use_ascii (foo) == use_ebcdic (foo);
13560 ;
13561 return 0;
13562}
13563_ACEOF
13564if ac_fn_c_try_compile "$LINENO"; then :
13565 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13566 ac_cv_c_bigendian=yes
13567 fi
13568 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13569 if test "$ac_cv_c_bigendian" = unknown; then
13570 ac_cv_c_bigendian=no
13571 else
13572 # finding both strings is unlikely to happen, but who knows?
13573 ac_cv_c_bigendian=unknown
13574 fi
13575 fi
13576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013578else
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013580/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013582int
13583main ()
13584{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 /* Are we little or big endian? From Harbison&Steele. */
13587 union
13588 {
13589 long int l;
13590 char c[sizeof (long int)];
13591 } u;
13592 u.l = 1;
13593 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013594
13595 ;
13596 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013597}
Martin v. Löwis11437992002-04-12 09:54:03 +000013598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013599if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013600 ac_cv_c_bigendian=no
13601else
Matthias Kloseb9621712010-04-24 17:59:49 +000013602 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13605 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013607
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13611$as_echo "$ac_cv_c_bigendian" >&6; }
13612 case $ac_cv_c_bigendian in #(
13613 yes)
13614 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13615;; #(
13616 no)
13617 ;; #(
13618 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 ;; #(
13623 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013624 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013625 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013626 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013627
Michael W. Hudson54241132001-12-07 15:38:26 +000013628
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013629# ABI version string for Python extension modules. This appears between the
13630# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13631# from the following attributes which affect the ABI of this Python build (in
13632# this order):
13633#
13634# * The Python implementation (always 'cpython-' for us)
13635# * The major and minor version numbers
13636# * --with-pydebug (adds a 'd')
13637# * --with-pymalloc (adds a 'm')
13638# * --with-wide-unicode (adds a 'u')
13639#
13640# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013641# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13642# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013643
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13645$as_echo_n "checking ABIFLAGS... " >&6; }
13646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13647$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13649$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013650SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13652$as_echo "$SOABI" >&6; }
13653
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13655$as_echo_n "checking LDVERSION... " >&6; }
13656LDVERSION='$(VERSION)$(ABIFLAGS)'
13657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13658$as_echo "$LDVERSION" >&6; }
13659
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013660# SO is the extension of shared libraries `(including the dot!)
13661# -- usually .so, .sl on HP-UX, .dll on Cygwin
13662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13663$as_echo_n "checking SO... " >&6; }
13664if test -z "$SO"
13665then
13666 case $ac_sys_system in
13667 hp*|HP*)
13668 case `uname -m` in
13669 ia64) SO=.so;;
13670 *) SO=.sl;;
13671 esac
13672 ;;
13673 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013674 Linux*|GNU*)
13675 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013676 *) SO=.so;;
13677 esac
13678else
13679 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013680 echo
13681 echo '====================================================================='
13682 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013683 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013684 echo '+ Do you really mean to change the extension for shared libraries? +'
13685 echo '+ Continuing in 10 seconds to let you to ponder. +'
13686 echo '+ +'
13687 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013688 sleep 10
13689fi
13690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13691$as_echo "$SO" >&6; }
13692
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013693# Check whether right shifting a negative integer extends the sign bit
13694# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13696$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013697if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013699else
Martin v. Löwis11437992002-04-12 09:54:03 +000013700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013702 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013703else
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013705/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013706
13707int main()
13708{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013709 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013710}
13711
Martin v. Löwis11437992002-04-12 09:54:03 +000013712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013713if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013714 ac_cv_rshift_extends_sign=yes
13715else
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13719 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013720fi
13721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013722fi
13723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13725$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013726if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013727then
Martin v. Löwis11437992002-04-12 09:54:03 +000013728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013730
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013731fi
13732
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013733# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13735$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013736if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013738else
Martin v. Löwis11437992002-04-12 09:54:03 +000013739
Matthias Kloseb9621712010-04-24 17:59:49 +000013740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013741/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013742#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013743int
13744main ()
13745{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013746
13747 FILE *f = fopen("/dev/null", "r");
13748 flockfile(f);
13749 getc_unlocked(f);
13750 funlockfile(f);
13751
Martin v. Löwis11437992002-04-12 09:54:03 +000013752 ;
13753 return 0;
13754}
13755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013756if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013757 ac_cv_have_getc_unlocked=yes
13758else
Matthias Kloseb9621712010-04-24 17:59:49 +000013759 ac_cv_have_getc_unlocked=no
13760fi
13761rm -f core conftest.err conftest.$ac_objext \
13762 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764
Matthias Kloseb9621712010-04-24 17:59:49 +000013765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13766$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013767if test "$ac_cv_have_getc_unlocked" = yes
13768then
Martin v. Löwis11437992002-04-12 09:54:03 +000013769
Matthias Kloseb9621712010-04-24 17:59:49 +000013770$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013771
13772fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013773
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013774# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013775# save the value of LIBS so we don't actually link Python with readline
13776LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013777
Gregory P. Smith18820942008-09-07 06:24:49 +000013778# On some systems we need to link readline to a termcap compatible
13779# library. NOTE: Keep the precedence of listed libraries synchronised
13780# with setup.py.
13781py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13783$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013784for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013785 if test -z "$py_libtermcap"; then
13786 READLINE_LIBS="-lreadline"
13787 else
13788 READLINE_LIBS="-lreadline -l$py_libtermcap"
13789 fi
13790 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013792/* end confdefs.h. */
13793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013794/* Override any GCC internal prototype to avoid an error.
13795 Use char because int might match the return type of a GCC
13796 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013797#ifdef __cplusplus
13798extern "C"
13799#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013800char readline ();
13801int
13802main ()
13803{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013805 ;
13806 return 0;
13807}
13808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013809if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013810 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013812rm -f core conftest.err conftest.$ac_objext \
13813 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013814 if test $py_cv_lib_readline = yes; then
13815 break
13816 fi
13817done
13818# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13819#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013820if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13822$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013823else
Matthias Kloseb9621712010-04-24 17:59:49 +000013824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13825$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013826
Matthias Kloseb9621712010-04-24 17:59:49 +000013827$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013828
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013829fi
13830
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013831# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13833$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013834if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013835 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013836else
13837 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013838LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013840/* end confdefs.h. */
13841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013842/* Override any GCC internal prototype to avoid an error.
13843 Use char because int might match the return type of a GCC
13844 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013845#ifdef __cplusplus
13846extern "C"
13847#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013848char rl_callback_handler_install ();
13849int
13850main ()
13851{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013852return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013853 ;
13854 return 0;
13855}
13856_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013857if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013858 ac_cv_lib_readline_rl_callback_handler_install=yes
13859else
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013862rm -f core conftest.err conftest.$ac_objext \
13863 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013864LIBS=$ac_check_lib_save_LIBS
13865fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13867$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013868if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013869
Matthias Kloseb9621712010-04-24 17:59:49 +000013870$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013871
13872fi
13873
13874
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013875# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013877/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013878#include <readline/readline.h>
13879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013880if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013881 have_readline=yes
13882else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013883 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013884
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013885fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013886rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013887if test $have_readline = yes
13888then
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013890/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013891#include <readline/readline.h>
13892
13893_ACEOF
13894if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013895 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013896
Matthias Kloseb9621712010-04-24 17:59:49 +000013897$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013898
13899fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013900rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013903/* end confdefs.h. */
13904#include <readline/readline.h>
13905
13906_ACEOF
13907if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013909
Matthias Kloseb9621712010-04-24 17:59:49 +000013910$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013911
13912fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013913rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013914
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013915fi
13916
Martin v. Löwis0daad592001-09-30 21:09:59 +000013917# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13919$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013920if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013922else
Martin v. Löwis11437992002-04-12 09:54:03 +000013923 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013924LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013928/* Override any GCC internal prototype to avoid an error.
13929 Use char because int might match the return type of a GCC
13930 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013931#ifdef __cplusplus
13932extern "C"
13933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013934char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013935int
13936main ()
13937{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013938return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013939 ;
13940 return 0;
13941}
13942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013943if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013944 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013945else
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013948rm -f core conftest.err conftest.$ac_objext \
13949 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013950LIBS=$ac_check_lib_save_LIBS
13951fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13953$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013954if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013955
Matthias Kloseb9621712010-04-24 17:59:49 +000013956$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013957
Martin v. Löwis0daad592001-09-30 21:09:59 +000013958fi
13959
Michael W. Hudson54241132001-12-07 15:38:26 +000013960
Thomas Wouters89d996e2007-09-08 17:39:28 +000013961# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13963$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013964if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013966else
13967 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013968LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013970/* end confdefs.h. */
13971
13972/* Override any GCC internal prototype to avoid an error.
13973 Use char because int might match the return type of a GCC
13974 builtin and then its argument prototype would still apply. */
13975#ifdef __cplusplus
13976extern "C"
13977#endif
13978char rl_completion_display_matches_hook ();
13979int
13980main ()
13981{
13982return rl_completion_display_matches_hook ();
13983 ;
13984 return 0;
13985}
13986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013987if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013988 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13989else
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000013991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013992rm -f core conftest.err conftest.$ac_objext \
13993 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013994LIBS=$ac_check_lib_save_LIBS
13995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13997$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013998if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000013999
Matthias Kloseb9621712010-04-24 17:59:49 +000014000$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014001
14002fi
14003
14004
Martin v. Löwis0daad592001-09-30 21:09:59 +000014005# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14007$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014008if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014010else
Martin v. Löwis11437992002-04-12 09:54:03 +000014011 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014012LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014016/* Override any GCC internal prototype to avoid an error.
14017 Use char because int might match the return type of a GCC
14018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014019#ifdef __cplusplus
14020extern "C"
14021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014022char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014023int
14024main ()
14025{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014026return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014027 ;
14028 return 0;
14029}
14030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014031if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014032 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014033else
Matthias Kloseb9621712010-04-24 17:59:49 +000014034 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014036rm -f core conftest.err conftest.$ac_objext \
14037 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014038LIBS=$ac_check_lib_save_LIBS
14039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14041$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014042if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014043
Matthias Kloseb9621712010-04-24 17:59:49 +000014044$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014045
Guido van Rossum353ae582001-07-10 16:45:32 +000014046fi
14047
Jack Jansendd19cf82001-12-06 22:36:17 +000014048
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014049# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014051/* end confdefs.h. */
14052#include <readline/readline.h>
14053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014054if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014055 have_readline=yes
14056else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014057 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014058
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014059fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014060rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014061if test $have_readline = yes
14062then
Matthias Kloseb9621712010-04-24 17:59:49 +000014063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014064/* end confdefs.h. */
14065#include <readline/readline.h>
14066
14067_ACEOF
14068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014069 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014070
Matthias Kloseb9621712010-04-24 17:59:49 +000014071$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014072
14073fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014074rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014075
14076fi
14077
Martin v. Löwis82bca632006-02-10 20:49:30 +000014078# End of readline checks: restore LIBS
14079LIBS=$LIBS_no_readline
14080
Matthias Kloseb9621712010-04-24 17:59:49 +000014081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14082$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014083if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014085else
Martin v. Löwis11437992002-04-12 09:54:03 +000014086
Matthias Kloseb9621712010-04-24 17:59:49 +000014087if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014088 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014089else
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014091/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014092
14093int main()
14094{
14095 int val1 = nice(1);
14096 if (val1 != -1 && val1 == nice(2))
14097 exit(0);
14098 exit(1);
14099}
14100
Martin v. Löwis11437992002-04-12 09:54:03 +000014101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014102if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014103 ac_cv_broken_nice=yes
14104else
Matthias Kloseb9621712010-04-24 17:59:49 +000014105 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14108 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014109fi
14110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111fi
14112
Matthias Kloseb9621712010-04-24 17:59:49 +000014113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14114$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014115if test "$ac_cv_broken_nice" = yes
14116then
Martin v. Löwis11437992002-04-12 09:54:03 +000014117
Matthias Kloseb9621712010-04-24 17:59:49 +000014118$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014119
14120fi
14121
Matthias Kloseb9621712010-04-24 17:59:49 +000014122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14123$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014124if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014125 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014126else
Matthias Kloseb9621712010-04-24 17:59:49 +000014127 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014128 ac_cv_broken_poll=no
14129else
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014131/* end confdefs.h. */
14132
14133#include <poll.h>
14134
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014135int main()
14136{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014137 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014138 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014139
14140 close (42);
14141
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014142 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014143 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014144 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014145 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014146 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014147 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014148 return 1;
14149}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014150
14151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014152if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014153 ac_cv_broken_poll=yes
14154else
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14158 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014160
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014161fi
14162
Matthias Kloseb9621712010-04-24 17:59:49 +000014163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14164$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014165if test "$ac_cv_broken_poll" = yes
14166then
14167
Matthias Kloseb9621712010-04-24 17:59:49 +000014168$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014169
14170fi
14171
Brett Cannon43802422005-02-10 20:48:03 +000014172# 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 +000014173# (which is not required by ISO C or UNIX spec) and/or if we support
14174# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014175ac_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 +000014176#include <$ac_cv_struct_tm>
14177
Matthias Kloseb9621712010-04-24 17:59:49 +000014178"
Victor Stinnere0be4232011-10-25 13:06:09 +020014179if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014180
14181cat >>confdefs.h <<_ACEOF
14182#define HAVE_STRUCT_TM_TM_ZONE 1
14183_ACEOF
14184
14185
14186fi
14187
14188if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14189
Matthias Kloseb9621712010-04-24 17:59:49 +000014190$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014191
14192else
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14194"
Victor Stinnere0be4232011-10-25 13:06:09 +020014195if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014197else
Matthias Kloseb9621712010-04-24 17:59:49 +000014198 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199fi
14200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014201cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014202#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014203_ACEOF
14204
Matthias Kloseb9621712010-04-24 17:59:49 +000014205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14206$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014207if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014208 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014209else
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014211/* end confdefs.h. */
14212#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014213#if !HAVE_DECL_TZNAME
14214extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014215#endif
14216
14217int
14218main ()
14219{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014220return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014221 ;
14222 return 0;
14223}
14224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014225if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014226 ac_cv_var_tzname=yes
14227else
Matthias Kloseb9621712010-04-24 17:59:49 +000014228 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014230rm -f core conftest.err conftest.$ac_objext \
14231 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14234$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014235 if test $ac_cv_var_tzname = yes; then
14236
Matthias Kloseb9621712010-04-24 17:59:49 +000014237$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014238
14239 fi
14240fi
14241
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014242
Martin v. Löwis1d459062005-03-14 21:23:33 +000014243# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14245$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014246if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014247 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014248else
14249
Matthias Kloseb9621712010-04-24 17:59:49 +000014250if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014251 ac_cv_working_tzset=no
14252else
Matthias Kloseb9621712010-04-24 17:59:49 +000014253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014254/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014255
14256#include <stdlib.h>
14257#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014258#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014259
14260#if HAVE_TZNAME
14261extern char *tzname[];
14262#endif
14263
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014264int main()
14265{
Brett Cannon18367812003-09-19 00:59:16 +000014266 /* Note that we need to ensure that not only does tzset(3)
14267 do 'something' with localtime, but it works as documented
14268 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014269 This includes making sure that tzname is set properly if
14270 tm->tm_zone does not exist since it is the alternative way
14271 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014272
14273 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014274 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014275 */
14276
Martin v. Löwis1d459062005-03-14 21:23:33 +000014277 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014278 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14279
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014280 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014281 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014282 if (localtime(&groundhogday)->tm_hour != 0)
14283 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014284#if HAVE_TZNAME
14285 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14286 if (strcmp(tzname[0], "UTC") ||
14287 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14288 exit(1);
14289#endif
Brett Cannon18367812003-09-19 00:59:16 +000014290
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014291 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014292 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014293 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014294 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014295#if HAVE_TZNAME
14296 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14297 exit(1);
14298#endif
Brett Cannon18367812003-09-19 00:59:16 +000014299
14300 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14301 tzset();
14302 if (localtime(&groundhogday)->tm_hour != 11)
14303 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014304#if HAVE_TZNAME
14305 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14306 exit(1);
14307#endif
14308
14309#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014310 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14311 exit(1);
14312 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14313 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014314#endif
Brett Cannon18367812003-09-19 00:59:16 +000014315
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014316 exit(0);
14317}
14318
14319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014320if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014321 ac_cv_working_tzset=yes
14322else
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14326 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014327fi
14328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329fi
14330
Matthias Kloseb9621712010-04-24 17:59:49 +000014331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14332$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014333if test "$ac_cv_working_tzset" = yes
14334then
14335
Matthias Kloseb9621712010-04-24 17:59:49 +000014336$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014337
14338fi
14339
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014340# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14342$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014343if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014345else
Matthias Kloseb9621712010-04-24 17:59:49 +000014346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014347/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014348#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014349int
14350main ()
14351{
14352
14353struct stat st;
14354st.st_mtim.tv_nsec = 1;
14355
14356 ;
14357 return 0;
14358}
14359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014361 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014362else
Matthias Kloseb9621712010-04-24 17:59:49 +000014363 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14366fi
14367
Matthias Kloseb9621712010-04-24 17:59:49 +000014368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14369$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014370if test "$ac_cv_stat_tv_nsec" = yes
14371then
14372
Matthias Kloseb9621712010-04-24 17:59:49 +000014373$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014374
14375fi
14376
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014377# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14379$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014380if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014382else
Matthias Kloseb9621712010-04-24 17:59:49 +000014383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014384/* end confdefs.h. */
14385#include <sys/stat.h>
14386int
14387main ()
14388{
14389
14390struct stat st;
14391st.st_mtimespec.tv_nsec = 1;
14392
14393 ;
14394 return 0;
14395}
14396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014398 ac_cv_stat_tv_nsec2=yes
14399else
Matthias Kloseb9621712010-04-24 17:59:49 +000014400 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14403fi
14404
Matthias Kloseb9621712010-04-24 17:59:49 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14406$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014407if test "$ac_cv_stat_tv_nsec2" = yes
14408then
14409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014411
14412fi
14413
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014414ac_save_cppflags="$CPPFLAGS"
14415CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014416# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14418$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014419if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014420 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014421else
Matthias Kloseb9621712010-04-24 17:59:49 +000014422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014423/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014424#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014425int
14426main ()
14427{
Jack Jansen666b1e72001-10-31 12:11:48 +000014428
14429 int rtn;
14430 rtn = mvwdelch(0,0,0);
14431
Martin v. Löwis11437992002-04-12 09:54:03 +000014432 ;
14433 return 0;
14434}
14435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014436if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014437 ac_cv_mvwdelch_is_expression=yes
14438else
Matthias Kloseb9621712010-04-24 17:59:49 +000014439 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14442fi
14443
Matthias Kloseb9621712010-04-24 17:59:49 +000014444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14445$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014446
14447if test "$ac_cv_mvwdelch_is_expression" = yes
14448then
Martin v. Löwis11437992002-04-12 09:54:03 +000014449
Matthias Kloseb9621712010-04-24 17:59:49 +000014450$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014451
14452fi
14453
Matthias Kloseb9621712010-04-24 17:59:49 +000014454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14455$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014456if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014458else
Matthias Kloseb9621712010-04-24 17:59:49 +000014459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014460/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014461#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014462int
14463main ()
14464{
Jack Jansen666b1e72001-10-31 12:11:48 +000014465
14466 WINDOW *w;
14467 w->_flags = 0;
14468
Martin v. Löwis11437992002-04-12 09:54:03 +000014469 ;
14470 return 0;
14471}
14472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014473if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014474 ac_cv_window_has_flags=yes
14475else
Matthias Kloseb9621712010-04-24 17:59:49 +000014476 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14479fi
14480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14482$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014483
Jack Jansen666b1e72001-10-31 12:11:48 +000014484
14485if test "$ac_cv_window_has_flags" = yes
14486then
Martin v. Löwis11437992002-04-12 09:54:03 +000014487
Matthias Kloseb9621712010-04-24 17:59:49 +000014488$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014489
14490fi
14491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14493$as_echo_n "checking for is_term_resized... " >&6; }
14494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014495/* end confdefs.h. */
14496#include <curses.h>
14497int
14498main ()
14499{
14500void *x=is_term_resized
14501 ;
14502 return 0;
14503}
14504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014505if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014506
Matthias Kloseb9621712010-04-24 17:59:49 +000014507$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014508
Matthias Kloseb159a552010-04-25 21:00:44 +000014509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014510$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014511else
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14513$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014514
14515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14517
Matthias Kloseb9621712010-04-24 17:59:49 +000014518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14519$as_echo_n "checking for resize_term... " >&6; }
14520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014521/* end confdefs.h. */
14522#include <curses.h>
14523int
14524main ()
14525{
14526void *x=resize_term
14527 ;
14528 return 0;
14529}
14530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014531if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014532
Matthias Kloseb9621712010-04-24 17:59:49 +000014533$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014534
Matthias Kloseb159a552010-04-25 21:00:44 +000014535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014536$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014537else
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14539$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014540
14541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14543
Matthias Kloseb9621712010-04-24 17:59:49 +000014544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14545$as_echo_n "checking for resizeterm... " >&6; }
14546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014547/* end confdefs.h. */
14548#include <curses.h>
14549int
14550main ()
14551{
14552void *x=resizeterm
14553 ;
14554 return 0;
14555}
14556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014557if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014558
Matthias Kloseb9621712010-04-24 17:59:49 +000014559$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014560
Matthias Kloseb159a552010-04-25 21:00:44 +000014561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014562$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014563else
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14565$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014566
14567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014569# last curses configure check
14570CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14573$as_echo "$as_me: checking for device files" >&6;}
14574
14575if test "x$cross_compiling" = xyes; then
14576 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14578$as_echo_n "checking for /dev/ptmx... " >&6; }
14579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14580$as_echo "not set" >&6; }
14581 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14582 fi
14583 if test "${ac_cv_file__dev_ptc+set}" != set; then
14584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14585$as_echo_n "checking for /dev/ptc... " >&6; }
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14587$as_echo "not set" >&6; }
14588 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14589 fi
14590fi
14591
Matthias Kloseb9621712010-04-24 17:59:49 +000014592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14593$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014594if ${ac_cv_file__dev_ptmx+:} false; then :
14595 $as_echo_n "(cached) " >&6
14596else
14597 test "$cross_compiling" = yes &&
14598 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14599if test -r "/dev/ptmx"; then
14600 ac_cv_file__dev_ptmx=yes
14601else
14602 ac_cv_file__dev_ptmx=no
14603fi
14604fi
14605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14606$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14607if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014608
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014609fi
14610
14611if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014612
Matthias Kloseb9621712010-04-24 17:59:49 +000014613$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014614
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14617$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014618if ${ac_cv_file__dev_ptc+:} false; then :
14619 $as_echo_n "(cached) " >&6
14620else
14621 test "$cross_compiling" = yes &&
14622 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14623if test -r "/dev/ptc"; then
14624 ac_cv_file__dev_ptc=yes
14625else
14626 ac_cv_file__dev_ptc=no
14627fi
14628fi
14629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14630$as_echo "$ac_cv_file__dev_ptc" >&6; }
14631if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014632
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014633fi
14634
14635if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014636
Matthias Kloseb9621712010-04-24 17:59:49 +000014637$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014638
Neal Norwitz865400f2003-03-21 01:42:58 +000014639fi
14640
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014641if test "$have_long_long" = yes
14642then
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14644$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014645 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014646 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014647else
Matthias Kloseb9621712010-04-24 17:59:49 +000014648 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014649 ac_cv_have_long_long_format="cross -- assuming no"
14650 if test x$GCC = xyes; then
14651 save_CFLAGS=$CFLAGS
14652 CFLAGS="$CFLAGS -Werror -Wformat"
14653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14654/* end confdefs.h. */
14655
14656 #include <stdio.h>
14657 #include <stddef.h>
14658
14659int
14660main ()
14661{
14662
14663 char *buffer;
14664 sprintf(buffer, "%lld", (long long)123);
14665 sprintf(buffer, "%lld", (long long)-123);
14666 sprintf(buffer, "%llu", (unsigned long long)123);
14667
14668 ;
14669 return 0;
14670}
14671_ACEOF
14672if ac_fn_c_try_compile "$LINENO"; then :
14673 ac_cv_have_long_long_format=yes
14674
14675fi
14676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14677 CFLAGS=$save_CFLAGS
14678 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014679else
Matthias Kloseb9621712010-04-24 17:59:49 +000014680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014681/* end confdefs.h. */
14682
14683 #include <stdio.h>
14684 #include <stddef.h>
14685 #include <string.h>
14686
14687 #ifdef HAVE_SYS_TYPES_H
14688 #include <sys/types.h>
14689 #endif
14690
14691 int main()
14692 {
14693 char buffer[256];
14694
14695 if (sprintf(buffer, "%lld", (long long)123) < 0)
14696 return 1;
14697 if (strcmp(buffer, "123"))
14698 return 1;
14699
14700 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14701 return 1;
14702 if (strcmp(buffer, "-123"))
14703 return 1;
14704
14705 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14706 return 1;
14707 if (strcmp(buffer, "123"))
14708 return 1;
14709
14710 return 0;
14711 }
14712
14713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014714if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014715 ac_cv_have_long_long_format=yes
14716else
Matthias Kloseb9621712010-04-24 17:59:49 +000014717 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14720 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014721fi
14722
14723
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014724fi
14725
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14727$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014728fi
14729
Mark Dickinson89d7d412009-12-31 20:50:59 +000014730if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014731then
14732
Matthias Kloseb9621712010-04-24 17:59:49 +000014733$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014734
14735fi
14736
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014737if test $ac_sys_system = Darwin
14738then
14739 LIBS="$LIBS -framework CoreFoundation"
14740fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014741
Matthias Kloseb9621712010-04-24 17:59:49 +000014742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14743$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014744if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014746else
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014748 ac_cv_have_size_t_format="cross -- assuming yes"
14749
Thomas Wouters477c8d52006-05-27 19:21:47 +000014750else
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014752/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014753
Thomas Wouters477c8d52006-05-27 19:21:47 +000014754#include <stdio.h>
14755#include <stddef.h>
14756#include <string.h>
14757
Christian Heimes2c181612007-12-17 20:04:13 +000014758#ifdef HAVE_SYS_TYPES_H
14759#include <sys/types.h>
14760#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014761
14762#ifdef HAVE_SSIZE_T
14763typedef ssize_t Py_ssize_t;
14764#elif SIZEOF_VOID_P == SIZEOF_LONG
14765typedef long Py_ssize_t;
14766#else
14767typedef int Py_ssize_t;
14768#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014769
Christian Heimes2c181612007-12-17 20:04:13 +000014770int main()
14771{
14772 char buffer[256];
14773
Thomas Wouters477c8d52006-05-27 19:21:47 +000014774 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14775 return 1;
14776
Thomas Wouters89f507f2006-12-13 04:49:30 +000014777 if (strcmp(buffer, "123"))
14778 return 1;
14779
14780 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14781 return 1;
14782
14783 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014784 return 1;
14785
14786 return 0;
14787}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014788
Thomas Wouters477c8d52006-05-27 19:21:47 +000014789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014790if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014791 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014792else
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14796 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014797fi
14798
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14801$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014802if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014803
Matthias Kloseb9621712010-04-24 17:59:49 +000014804$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014805
14806fi
14807
Matthias Kloseb9621712010-04-24 17:59:49 +000014808ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014809#ifdef HAVE_SYS_TYPES_H
14810#include <sys/types.h>
14811#endif
14812#ifdef HAVE_SYS_SOCKET_H
14813#include <sys/socket.h>
14814#endif
14815
Matthias Kloseb9621712010-04-24 17:59:49 +000014816"
Victor Stinnere0be4232011-10-25 13:06:09 +020014817if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014818
Martin v. Löwis11437992002-04-12 09:54:03 +000014819else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014822
14823fi
14824
Michael W. Hudson54241132001-12-07 15:38:26 +000014825
Matthias Kloseb9621712010-04-24 17:59:49 +000014826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14827$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014828if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014830else
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014832 ac_cv_broken_mbstowcs=no
14833else
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014835/* end confdefs.h. */
14836
Stefan Krah19c21392012-11-22 23:47:32 +010014837#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014838#include<stdlib.h>
14839int main() {
14840 size_t len = -1;
14841 const char *str = "text";
14842 len = mbstowcs(NULL, str, 0);
14843 return (len != 4);
14844}
14845
14846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014847if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014848 ac_cv_broken_mbstowcs=no
14849else
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14853 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014854fi
14855
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014856fi
14857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14859$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014860if test "$ac_cv_broken_mbstowcs" = yes
14861then
14862
Matthias Kloseb9621712010-04-24 17:59:49 +000014863$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014864
14865fi
14866
Antoine Pitroub52ec782009-01-25 16:34:23 +000014867# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14869$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014870
14871# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014872if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014873 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014874if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014875then
14876
Matthias Kloseb9621712010-04-24 17:59:49 +000014877$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014878
Matthias Kloseb9621712010-04-24 17:59:49 +000014879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14880$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014881fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014882if test "$withval" = no
14883then
14884
14885$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14886
Matthias Kloseb9621712010-04-24 17:59:49 +000014887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14888$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014889fi
14890
Antoine Pitrou042b1282010-08-13 21:15:58 +000014891else
14892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14893$as_echo "no value specified" >&6; }
14894fi
14895
Antoine Pitroub52ec782009-01-25 16:34:23 +000014896
Matthias Kloseb17289e2012-03-15 19:51:34 +010014897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14898$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14899if ${ac_cv_computed_gotos+:} false; then :
14900 $as_echo_n "(cached) " >&6
14901else
14902 if test "$cross_compiling" = yes; then :
14903 if test "${with_computed_gotos+set}" = set; then
14904 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14905 else
14906 ac_cv_computed_gotos=no
14907 fi
14908else
14909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14910/* end confdefs.h. */
14911
14912int main(int argc, char **argv)
14913{
14914 static void *targets[1] = { &&LABEL1 };
14915 goto LABEL2;
14916LABEL1:
14917 return 0;
14918LABEL2:
14919 goto *targets[0];
14920 return 1;
14921}
14922
14923_ACEOF
14924if ac_fn_c_try_run "$LINENO"; then :
14925 ac_cv_computed_gotos=yes
14926else
14927 ac_cv_computed_gotos=no
14928fi
14929rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14930 conftest.$ac_objext conftest.beam conftest.$ac_ext
14931fi
14932
14933fi
14934
14935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14936$as_echo "$ac_cv_computed_gotos" >&6; }
14937case "$ac_cv_computed_gotos" in yes*)
14938
14939$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14940
14941esac
14942
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014943case $ac_sys_system in
14944AIX*)
14945
14946$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14947 ;;
14948esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014949
Michael W. Hudson54241132001-12-07 15:38:26 +000014950
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014951
14952
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014953for h in `(cd $srcdir;echo Python/thread_*.h)`
14954do
14955 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14956done
14957
Michael W. Hudson54241132001-12-07 15:38:26 +000014958
Neal Norwitzd24499d2005-12-18 21:36:39 +000014959SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14961$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014962for dir in $SRCDIRS; do
14963 if test ! -d $dir; then
14964 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014965 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014966done
Matthias Kloseb9621712010-04-24 17:59:49 +000014967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14968$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014969
Stefan Krah1919b7e2012-03-21 18:25:23 +010014970# Availability of -O2:
14971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
14972$as_echo_n "checking for -O2... " >&6; }
14973saved_cflags="$CFLAGS"
14974CFLAGS="-O2"
14975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14976/* end confdefs.h. */
14977
14978int
14979main ()
14980{
14981
14982
14983 ;
14984 return 0;
14985}
14986_ACEOF
14987if ac_fn_c_try_compile "$LINENO"; then :
14988 have_O2=yes
14989else
14990 have_O2=no
14991fi
14992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
14994$as_echo "$have_O2" >&6; }
14995CFLAGS="$saved_cflags"
14996
14997# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
14998# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
14999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15000$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15001saved_cflags="$CFLAGS"
15002CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15003if test "$have_O2" = no; then
15004 CFLAGS=""
15005fi
15006if test "$cross_compiling" = yes; then :
15007 have_glibc_memmove_bug=undefined
15008else
15009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15010/* end confdefs.h. */
15011
15012#include <stdio.h>
15013#include <stdlib.h>
15014#include <string.h>
15015void foo(void *p, void *q) { memmove(p, q, 19); }
15016int main() {
15017 char a[32] = "123456789000000000";
15018 foo(&a[9], a);
15019 if (strcmp(a, "123456789123456789000000000") != 0)
15020 return 1;
15021 foo(a, &a[9]);
15022 if (strcmp(a, "123456789000000000") != 0)
15023 return 1;
15024 return 0;
15025}
15026
15027_ACEOF
15028if ac_fn_c_try_run "$LINENO"; then :
15029 have_glibc_memmove_bug=no
15030else
15031 have_glibc_memmove_bug=yes
15032fi
15033rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15034 conftest.$ac_objext conftest.beam conftest.$ac_ext
15035fi
15036
15037CFLAGS="$saved_cflags"
15038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15039$as_echo "$have_glibc_memmove_bug" >&6; }
15040if test "$have_glibc_memmove_bug" = yes; then
15041
15042$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15043
15044fi
15045
15046if test "$have_gcc_asm_for_x87" = yes; then
15047 # Some versions of gcc miscompile inline asm:
15048 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15049 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15050 case $CC in
15051 *gcc*)
15052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15053$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15054 saved_cflags="$CFLAGS"
15055 CFLAGS="-O2"
15056 if test "$cross_compiling" = yes; then :
15057 have_ipa_pure_const_bug=undefined
15058else
15059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15060/* end confdefs.h. */
15061
15062 __attribute__((noinline)) int
15063 foo(int *p) {
15064 int r;
15065 asm ( "movl \$6, (%1)\n\t"
15066 "xorl %0, %0\n\t"
15067 : "=r" (r) : "r" (p) : "memory"
15068 );
15069 return r;
15070 }
15071 int main() {
15072 int p = 8;
15073 if ((foo(&p) ? : p) != 6)
15074 return 1;
15075 return 0;
15076 }
15077
15078_ACEOF
15079if ac_fn_c_try_run "$LINENO"; then :
15080 have_ipa_pure_const_bug=no
15081else
15082 have_ipa_pure_const_bug=yes
15083fi
15084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15085 conftest.$ac_objext conftest.beam conftest.$ac_ext
15086fi
15087
15088 CFLAGS="$saved_cflags"
15089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15090$as_echo "$have_ipa_pure_const_bug" >&6; }
15091 if test "$have_ipa_pure_const_bug" = yes; then
15092
15093$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15094
15095 fi
15096 ;;
15097 esac
15098fi
15099
Guido van Rossum627b2d71993-12-24 10:39:16 +000015100# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015101ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015102
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015103ac_config_files="$ac_config_files Modules/ld_so_aix"
15104
Martin v. Löwis11437992002-04-12 09:54:03 +000015105cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015106# This file is a shell script that caches the results of configure
15107# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015108# scripts and configure runs, see configure's option --config-cache.
15109# It is not useful on other systems. If it contains results you don't
15110# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015111#
Martin v. Löwis11437992002-04-12 09:54:03 +000015112# config.status only pays attention to the cache file if you give it
15113# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015114#
Skip Montanaro6dead952003-09-25 14:50:04 +000015115# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015116# loading this file, other *unset* `ac_cv_foo' will be assigned the
15117# following values.
15118
15119_ACEOF
15120
Guido van Rossumf78abae1997-01-21 22:02:36 +000015121# The following way of writing the cache mishandles newlines in values,
15122# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015124# Ultrix sh set writes to stderr and can't be redirected directly,
15125# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126(
15127 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15128 eval ac_val=\$$ac_var
15129 case $ac_val in #(
15130 *${as_nl}*)
15131 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015132 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15133$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015134 esac
15135 case $ac_var in #(
15136 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015137 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15138 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015139 esac ;;
15140 esac
15141 done
15142
Martin v. Löwis11437992002-04-12 09:54:03 +000015143 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15145 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 # `set' does not quote correctly, so add quotes: double-quote
15147 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015148 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015149 "s/'/'\\\\''/g;
15150 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015151 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 *)
15153 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015155 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156 esac |
15157 sort
15158) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015159 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015160 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015161 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15164 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015165 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15166 :end' >>confcache
15167if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15168 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015169 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15171$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015172 if test ! -f "$cache_file" || test -h "$cache_file"; then
15173 cat confcache >"$cache_file"
15174 else
15175 case $cache_file in #(
15176 */* | ?:*)
15177 mv -f confcache "$cache_file"$$ &&
15178 mv -f "$cache_file"$$ "$cache_file" ;; #(
15179 *)
15180 mv -f confcache "$cache_file" ;;
15181 esac
15182 fi
15183 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015184 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15186$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015187 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015188fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015189rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015190
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015191test "x$prefix" = xNONE && prefix=$ac_default_prefix
15192# Let make expand exec_prefix.
15193test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015194
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015195DEFS=-DHAVE_CONFIG_H
15196
Skip Montanaro6dead952003-09-25 14:50:04 +000015197ac_libobjs=
15198ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015199U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015200for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15201 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015203 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15205 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015206 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15207 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015208done
15209LIBOBJS=$ac_libobjs
15210
15211LTLIBOBJS=$ac_ltlibobjs
15212
15213
Martin v. Löwis11437992002-04-12 09:54:03 +000015214
Matthias Kloseb9621712010-04-24 17:59:49 +000015215
Victor Stinnere0be4232011-10-25 13:06:09 +020015216: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015217ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015218ac_clean_files_save=$ac_clean_files
15219ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015220{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15221$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15222as_write_fail=0
15223cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015224#! $SHELL
15225# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015226# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015227# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015228# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015229
Martin v. Löwis11437992002-04-12 09:54:03 +000015230debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015231ac_cs_recheck=false
15232ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015233
Matthias Kloseb9621712010-04-24 17:59:49 +000015234SHELL=\${CONFIG_SHELL-$SHELL}
15235export SHELL
15236_ASEOF
15237cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15238## -------------------- ##
15239## M4sh Initialization. ##
15240## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242# Be more Bourne compatible
15243DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015244if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015245 emulate sh
15246 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015247 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015248 # is contrary to our usage. Disable this feature.
15249 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015250 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015251else
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 case `(set -o) 2>/dev/null` in #(
15253 *posix*) :
15254 set -o posix ;; #(
15255 *) :
15256 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015257esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015258fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015259
15260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261as_nl='
15262'
15263export as_nl
15264# Printing a long string crashes Solaris 7 /usr/bin/printf.
15265as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15266as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15267as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15268# Prefer a ksh shell builtin over an external printf program on Solaris,
15269# but without wasting forks for bash or zsh.
15270if test -z "$BASH_VERSION$ZSH_VERSION" \
15271 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15272 as_echo='print -r --'
15273 as_echo_n='print -rn --'
15274elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15275 as_echo='printf %s\n'
15276 as_echo_n='printf %s'
15277else
15278 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15279 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15280 as_echo_n='/usr/ucb/echo -n'
15281 else
15282 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15283 as_echo_n_body='eval
15284 arg=$1;
15285 case $arg in #(
15286 *"$as_nl"*)
15287 expr "X$arg" : "X\\(.*\\)$as_nl";
15288 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15289 esac;
15290 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15291 '
15292 export as_echo_n_body
15293 as_echo_n='sh -c $as_echo_n_body as_echo'
15294 fi
15295 export as_echo_body
15296 as_echo='sh -c $as_echo_body as_echo'
15297fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015298
15299# The user is always right.
15300if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015301 PATH_SEPARATOR=:
15302 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15303 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15304 PATH_SEPARATOR=';'
15305 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015306fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308
15309# IFS
15310# We need space, tab and new line, in precisely that order. Quoting is
15311# there to prevent editors from complaining about space-tab.
15312# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15313# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015314IFS=" "" $as_nl"
15315
15316# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015317as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015318case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319 *[\\/]* ) as_myself=$0 ;;
15320 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015321for as_dir in $PATH
15322do
15323 IFS=$as_save_IFS
15324 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15326 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015327IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329 ;;
15330esac
15331# We did not find ourselves, most probably we were run as `sh COMMAND'
15332# in which case we are not to be found in the path.
15333if test "x$as_myself" = x; then
15334 as_myself=$0
15335fi
15336if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015337 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15338 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015339fi
15340
Matthias Kloseb9621712010-04-24 17:59:49 +000015341# Unset variables that we do not need and which cause bugs (e.g. in
15342# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15343# suppresses any "Segmentation fault" message there. '((' could
15344# trigger a bug in pdksh 5.2.14.
15345for as_var in BASH_ENV ENV MAIL MAILPATH
15346do eval test x\${$as_var+set} = xset \
15347 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348done
15349PS1='$ '
15350PS2='> '
15351PS4='+ '
15352
15353# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015354LC_ALL=C
15355export LC_ALL
15356LANGUAGE=C
15357export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358
Matthias Kloseb9621712010-04-24 17:59:49 +000015359# CDPATH.
15360(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15361
15362
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015363# as_fn_error STATUS ERROR [LINENO LOG_FD]
15364# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015365# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15366# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015367# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015368as_fn_error ()
15369{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015370 as_status=$1; test $as_status -eq 0 && as_status=1
15371 if test "$4"; then
15372 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15373 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015374 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015375 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 as_fn_exit $as_status
15377} # as_fn_error
15378
15379
15380# as_fn_set_status STATUS
15381# -----------------------
15382# Set $? to STATUS, without forking.
15383as_fn_set_status ()
15384{
15385 return $1
15386} # as_fn_set_status
15387
15388# as_fn_exit STATUS
15389# -----------------
15390# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15391as_fn_exit ()
15392{
15393 set +e
15394 as_fn_set_status $1
15395 exit $1
15396} # as_fn_exit
15397
15398# as_fn_unset VAR
15399# ---------------
15400# Portably unset VAR.
15401as_fn_unset ()
15402{
15403 { eval $1=; unset $1;}
15404}
15405as_unset=as_fn_unset
15406# as_fn_append VAR VALUE
15407# ----------------------
15408# Append the text in VALUE to the end of the definition contained in VAR. Take
15409# advantage of any shell optimizations that allow amortized linear growth over
15410# repeated appends, instead of the typical quadratic growth present in naive
15411# implementations.
15412if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15413 eval 'as_fn_append ()
15414 {
15415 eval $1+=\$2
15416 }'
15417else
15418 as_fn_append ()
15419 {
15420 eval $1=\$$1\$2
15421 }
15422fi # as_fn_append
15423
15424# as_fn_arith ARG...
15425# ------------------
15426# Perform arithmetic evaluation on the ARGs, and store the result in the
15427# global $as_val. Take advantage of shells that can avoid forks. The arguments
15428# must be portable across $(()) and expr.
15429if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15430 eval 'as_fn_arith ()
15431 {
15432 as_val=$(( $* ))
15433 }'
15434else
15435 as_fn_arith ()
15436 {
15437 as_val=`expr "$@" || test $? -eq 1`
15438 }
15439fi # as_fn_arith
15440
15441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015442if expr a : '\(a\)' >/dev/null 2>&1 &&
15443 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15444 as_expr=expr
15445else
15446 as_expr=false
15447fi
15448
15449if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15450 as_basename=basename
15451else
15452 as_basename=false
15453fi
15454
Matthias Kloseb9621712010-04-24 17:59:49 +000015455if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15456 as_dirname=dirname
15457else
15458 as_dirname=false
15459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461as_me=`$as_basename -- "$0" ||
15462$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15463 X"$0" : 'X\(//\)$' \| \
15464 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015465$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015466 sed '/^.*\/\([^/][^/]*\)\/*$/{
15467 s//\1/
15468 q
15469 }
15470 /^X\/\(\/\/\)$/{
15471 s//\1/
15472 q
15473 }
15474 /^X\/\(\/\).*/{
15475 s//\1/
15476 q
15477 }
15478 s/.*/./; q'`
15479
Matthias Kloseb9621712010-04-24 17:59:49 +000015480# Avoid depending upon Character Ranges.
15481as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15482as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15483as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15484as_cr_digits='0123456789'
15485as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015486
15487ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015488case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015489-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015490 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015491 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015492 xy) ECHO_C='\c';;
15493 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15494 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015495 esac;;
15496*)
15497 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015498esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015499
Martin v. Löwis11437992002-04-12 09:54:03 +000015500rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015501if test -d conf$$.dir; then
15502 rm -f conf$$.dir/conf$$.file
15503else
15504 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015507if (echo >conf$$.file) 2>/dev/null; then
15508 if ln -s conf$$.file conf$$ 2>/dev/null; then
15509 as_ln_s='ln -s'
15510 # ... but there are two gotchas:
15511 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15512 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015513 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015514 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015515 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015516 elif ln conf$$.file conf$$ 2>/dev/null; then
15517 as_ln_s=ln
15518 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015519 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015520 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015521else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015522 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015524rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15525rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015526
Matthias Kloseb9621712010-04-24 17:59:49 +000015527
15528# as_fn_mkdir_p
15529# -------------
15530# Create "$as_dir" as a directory, including parents if necessary.
15531as_fn_mkdir_p ()
15532{
15533
15534 case $as_dir in #(
15535 -*) as_dir=./$as_dir;;
15536 esac
15537 test -d "$as_dir" || eval $as_mkdir_p || {
15538 as_dirs=
15539 while :; do
15540 case $as_dir in #(
15541 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15542 *) as_qdir=$as_dir;;
15543 esac
15544 as_dirs="'$as_qdir' $as_dirs"
15545 as_dir=`$as_dirname -- "$as_dir" ||
15546$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15547 X"$as_dir" : 'X\(//\)[^/]' \| \
15548 X"$as_dir" : 'X\(//\)$' \| \
15549 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15550$as_echo X"$as_dir" |
15551 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15552 s//\1/
15553 q
15554 }
15555 /^X\(\/\/\)[^/].*/{
15556 s//\1/
15557 q
15558 }
15559 /^X\(\/\/\)$/{
15560 s//\1/
15561 q
15562 }
15563 /^X\(\/\).*/{
15564 s//\1/
15565 q
15566 }
15567 s/.*/./; q'`
15568 test -d "$as_dir" && break
15569 done
15570 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015571 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015572
15573
15574} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015575if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015576 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015577else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015578 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015579 as_mkdir_p=false
15580fi
15581
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015582
15583# as_fn_executable_p FILE
15584# -----------------------
15585# Test if FILE is an executable regular file.
15586as_fn_executable_p ()
15587{
15588 test -f "$1" && test -x "$1"
15589} # as_fn_executable_p
15590as_test_x='test -x'
15591as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015592
15593# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015594as_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 +000015595
15596# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015597as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015598
15599
Martin v. Löwis11437992002-04-12 09:54:03 +000015600exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015601## ----------------------------------- ##
15602## Main body of $CONFIG_STATUS script. ##
15603## ----------------------------------- ##
15604_ASEOF
15605test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015606
Matthias Kloseb9621712010-04-24 17:59:49 +000015607cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15608# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015609# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015610# values after options handling.
15611ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015612This file was extended by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015613generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
15615 CONFIG_FILES = $CONFIG_FILES
15616 CONFIG_HEADERS = $CONFIG_HEADERS
15617 CONFIG_LINKS = $CONFIG_LINKS
15618 CONFIG_COMMANDS = $CONFIG_COMMANDS
15619 $ $0 $@
15620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015621on `(hostname || uname -n) 2>/dev/null | sed 1q`
15622"
15623
Martin v. Löwis11437992002-04-12 09:54:03 +000015624_ACEOF
15625
Matthias Kloseb9621712010-04-24 17:59:49 +000015626case $ac_config_files in *"
15627"*) set x $ac_config_files; shift; ac_config_files=$*;;
15628esac
15629
15630case $ac_config_headers in *"
15631"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15632esac
15633
15634
15635cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015636# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015637config_files="$ac_config_files"
15638config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015640_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015641
Matthias Kloseb9621712010-04-24 17:59:49 +000015642cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015643ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015644\`$as_me' instantiates files and other configuration actions
15645from templates according to the current configuration. Unless the files
15646and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015647
Matthias Kloseb9621712010-04-24 17:59:49 +000015648Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015649
15650 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015651 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 --config print configuration, then exit
15653 -q, --quiet, --silent
15654 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015655 -d, --debug don't remove temporary files
15656 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015657 --file=FILE[:TEMPLATE]
15658 instantiate the configuration file FILE
15659 --header=FILE[:TEMPLATE]
15660 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015661
15662Configuration files:
15663$config_files
15664
15665Configuration headers:
15666$config_headers
15667
Matthias Kloseb9621712010-04-24 17:59:49 +000015668Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015671cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15672ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015673ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015674python config.status 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015675configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015676 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015677
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015678Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015679This config.status script is free software; the Free Software Foundation
15680gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015681
15682ac_pwd='$ac_pwd'
15683srcdir='$srcdir'
15684INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015685MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015686test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015687_ACEOF
15688
Matthias Kloseb9621712010-04-24 17:59:49 +000015689cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15690# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015691ac_need_defaults=:
15692while test $# != 0
15693do
15694 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015695 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015696 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15697 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015698 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015699 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015700 --*=)
15701 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15702 ac_optarg=
15703 ac_shift=:
15704 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015705 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015706 ac_option=$1
15707 ac_optarg=$2
15708 ac_shift=shift
15709 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015710 esac
15711
Skip Montanaro6dead952003-09-25 14:50:04 +000015712 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015713 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015714 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15715 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015716 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015717 $as_echo "$ac_cs_version"; exit ;;
15718 --config | --confi | --conf | --con | --co | --c )
15719 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015720 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015721 debug=: ;;
15722 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015723 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015724 case $ac_optarg in
15725 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015726 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015727 esac
15728 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015729 ac_need_defaults=false;;
15730 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015731 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 case $ac_optarg in
15733 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15734 esac
15735 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015736 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015737 --he | --h)
15738 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015739 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015740Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015741 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015742 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015743 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15744 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15745 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015746
15747 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015748 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015749Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015750
Matthias Kloseb9621712010-04-24 17:59:49 +000015751 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015753
15754 esac
15755 shift
15756done
15757
Skip Montanaro6dead952003-09-25 14:50:04 +000015758ac_configure_extra_args=
15759
15760if $ac_cs_silent; then
15761 exec 6>/dev/null
15762 ac_configure_extra_args="$ac_configure_extra_args --silent"
15763fi
15764
15765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015766cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015767if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015768 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 shift
15770 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15771 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015772 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015773 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015774fi
15775
Martin v. Löwis11437992002-04-12 09:54:03 +000015776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015777cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015778exec 5>>config.log
15779{
15780 echo
15781 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15782## Running $as_me. ##
15783_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015784 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015785} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015788cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015790
Matthias Kloseb9621712010-04-24 17:59:49 +000015791cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792
15793# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015794for ac_config_target in $ac_config_targets
15795do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015796 case $ac_config_target in
15797 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15798 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15799 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015800 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15801 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015802 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15803 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015804 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015805 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015806
Victor Stinnere0be4232011-10-25 13:06:09 +020015807 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015808 esac
15809done
15810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015811
Martin v. Löwis11437992002-04-12 09:54:03 +000015812# If the user did not use the arguments to specify the items to instantiate,
15813# then the envvar interface is used. Set only those that are not.
15814# We use the long form for the default assignment because of an extremely
15815# bizarre bug on SunOS 4.1.3.
15816if $ac_need_defaults; then
15817 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15818 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15819fi
15820
Skip Montanaro6dead952003-09-25 14:50:04 +000015821# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015822# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015823# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824# Hook for its removal unless debugging.
15825# Note that there is a small window in which the directory will not be cleaned:
15826# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015827$debug ||
15828{
Victor Stinnere0be4232011-10-25 13:06:09 +020015829 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015830 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015831 : "${ac_tmp:=$tmp}"
15832 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015834 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015835}
Martin v. Löwis11437992002-04-12 09:54:03 +000015836# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015837
Martin v. Löwis11437992002-04-12 09:54:03 +000015838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015840 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015841} ||
15842{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015843 tmp=./conf$$-$RANDOM
15844 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015845} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015846ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015847
Matthias Kloseb9621712010-04-24 17:59:49 +000015848# Set up the scripts for CONFIG_FILES section.
15849# No need to generate them if there are no CONFIG_FILES.
15850# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015852
Matthias Kloseb9621712010-04-24 17:59:49 +000015853
15854ac_cr=`echo X | tr X '\015'`
15855# On cygwin, bash can eat \r inside `` if the user requested igncr.
15856# But we know of no other shell where ac_cr would be empty at this
15857# point, so we can use a bashism as a fallback.
15858if test "x$ac_cr" = x; then
15859 eval ac_cr=\$\'\\r\'
15860fi
15861ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15862if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015863 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015864else
15865 ac_cs_awk_cr=$ac_cr
15866fi
15867
Victor Stinnere0be4232011-10-25 13:06:09 +020015868echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015869_ACEOF
15870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871
Matthias Kloseb9621712010-04-24 17:59:49 +000015872{
15873 echo "cat >conf$$subs.awk <<_ACEOF" &&
15874 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15875 echo "_ACEOF"
15876} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015877 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15878ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015879ac_delim='%!_!# '
15880for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015881 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015882 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015883
Matthias Kloseb9621712010-04-24 17:59:49 +000015884 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15885 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015886 break
15887 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015888 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889 else
15890 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015892done
Matthias Kloseb9621712010-04-24 17:59:49 +000015893rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015894
Matthias Kloseb9621712010-04-24 17:59:49 +000015895cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015896cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015898sed -n '
15899h
15900s/^/S["/; s/!.*/"]=/
15901p
15902g
15903s/^[^!]*!//
15904:repl
15905t repl
15906s/'"$ac_delim"'$//
15907t delim
15908:nl
15909h
15910s/\(.\{148\}\)..*/\1/
15911t more1
15912s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15913p
15914n
15915b repl
15916:more1
15917s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15918p
15919g
15920s/.\{148\}//
15921t nl
15922:delim
15923h
15924s/\(.\{148\}\)..*/\1/
15925t more2
15926s/["\\]/\\&/g; s/^/"/; s/$/"/
15927p
15928b
15929:more2
15930s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15931p
15932g
15933s/.\{148\}//
15934t delim
15935' <conf$$subs.awk | sed '
15936/^[^""]/{
15937 N
15938 s/\n//
15939}
15940' >>$CONFIG_STATUS || ac_write_fail=1
15941rm -f conf$$subs.awk
15942cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15943_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015944cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015945 for (key in S) S_is_set[key] = 1
15946 FS = ""
15947
15948}
15949{
15950 line = $ 0
15951 nfields = split(line, field, "@")
15952 substed = 0
15953 len = length(field[1])
15954 for (i = 2; i < nfields; i++) {
15955 key = field[i]
15956 keylen = length(key)
15957 if (S_is_set[key]) {
15958 value = S[key]
15959 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15960 len += length(value) + length(field[++i])
15961 substed = 1
15962 } else
15963 len += 1 + keylen
15964 }
15965
15966 print line
15967}
15968
15969_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015971cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15972if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15973 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15974else
15975 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020015976fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015977 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015978_ACEOF
15979
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015980# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15981# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015982# trailing colons and then remove the whole line if VPATH becomes empty
15983# (actually we leave an empty line to preserve line numbers).
15984if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015985 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15986h
15987s///
15988s/^/:/
15989s/[ ]*$/:/
15990s/:\$(srcdir):/:/g
15991s/:\${srcdir}:/:/g
15992s/:@srcdir@:/:/g
15993s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015994s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015995x
15996s/\(=[ ]*\).*/\1/
15997G
15998s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015999s/^[^=]*=[ ]*$//
16000}'
16001fi
16002
Matthias Kloseb9621712010-04-24 17:59:49 +000016003cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016004fi # test -n "$CONFIG_FILES"
16005
Matthias Kloseb9621712010-04-24 17:59:49 +000016006# Set up the scripts for CONFIG_HEADERS section.
16007# No need to generate them if there are no CONFIG_HEADERS.
16008# This happens for instance with `./config.status Makefile'.
16009if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016010cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016011BEGIN {
16012_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016013
Matthias Kloseb9621712010-04-24 17:59:49 +000016014# Transform confdefs.h into an awk script `defines.awk', embedded as
16015# here-document in config.status, that substitutes the proper values into
16016# config.h.in to produce config.h.
16017
16018# Create a delimiter string that does not exist in confdefs.h, to ease
16019# handling of long lines.
16020ac_delim='%!_!# '
16021for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016022 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16023 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016024 break
16025 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016026 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016027 else
16028 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16029 fi
16030done
16031
16032# For the awk script, D is an array of macro values keyed by name,
16033# likewise P contains macro parameters if any. Preserve backslash
16034# newline sequences.
16035
16036ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16037sed -n '
16038s/.\{148\}/&'"$ac_delim"'/g
16039t rset
16040:rset
16041s/^[ ]*#[ ]*define[ ][ ]*/ /
16042t def
16043d
16044:def
16045s/\\$//
16046t bsnl
16047s/["\\]/\\&/g
16048s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16049D["\1"]=" \3"/p
16050s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16051d
16052:bsnl
16053s/["\\]/\\&/g
16054s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16055D["\1"]=" \3\\\\\\n"\\/p
16056t cont
16057s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16058t cont
16059d
16060:cont
16061n
16062s/.\{148\}/&'"$ac_delim"'/g
16063t clear
16064:clear
16065s/\\$//
16066t bsnlc
16067s/["\\]/\\&/g; s/^/"/; s/$/"/p
16068d
16069:bsnlc
16070s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16071b cont
16072' <confdefs.h | sed '
16073s/'"$ac_delim"'/"\\\
16074"/g' >>$CONFIG_STATUS || ac_write_fail=1
16075
16076cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16077 for (key in D) D_is_set[key] = 1
16078 FS = ""
16079}
16080/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16081 line = \$ 0
16082 split(line, arg, " ")
16083 if (arg[1] == "#") {
16084 defundef = arg[2]
16085 mac1 = arg[3]
16086 } else {
16087 defundef = substr(arg[1], 2)
16088 mac1 = arg[2]
16089 }
16090 split(mac1, mac2, "(") #)
16091 macro = mac2[1]
16092 prefix = substr(line, 1, index(line, defundef) - 1)
16093 if (D_is_set[macro]) {
16094 # Preserve the white space surrounding the "#".
16095 print prefix "define", macro P[macro] D[macro]
16096 next
16097 } else {
16098 # Replace #undef with comments. This is necessary, for example,
16099 # in the case of _POSIX_SOURCE, which is predefined and required
16100 # on some systems where configure will not decide to define it.
16101 if (defundef == "undef") {
16102 print "/*", prefix defundef, macro, "*/"
16103 next
16104 }
16105 }
16106}
16107{ print }
16108_ACAWK
16109_ACEOF
16110cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016111 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016112fi # test -n "$CONFIG_HEADERS"
16113
16114
16115eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16116shift
16117for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016118do
16119 case $ac_tag in
16120 :[FHLC]) ac_mode=$ac_tag; continue;;
16121 esac
16122 case $ac_mode$ac_tag in
16123 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016124 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016125 :[FH]-) ac_tag=-:-;;
16126 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16127 esac
16128 ac_save_IFS=$IFS
16129 IFS=:
16130 set x $ac_tag
16131 IFS=$ac_save_IFS
16132 shift
16133 ac_file=$1
16134 shift
16135
16136 case $ac_mode in
16137 :L) ac_source=$1;;
16138 :[FH])
16139 ac_file_inputs=
16140 for ac_f
16141 do
16142 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016143 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016144 *) # Look for the file first in the build tree, then in the source tree
16145 # (if the path is not absolute). The absolute path cannot be DOS-style,
16146 # because $ac_f cannot contain `:'.
16147 test -f "$ac_f" ||
16148 case $ac_f in
16149 [\\/$]*) false;;
16150 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16151 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016152 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016153 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016154 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16155 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156 done
16157
16158 # Let's still pretend it is `configure' which instantiates (i.e., don't
16159 # use $as_me), people would be surprised to read:
16160 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016161 configure_input='Generated from '`
16162 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16163 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016164 if test x"$ac_file" != x-; then
16165 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016166 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16167$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016168 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016169 # Neutralize special characters interpreted by sed in replacement strings.
16170 case $configure_input in #(
16171 *\&* | *\|* | *\\* )
16172 ac_sed_conf_input=`$as_echo "$configure_input" |
16173 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16174 *) ac_sed_conf_input=$configure_input;;
16175 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016176
16177 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016178 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16179 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180 esac
16181 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016182 esac
16183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016185$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016186 X"$ac_file" : 'X\(//\)[^/]' \| \
16187 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016188 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016189$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016190 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16191 s//\1/
16192 q
16193 }
16194 /^X\(\/\/\)[^/].*/{
16195 s//\1/
16196 q
16197 }
16198 /^X\(\/\/\)$/{
16199 s//\1/
16200 q
16201 }
16202 /^X\(\/\).*/{
16203 s//\1/
16204 q
16205 }
16206 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016207 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016208 ac_builddir=.
16209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016210case "$ac_dir" in
16211.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16212*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016213 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016215 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216 case $ac_top_builddir_sub in
16217 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16218 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16219 esac ;;
16220esac
16221ac_abs_top_builddir=$ac_pwd
16222ac_abs_builddir=$ac_pwd$ac_dir_suffix
16223# for backward compatibility:
16224ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016225
16226case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016228 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016229 ac_top_srcdir=$ac_top_builddir_sub
16230 ac_abs_top_srcdir=$ac_pwd ;;
16231 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016232 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016233 ac_top_srcdir=$srcdir
16234 ac_abs_top_srcdir=$srcdir ;;
16235 *) # Relative name.
16236 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16237 ac_top_srcdir=$ac_top_build_prefix$srcdir
16238 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016239esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016240ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016241
Martin v. Löwis11437992002-04-12 09:54:03 +000016242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243 case $ac_mode in
16244 :F)
16245 #
16246 # CONFIG_FILE
16247 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016248
16249 case $INSTALL in
16250 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016252 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016253 ac_MKDIR_P=$MKDIR_P
16254 case $MKDIR_P in
16255 [\\/$]* | ?:[\\/]* ) ;;
16256 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16257 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016258_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259
Matthias Kloseb9621712010-04-24 17:59:49 +000016260cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016261# If the template does not know about datarootdir, expand it.
16262# FIXME: This hack should be removed a few years after 2.60.
16263ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016264ac_sed_dataroot='
16265/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016266 p
16267 q
16268}
16269/@datadir@/p
16270/@docdir@/p
16271/@infodir@/p
16272/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016273/@mandir@/p'
16274case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275*datarootdir*) ac_datarootdir_seen=yes;;
16276*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016277 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16278$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016280cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016281 ac_datarootdir_hack='
16282 s&@datadir@&$datadir&g
16283 s&@docdir@&$docdir&g
16284 s&@infodir@&$infodir&g
16285 s&@localedir@&$localedir&g
16286 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016287 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016288esac
16289_ACEOF
16290
16291# Neutralize VPATH when `$srcdir' = `.'.
16292# Shell code in configure.ac might set extrasub.
16293# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016294cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16295ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016296$extrasub
16297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016299:t
16300/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016301s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016302s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016303s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304s&@srcdir@&$ac_srcdir&;t t
16305s&@abs_srcdir@&$ac_abs_srcdir&;t t
16306s&@top_srcdir@&$ac_top_srcdir&;t t
16307s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16308s&@builddir@&$ac_builddir&;t t
16309s&@abs_builddir@&$ac_abs_builddir&;t t
16310s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16311s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016312s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016314"
Victor Stinnere0be4232011-10-25 13:06:09 +020016315eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16316 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016318test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016319 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16320 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16321 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016322 { $as_echo "$as_me:${as_lineno-$LINENO}: 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" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016324$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016325which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016326
Victor Stinnere0be4232011-10-25 13:06:09 +020016327 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016329 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16330 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016331 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016332 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333 ;;
16334 :H)
16335 #
16336 # CONFIG_HEADER
16337 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016339 {
16340 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016341 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16342 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016343 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016344 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016345 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16346$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016347 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016348 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016349 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016350 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016351 fi
16352 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016353 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016354 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016355 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016356 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016357 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016359
16360 esac
16361
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016362
16363 case $ac_file$ac_mode in
16364 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16365
16366 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016367done # for ac_tag
16368
Guido van Rossum627b2d71993-12-24 10:39:16 +000016369
Matthias Kloseb9621712010-04-24 17:59:49 +000016370as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016371_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016372ac_clean_files=$ac_clean_files_save
16373
Matthias Kloseb9621712010-04-24 17:59:49 +000016374test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016375 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016376
Martin v. Löwis11437992002-04-12 09:54:03 +000016377
16378# configure is writing to config.log, and then calls config.status.
16379# config.status does its own redirection, appending to config.log.
16380# Unfortunately, on DOS this fails, as config.log is still kept open
16381# by configure, so config.status won't be able to write to it; its
16382# output is simply discarded. So we exec the FD to /dev/null,
16383# effectively closing config.log, so it can be properly (re)opened and
16384# appended to by config.status. When coming back to configure, we
16385# need to make the FD available again.
16386if test "$no_create" != yes; then
16387 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016388 ac_config_status_args=
16389 test "$silent" = yes &&
16390 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016391 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016392 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016393 exec 5>>config.log
16394 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16395 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016396 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016397fi
16398if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16399 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16400$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016401fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016402
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016403
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016404echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016405if test ! -f Modules/Setup
16406then
16407 cp $srcdir/Modules/Setup.dist Modules/Setup
16408fi
16409
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016410echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016411if test ! -f Modules/Setup.local
16412then
16413 echo "# Edit this file for local setup changes" >Modules/Setup.local
16414fi
16415
16416echo "creating Makefile"
16417$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16418 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016419 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016420mv config.c Modules