blob: 901ea4aff41b37f298be486301c302ec364f07cd [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 Lagerwall2bb842a2012-10-29 17:39:19 +00003# Generated by GNU Autoconf 2.69 for python 3.4.
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 Brandl08a90122012-09-29 09:34:13 +0200583PACKAGE_VERSION='3.4'
584PACKAGE_STRING='python 3.4'
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 Brandl08a90122012-09-29 09:34:13 +02001358\`configure' configures python 3.4 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 Brandl08a90122012-09-29 09:34:13 +02001423 short | recursive ) echo "Configuration of python 3.4:";;
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 Brandl08a90122012-09-29 09:34:13 +02001561python configure 3.4
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 Brandl08a90122012-09-29 09:34:13 +02002400It was created by python $as_me 3.4, 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 Brandl08a90122012-09-29 09:34:13 +02002966VERSION=3.4
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
Mark Dickinson983bc162012-12-02 12:11:38 +00007436
7437# There are two separate checks for each of the exact-width integer types we
7438# need. First we check whether the type is available using the usual
7439# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7440# and <stdint.h> where available). We then also use the special type checks of
7441# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7442# directly, #define's uint32_t to be a suitable type.
7443
7444ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7445if test "x$ac_cv_type_uint32_t" = xyes; then :
7446
7447$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7448
7449fi
7450
Matthias Kloseb9621712010-04-24 17:59:49 +00007451ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7452case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007453 no|yes) ;; #(
7454 *)
7455
Matthias Kloseb9621712010-04-24 17:59:49 +00007456$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007457
7458
7459cat >>confdefs.h <<_ACEOF
7460#define uint32_t $ac_cv_c_uint32_t
7461_ACEOF
7462;;
7463 esac
7464
Mark Dickinson983bc162012-12-02 12:11:38 +00007465
7466ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7467if test "x$ac_cv_type_uint64_t" = xyes; then :
7468
7469$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7470
7471fi
7472
Matthias Kloseb9621712010-04-24 17:59:49 +00007473ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7474case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007475 no|yes) ;; #(
7476 *)
7477
Matthias Kloseb9621712010-04-24 17:59:49 +00007478$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007479
7480
7481cat >>confdefs.h <<_ACEOF
7482#define uint64_t $ac_cv_c_uint64_t
7483_ACEOF
7484;;
7485 esac
7486
Mark Dickinson983bc162012-12-02 12:11:38 +00007487
7488ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7489if test "x$ac_cv_type_int32_t" = xyes; then :
7490
7491$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7492
7493fi
7494
Matthias Kloseb9621712010-04-24 17:59:49 +00007495ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7496case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007497 no|yes) ;; #(
7498 *)
7499
7500cat >>confdefs.h <<_ACEOF
7501#define int32_t $ac_cv_c_int32_t
7502_ACEOF
7503;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007504esac
7505
Mark Dickinson983bc162012-12-02 12:11:38 +00007506
7507ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7508if test "x$ac_cv_type_int64_t" = xyes; then :
7509
7510$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7511
7512fi
7513
Matthias Kloseb9621712010-04-24 17:59:49 +00007514ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7515case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007516 no|yes) ;; #(
7517 *)
7518
7519cat >>confdefs.h <<_ACEOF
7520#define int64_t $ac_cv_c_int64_t
7521_ACEOF
7522;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007523esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007524
Mark Dickinson983bc162012-12-02 12:11:38 +00007525
Matthias Kloseb9621712010-04-24 17:59:49 +00007526ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007527if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007528
Matthias Kloseb9621712010-04-24 17:59:49 +00007529$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007530
7531fi
7532
Stefan Krah1919b7e2012-03-21 18:25:23 +01007533ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7534if test "x$ac_cv_type___uint128_t" = xyes; then :
7535
7536$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7537
7538fi
7539
Jack Jansendd19cf82001-12-06 22:36:17 +00007540
Michael W. Hudson54241132001-12-07 15:38:26 +00007541# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007542# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007543# The cast to long int works around a bug in the HP C Compiler
7544# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7545# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7546# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7548$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007549if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007550 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007551else
Matthias Kloseb9621712010-04-24 17:59:49 +00007552 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 +00007553
Martin v. Löwis11437992002-04-12 09:54:03 +00007554else
Matthias Kloseb9621712010-04-24 17:59:49 +00007555 if test "$ac_cv_type_int" = yes; then
7556 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7557$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007558as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007559See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560 else
7561 ac_cv_sizeof_int=0
7562 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007564
Martin v. Löwis11437992002-04-12 09:54:03 +00007565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7567$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007568
7569
7570
Martin v. Löwis11437992002-04-12 09:54:03 +00007571cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007572#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007573_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007574
7575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007576# The cast to long int works around a bug in the HP C Compiler
7577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7579# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7581$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007582if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007583 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007584else
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 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 +00007586
Martin v. Löwis11437992002-04-12 09:54:03 +00007587else
Matthias Kloseb9621712010-04-24 17:59:49 +00007588 if test "$ac_cv_type_long" = yes; then
7589 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007591as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007592See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007593 else
7594 ac_cv_sizeof_long=0
7595 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007597
Martin v. Löwis11437992002-04-12 09:54:03 +00007598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7600$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007601
7602
7603
Martin v. Löwis11437992002-04-12 09:54:03 +00007604cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007605#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007606_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007607
7608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609# The cast to long int works around a bug in the HP C Compiler
7610# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7611# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7612# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7614$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007615if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007617else
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 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 +00007619
Martin v. Löwis11437992002-04-12 09:54:03 +00007620else
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 if test "$ac_cv_type_void_p" = yes; then
7622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7623$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007624as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007625See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007626 else
7627 ac_cv_sizeof_void_p=0
7628 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007630
Martin v. Löwis11437992002-04-12 09:54:03 +00007631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7633$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007634
7635
7636
Martin v. Löwis11437992002-04-12 09:54:03 +00007637cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007638#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007639_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007640
7641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007642# The cast to long int works around a bug in the HP C Compiler
7643# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7644# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7645# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7647$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007648if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007649 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007650else
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 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 +00007652
Martin v. Löwis11437992002-04-12 09:54:03 +00007653else
Matthias Kloseb9621712010-04-24 17:59:49 +00007654 if test "$ac_cv_type_short" = yes; then
7655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007657as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007658See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007659 else
7660 ac_cv_sizeof_short=0
7661 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007663
Martin v. Löwis11437992002-04-12 09:54:03 +00007664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7666$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667
7668
7669
Martin v. Löwis11437992002-04-12 09:54:03 +00007670cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007671#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007672_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007673
7674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007675# The cast to long int works around a bug in the HP C Compiler
7676# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7677# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7678# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7680$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007681if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007683else
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 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 +00007685
Martin v. Löwis11437992002-04-12 09:54:03 +00007686else
Matthias Kloseb9621712010-04-24 17:59:49 +00007687 if test "$ac_cv_type_float" = yes; then
7688 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7689$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007690as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007691See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007692 else
7693 ac_cv_sizeof_float=0
7694 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007696
Martin v. Löwis11437992002-04-12 09:54:03 +00007697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7699$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700
7701
7702
Martin v. Löwis11437992002-04-12 09:54:03 +00007703cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007704#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007705_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007706
7707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007708# The cast to long int works around a bug in the HP C Compiler
7709# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7710# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7711# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7713$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007714if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007715 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007716else
Matthias Kloseb9621712010-04-24 17:59:49 +00007717 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 +00007718
Martin v. Löwis11437992002-04-12 09:54:03 +00007719else
Matthias Kloseb9621712010-04-24 17:59:49 +00007720 if test "$ac_cv_type_double" = yes; then
7721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007723as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007724See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007725 else
7726 ac_cv_sizeof_double=0
7727 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007729
Martin v. Löwis11437992002-04-12 09:54:03 +00007730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7732$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007733
7734
7735
Martin v. Löwis11437992002-04-12 09:54:03 +00007736cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007737#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007738_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007739
7740
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007741# The cast to long int works around a bug in the HP C Compiler
7742# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7743# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7744# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7746$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007747if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007749else
Matthias Kloseb9621712010-04-24 17:59:49 +00007750 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 +00007751
Martin v. Löwis11437992002-04-12 09:54:03 +00007752else
Matthias Kloseb9621712010-04-24 17:59:49 +00007753 if test "$ac_cv_type_fpos_t" = yes; then
7754 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007756as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007757See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007758 else
7759 ac_cv_sizeof_fpos_t=0
7760 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007762
Martin v. Löwis11437992002-04-12 09:54:03 +00007763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7765$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007766
7767
7768
Martin v. Löwis11437992002-04-12 09:54:03 +00007769cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007770#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007771_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007772
Michael W. Hudson54241132001-12-07 15:38:26 +00007773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774# The cast to long int works around a bug in the HP C Compiler
7775# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7776# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7777# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7779$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007780if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007782else
Matthias Kloseb9621712010-04-24 17:59:49 +00007783 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 +00007784
Martin v. Löwis18e16552006-02-15 17:27:45 +00007785else
Matthias Kloseb9621712010-04-24 17:59:49 +00007786 if test "$ac_cv_type_size_t" = yes; then
7787 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7788$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007789as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007790See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791 else
7792 ac_cv_sizeof_size_t=0
7793 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007795
Martin v. Löwis18e16552006-02-15 17:27:45 +00007796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7798$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799
7800
7801
Martin v. Löwis18e16552006-02-15 17:27:45 +00007802cat >>confdefs.h <<_ACEOF
7803#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7804_ACEOF
7805
7806
Christian Heimes400adb02008-02-01 08:12:03 +00007807# The cast to long int works around a bug in the HP C Compiler
7808# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7809# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7810# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7812$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007813if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007814 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007815else
Matthias Kloseb9621712010-04-24 17:59:49 +00007816 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 +00007817
Christian Heimes400adb02008-02-01 08:12:03 +00007818else
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 if test "$ac_cv_type_pid_t" = yes; then
7820 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007822as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007823See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007824 else
7825 ac_cv_sizeof_pid_t=0
7826 fi
7827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007828
Christian Heimes400adb02008-02-01 08:12:03 +00007829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7831$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007832
7833
7834
7835cat >>confdefs.h <<_ACEOF
7836#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7837_ACEOF
7838
7839
Michael W. Hudson54241132001-12-07 15:38:26 +00007840
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7842$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007843have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007845/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007846
Martin v. Löwis11437992002-04-12 09:54:03 +00007847int
7848main ()
7849{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007850long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 ;
7852 return 0;
7853}
7854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007855if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007856
7857
Matthias Kloseb9621712010-04-24 17:59:49 +00007858$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007859
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007860 have_long_long=yes
7861
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7865$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007866if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007867# The cast to long int works around a bug in the HP C Compiler
7868# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7869# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7870# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7872$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007873if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007874 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007875else
Matthias Kloseb9621712010-04-24 17:59:49 +00007876 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 +00007877
Martin v. Löwis11437992002-04-12 09:54:03 +00007878else
Matthias Kloseb9621712010-04-24 17:59:49 +00007879 if test "$ac_cv_type_long_long" = yes; then
7880 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007882as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007883See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884 else
7885 ac_cv_sizeof_long_long=0
7886 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007888
Martin v. Löwis11437992002-04-12 09:54:03 +00007889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7891$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892
7893
7894
Martin v. Löwis11437992002-04-12 09:54:03 +00007895cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007896#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007897_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007898
Michael W. Hudson54241132001-12-07 15:38:26 +00007899
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007900fi
7901
Matthias Kloseb9621712010-04-24 17:59:49 +00007902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7903$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007904have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007906/* end confdefs.h. */
7907
7908int
7909main ()
7910{
7911long double x; x = (long double)0;
7912 ;
7913 return 0;
7914}
7915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007916if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007917
7918
Matthias Kloseb9621712010-04-24 17:59:49 +00007919$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007920
7921 have_long_double=yes
7922
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007923fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7926$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007927if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007928# The cast to long int works around a bug in the HP C Compiler
7929# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7930# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7931# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7933$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007934if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007936else
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 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 +00007938
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007939else
Matthias Kloseb9621712010-04-24 17:59:49 +00007940 if test "$ac_cv_type_long_double" = yes; then
7941 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007943as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007944See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007945 else
7946 ac_cv_sizeof_long_double=0
7947 fi
7948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007949
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7952$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007953
7954
7955
7956cat >>confdefs.h <<_ACEOF
7957#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7958_ACEOF
7959
7960
7961fi
7962
7963
Matthias Kloseb9621712010-04-24 17:59:49 +00007964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7965$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007966have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007968/* end confdefs.h. */
7969
7970int
7971main ()
7972{
7973_Bool x; x = (_Bool)0;
7974 ;
7975 return 0;
7976}
7977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007978if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007979
7980
Matthias Kloseb9621712010-04-24 17:59:49 +00007981$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007982
7983 have_c99_bool=yes
7984
Thomas Woutersb2137042007-02-01 18:02:27 +00007985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7988$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007989if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990# The cast to long int works around a bug in the HP C Compiler
7991# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7992# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7993# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7995$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007996if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007997 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00007998else
Matthias Kloseb9621712010-04-24 17:59:49 +00007999 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 +00008000
Thomas Woutersb2137042007-02-01 18:02:27 +00008001else
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 if test "$ac_cv_type__Bool" = yes; then
8003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008005as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008006See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007 else
8008 ac_cv_sizeof__Bool=0
8009 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011
Thomas Woutersb2137042007-02-01 18:02:27 +00008012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8014$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015
8016
8017
Thomas Woutersb2137042007-02-01 18:02:27 +00008018cat >>confdefs.h <<_ACEOF
8019#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8020_ACEOF
8021
8022
8023fi
8024
Matthias Kloseb9621712010-04-24 17:59:49 +00008025ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008026 #include <stdint.h>
8027 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008028 #ifdef HAVE_INTTYPES_H
8029 #include <inttypes.h>
8030 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008031"
Victor Stinnere0be4232011-10-25 13:06:09 +02008032if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008033
8034cat >>confdefs.h <<_ACEOF
8035#define HAVE_UINTPTR_T 1
8036_ACEOF
8037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038# The cast to long int works around a bug in the HP C Compiler
8039# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8040# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8041# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8043$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008044if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008046else
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 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 +00008048
Martin v. Löwis11437992002-04-12 09:54:03 +00008049else
Matthias Kloseb9621712010-04-24 17:59:49 +00008050 if test "$ac_cv_type_uintptr_t" = yes; then
8051 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8052$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008053as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008054See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055 else
8056 ac_cv_sizeof_uintptr_t=0
8057 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008059
Martin v. Löwis11437992002-04-12 09:54:03 +00008060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8062$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063
8064
8065
Martin v. Löwis11437992002-04-12 09:54:03 +00008066cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008067#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008068_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008069
Michael W. Hudson54241132001-12-07 15:38:26 +00008070
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008071fi
8072
Thomas Wouters89f507f2006-12-13 04:49:30 +00008073
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008074# The cast to long int works around a bug in the HP C Compiler
8075# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8076# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8077# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8079$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008080if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008082else
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008084#ifdef HAVE_SYS_TYPES_H
8085#include <sys/types.h>
8086#endif
8087
Matthias Kloseb9621712010-04-24 17:59:49 +00008088"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008089
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008090else
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 if test "$ac_cv_type_off_t" = yes; then
8092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008094as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008095See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008096 else
8097 ac_cv_sizeof_off_t=0
8098 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008100
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8103$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008104
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008105
8106
Martin v. Löwis11437992002-04-12 09:54:03 +00008107cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008108#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008109_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008110
Michael W. Hudson54241132001-12-07 15:38:26 +00008111
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008112
Matthias Kloseb9621712010-04-24 17:59:49 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8114$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008115if test "$have_long_long" = yes
8116then
8117if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008118 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008119
Matthias Kloseb9621712010-04-24 17:59:49 +00008120$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008121
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8123$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008124else
Matthias Kloseb9621712010-04-24 17:59:49 +00008125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8126$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008127fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008128else
Matthias Kloseb9621712010-04-24 17:59:49 +00008129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8130$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008131fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008132
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008133# The cast to long int works around a bug in the HP C Compiler
8134# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8135# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8136# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8138$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008139if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008141else
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008143#ifdef HAVE_SYS_TYPES_H
8144#include <sys/types.h>
8145#endif
8146#ifdef HAVE_TIME_H
8147#include <time.h>
8148#endif
8149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008151
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008152else
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 if test "$ac_cv_type_time_t" = yes; then
8154 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8155$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008156as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008157See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008158 else
8159 ac_cv_sizeof_time_t=0
8160 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008161fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008162
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008163fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8165$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008166
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008167
8168
Martin v. Löwis11437992002-04-12 09:54:03 +00008169cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008170#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008171_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008172
Michael W. Hudson54241132001-12-07 15:38:26 +00008173
8174
Trent Mick635f6fb2000-08-23 21:33:05 +00008175# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008176ac_save_cc="$CC"
8177if test "$ac_cv_kpthread" = "yes"
8178then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008179elif test "$ac_cv_kthread" = "yes"
8180then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008181elif test "$ac_cv_pthread" = "yes"
8182then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008183fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008184
Matthias Kloseb9621712010-04-24 17:59:49 +00008185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8186$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008187have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008189/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008190
8191 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008192int
8193main ()
8194{
Guido van Rossum12580492000-09-24 16:47:19 +00008195pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008196 ;
8197 return 0;
8198}
Matthias Kloseb159a552010-04-25 21:00:44 +00008199
Martin v. Löwis11437992002-04-12 09:54:03 +00008200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008201if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008202 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8206$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008207if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008208 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008209# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8210# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8211# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8213$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008214if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008215 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008216else
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008218#ifdef HAVE_PTHREAD_H
8219#include <pthread.h>
8220#endif
8221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008223
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008224else
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 if test "$ac_cv_type_pthread_t" = yes; then
8226 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8227$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008228as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008229See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008230 else
8231 ac_cv_sizeof_pthread_t=0
8232 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008233fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008234
Trent Mick635f6fb2000-08-23 21:33:05 +00008235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8237$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008239
8240
Martin v. Löwis11437992002-04-12 09:54:03 +00008241cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008242#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008243_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008244
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008245
Trent Mick635f6fb2000-08-23 21:33:05 +00008246fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008247CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008248
Michael W. Hudson54241132001-12-07 15:38:26 +00008249
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008250case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008251 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008252 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8253 ;;
8254 Darwin/*)
8255 OTHER_LIBTOOL_OPT=""
8256 ;;
8257esac
8258
8259
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008260ARCH_RUN_32BIT=""
8261
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008262case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008263 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008264 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8265 if test "${enable_universalsdk}"; then
8266 :
8267 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008268 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008269 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008270 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008271 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008272 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008273 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008274 if test ${gcc_version} '<' 4.0
8275 then
8276 LIBTOOL_CRUFT="-lcc_dynamic"
8277 else
8278 LIBTOOL_CRUFT=""
8279 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008281 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008282else
Matthias Kloseb9621712010-04-24 17:59:49 +00008283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008284/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008285
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008286 #include <unistd.h>
8287 int main(int argc, char*argv[])
8288 {
8289 if (sizeof(long) == 4) {
8290 return 0;
8291 } else {
8292 return 1;
8293 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008294 }
8295
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008297if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008298 ac_osx_32bit=yes
8299else
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8303 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008304fi
8305
8306
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008307 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008308 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008309 i386)
8310 MACOSX_DEFAULT_ARCH="i386"
8311 ;;
8312 ppc)
8313 MACOSX_DEFAULT_ARCH="ppc"
8314 ;;
8315 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008316 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008317 ;;
8318 esac
8319 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008320 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008321 i386)
8322 MACOSX_DEFAULT_ARCH="x86_64"
8323 ;;
8324 ppc)
8325 MACOSX_DEFAULT_ARCH="ppc64"
8326 ;;
8327 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008328 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008329 ;;
8330 esac
8331
8332 #ARCH_RUN_32BIT="true"
8333 fi
8334
8335 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008336 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008337 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008338esac
8339
Matthias Kloseb9621712010-04-24 17:59:49 +00008340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8341$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008342if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008343then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008344 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008345 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008346 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8351$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008352 if test $enable_shared = "yes"
8353 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008354 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 +00008355 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008356else
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8358$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008359fi
8360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8362$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008363case $ac_sys_system/$ac_sys_release in
8364 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008365
Matthias Kloseb9621712010-04-24 17:59:49 +00008366$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008367
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8369$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008370 ;;
8371 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8373$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008374 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008375esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008376
Guido van Rossum0a516c91994-09-12 10:58:40 +00008377# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008378
Michael W. Hudson54241132001-12-07 15:38:26 +00008379
8380
8381
8382
Benjamin Peterson99f03762010-04-11 22:15:28 +00008383
Thomas Wouters477c8d52006-05-27 19:21:47 +00008384
Georg Brandlb1441c72009-01-03 22:33:39 +00008385
Thomas Wouters477c8d52006-05-27 19:21:47 +00008386cat >>confdefs.h <<_ACEOF
8387#define SHLIB_EXT "$SO"
8388_ACEOF
8389
Guido van Rossum0a516c91994-09-12 10:58:40 +00008390# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008391# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008392# (Shared libraries in this instance are shared modules to be loaded into
8393# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8395$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008396if test -z "$LDSHARED"
8397then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008398 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008399 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008400 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008401 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008402 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008403 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008404 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008405 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008406 if test "$GCC" = "yes" ; then
8407 LDSHARED='$(CC) -shared'
8408 LDCXXSHARED='$(CXX) -shared'
8409 else
8410 LDSHARED='$(CC) -G'
8411 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008412 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008413 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008414 if test "$GCC" = "yes" ; then
8415 LDSHARED='$(CC) -shared'
8416 LDCXXSHARED='$(CXX) -shared'
8417 else
8418 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008419 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008420 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008421 LDSHARED='$(CC) -bundle'
8422 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008423 if test "$enable_framework" ; then
8424 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008425 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8426 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008427 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008428 else
8429 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008430 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008431 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008432 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008433 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008434 LDSHARED='$(CC) -bundle'
8435 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008436 if test "$enable_framework" ; then
8437 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008438 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8439 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008440 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008441 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008442 # No framework, use the Python app as bundle-loader
8443 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008444 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008445 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008446 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008447 Darwin/*)
8448 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8449 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008450
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008451 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008452 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008453 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008454 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008455 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008456 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8457 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008458 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008459 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008460 LDSHARED='$(CC) -bundle'
8461 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008462 if test "$enable_framework" ; then
8463 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008464 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8465 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008466 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008467 else
8468 # No framework, use the Python app as bundle-loader
8469 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8470 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008471 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008472 fi
8473 fi
8474 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008475 Linux*|GNU*|QNX*)
8476 LDSHARED='$(CC) -shared'
8477 LDCXXSHARED='$(CXX) -shared';;
8478 BSD/OS*/4*)
8479 LDSHARED="gcc -shared"
8480 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008481 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008482 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008483 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008484 LDSHARED='$(CC) -shared'
8485 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008486 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008487 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008488 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008489 OpenBSD*)
8490 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8491 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008492 LDSHARED='$(CC) -shared $(CCSHARED)'
8493 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008494 else
8495 case `uname -r` in
8496 [01].* | 2.[0-7] | 2.[0-7].*)
8497 LDSHARED="ld -Bshareable ${LDFLAGS}"
8498 ;;
8499 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008500 LDSHARED='$(CC) -shared $(CCSHARED)'
8501 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008502 ;;
8503 esac
8504 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008505 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008506 LDSHARED='$(CC) -shared'
8507 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008508 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008509 if test "$GCC" = "yes" ; then
8510 LDSHARED='$(CC) -shared'
8511 LDCXXSHARED='$(CXX) -shared'
8512 else
8513 LDSHARED='$(CC) -G'
8514 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008515 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008516 SCO_SV*)
8517 LDSHARED='$(CC) -Wl,-G,-Bexport'
8518 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8519 CYGWIN*)
8520 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8521 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008522 *) LDSHARED="ld";;
8523 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: $LDSHARED" >&5
8526$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008527LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008528BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008529# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008530# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8532$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008533if test -z "$CCSHARED"
8534then
Guido van Rossum07397971997-04-29 21:49:50 +00008535 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008536 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008537 then CCSHARED="-fPIC";
8538 elif test `uname -p` = sparc;
8539 then CCSHARED="-xcode=pic32";
8540 else CCSHARED="-Kpic";
8541 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008542 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008543 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008544 else CCSHARED="+z";
8545 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008546 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008547 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008548 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008549 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008550 if test "$GCC" = "yes"
8551 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008552 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008553 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008554 SCO_SV*)
8555 if test "$GCC" = "yes"
8556 then CCSHARED="-fPIC"
8557 else CCSHARED="-Kpic -belf"
8558 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008559 IRIX*/6*) case $CC in
8560 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008561 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008562 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008563 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8566$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008567# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008568# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8570$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008571if test -z "$LINKFORSHARED"
8572then
Guido van Rossum07397971997-04-29 21:49:50 +00008573 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008574 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008575 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008576 LINKFORSHARED="-Wl,-E -Wl,+s";;
8577# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008578 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008579 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008580 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008581 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008582 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008583 if test "$enable_framework"
8584 then
Jack Jansenda49e192005-01-07 13:08:22 +00008585 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008586 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008587 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008588 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008589 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008590 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008591 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008592 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8593 then
8594 LINKFORSHARED="-Wl,--export-dynamic"
8595 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008596 SunOS/5*) case $CC in
8597 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008598 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008599 then
8600 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008601 fi;;
8602 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008603 CYGWIN*)
8604 if test $enable_shared = "no"
8605 then
8606 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8607 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008608 QNX*)
8609 # -Wl,-E causes the symbols to be added to the dynamic
8610 # symbol table so that they can be found when a module
8611 # is loaded. -N 2048K causes the stack size to be set
8612 # to 2048 kilobytes so that the stack doesn't overflow
8613 # when running test_compile.py.
8614 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008615 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8618$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008619
Michael W. Hudson54241132001-12-07 15:38:26 +00008620
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008621
Matthias Kloseb9621712010-04-24 17:59:49 +00008622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8623$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008624if test ! "$LIBRARY" = "$LDLIBRARY"
8625then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008626 case $ac_sys_system in
8627 CYGWIN*)
8628 # Cygwin needs CCSHARED when building extension DLLs
8629 # but not when building the interpreter DLL.
8630 CFLAGSFORSHARED='';;
8631 *)
8632 CFLAGSFORSHARED='$(CCSHARED)'
8633 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008634fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8636$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008637
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008638# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8639# library (with --enable-shared).
8640# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008641# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8642# if it is not required, since it creates a dependency of the shared library
8643# to LIBS. This, in turn, means that applications linking the shared libpython
8644# don't need to link LIBS explicitly. The default should be only changed
8645# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008646
Matthias Kloseb9621712010-04-24 17:59:49 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8648$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008649case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008650 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008651 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008652esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8654$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008655
8656
Guido van Rossum627b2d71993-12-24 10:39:16 +00008657# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8659$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008660if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008661 $as_echo_n "(cached) " >&6
8662else
8663 ac_check_lib_save_LIBS=$LIBS
8664LIBS="-lsendfile $LIBS"
8665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8666/* end confdefs.h. */
8667
8668/* Override any GCC internal prototype to avoid an error.
8669 Use char because int might match the return type of a GCC
8670 builtin and then its argument prototype would still apply. */
8671#ifdef __cplusplus
8672extern "C"
8673#endif
8674char sendfile ();
8675int
8676main ()
8677{
8678return sendfile ();
8679 ;
8680 return 0;
8681}
8682_ACEOF
8683if ac_fn_c_try_link "$LINENO"; then :
8684 ac_cv_lib_sendfile_sendfile=yes
8685else
8686 ac_cv_lib_sendfile_sendfile=no
8687fi
8688rm -f core conftest.err conftest.$ac_objext \
8689 conftest$ac_exeext conftest.$ac_ext
8690LIBS=$ac_check_lib_save_LIBS
8691fi
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8693$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008694if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008695 cat >>confdefs.h <<_ACEOF
8696#define HAVE_LIBSENDFILE 1
8697_ACEOF
8698
8699 LIBS="-lsendfile $LIBS"
8700
8701fi
8702
Matthias Kloseb9621712010-04-24 17:59:49 +00008703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8704$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008705if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008706 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008707else
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008709LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008713/* Override any GCC internal prototype to avoid an error.
8714 Use char because int might match the return type of a GCC
8715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008716#ifdef __cplusplus
8717extern "C"
8718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008719char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008720int
8721main ()
8722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ;
8725 return 0;
8726}
8727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008728if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008730else
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008733rm -f core conftest.err conftest.$ac_objext \
8734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008735LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8738$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008739if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008740 cat >>confdefs.h <<_ACEOF
8741#define HAVE_LIBDL 1
8742_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008743
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008744 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008745
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008746fi
8747 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8749$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008750if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008752else
Martin v. Löwis11437992002-04-12 09:54:03 +00008753 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008754LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008758/* Override any GCC internal prototype to avoid an error.
8759 Use char because int might match the return type of a GCC
8760 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008761#ifdef __cplusplus
8762extern "C"
8763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008764char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008765int
8766main ()
8767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008768return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 ;
8770 return 0;
8771}
8772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008773if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008778rm -f core conftest.err conftest.$ac_objext \
8779 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008780LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8783$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008784if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008785 cat >>confdefs.h <<_ACEOF
8786#define HAVE_LIBDLD 1
8787_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008788
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008789 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008790
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008791fi
8792 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008793
Georg Brandlb1441c72009-01-03 22:33:39 +00008794# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008795if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8797$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008798if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008800else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008801 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008805/* Override any GCC internal prototype to avoid an error.
8806 Use char because int might match the return type of a GCC
8807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008808#ifdef __cplusplus
8809extern "C"
8810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008811char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008812int
8813main ()
8814{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 ;
8817 return 0;
8818}
8819_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008820for ac_lib in '' pthread rt posix4; do
8821 if test -z "$ac_lib"; then
8822 ac_res="none required"
8823 else
8824 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008825 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008828 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008830rm -f core conftest.err conftest.$ac_objext \
8831 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008832 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835done
Victor Stinnere0be4232011-10-25 13:06:09 +02008836if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008838else
8839 ac_cv_search_sem_init=no
8840fi
8841rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008842LIBS=$ac_func_search_save_LIBS
8843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8845$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008846ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008847if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008848 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008849
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008850fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008851 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008852 # posix4 on Solaris 2.6
8853 # pthread (first!) on Linux
8854fi
8855
Martin v. Löwis19d17342003-06-14 21:03:05 +00008856# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8858$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008859if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008861else
8862 ac_check_lib_save_LIBS=$LIBS
8863LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008865/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008867/* Override any GCC internal prototype to avoid an error.
8868 Use char because int might match the return type of a GCC
8869 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008870#ifdef __cplusplus
8871extern "C"
8872#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008873char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008874int
8875main ()
8876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008877return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008878 ;
8879 return 0;
8880}
8881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008882if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008883 ac_cv_lib_intl_textdomain=yes
8884else
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008887rm -f core conftest.err conftest.$ac_objext \
8888 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008889LIBS=$ac_check_lib_save_LIBS
8890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8892$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008893if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008894
Matthias Kloseb9621712010-04-24 17:59:49 +00008895$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008896
Brett Cannonc6d936e2009-06-07 20:09:53 +00008897 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008898fi
8899
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008900
8901# checks for system dependent C++ extensions support
8902case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8904$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008906/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008907
Georg Brandl59e87bd2011-02-15 19:48:59 +00008908 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008909int
8910main ()
8911{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008912loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008913 ;
8914 return 0;
8915}
Matthias Kloseb159a552010-04-25 21:00:44 +00008916
Martin v. Löwis11437992002-04-12 09:54:03 +00008917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008918if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008919
Matthias Kloseb159a552010-04-25 21:00:44 +00008920
Matthias Kloseb9621712010-04-24 17:59:49 +00008921$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008922
Matthias Kloseb159a552010-04-25 21:00:44 +00008923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008924$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008925
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008926else
Matthias Kloseb159a552010-04-25 21:00:44 +00008927
8928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008929$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008930
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008932rm -f core conftest.err conftest.$ac_objext \
8933 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008934 *) ;;
8935esac
8936
Guido van Rossum70c7f481998-03-26 18:44:10 +00008937# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8939$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008940if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +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="-lnsl $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 t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008955int
8956main ()
8957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008958return t_open ();
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_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008965else
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +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 Rossum79dddcb1995-01-12 12:25:42 +00008971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8973$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008974if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008975 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008976fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008977 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8979$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008980if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008982else
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008984LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988/* Override any GCC internal prototype to avoid an error.
8989 Use char because int might match the return type of a GCC
8990 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008991#ifdef __cplusplus
8992extern "C"
8993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008994char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008995int
8996main ()
8997{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008999 ;
9000 return 0;
9001}
9002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009003if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009005else
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009007fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009008rm -f core conftest.err conftest.$ac_objext \
9009 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009010LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9013$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009014if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009015 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009016fi
9017 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009018
Matthias Kloseb9621712010-04-24 17:59:49 +00009019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9020$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009023if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009024 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9026$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009027LIBS="$withval $LIBS"
9028
9029else
Matthias Kloseb9621712010-04-24 17:59:49 +00009030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9031$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009032fi
9033
Guido van Rossum7f43da71994-08-01 12:15:30 +00009034
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009035if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009036 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9037set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9039$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009040if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009041 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009042else
9043 case $PKG_CONFIG in
9044 [\\/]* | ?:[\\/]*)
9045 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9046 ;;
9047 *)
9048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9049for as_dir in $PATH
9050do
9051 IFS=$as_save_IFS
9052 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009055 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009057 break 2
9058 fi
9059done
Matthias Kloseb9621712010-04-24 17:59:49 +00009060 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009061IFS=$as_save_IFS
9062
9063 ;;
9064esac
9065fi
9066PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9067if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9069$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009070else
Matthias Kloseb9621712010-04-24 17:59:49 +00009071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9072$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009073fi
9074
9075
9076fi
9077if test -z "$ac_cv_path_PKG_CONFIG"; then
9078 ac_pt_PKG_CONFIG=$PKG_CONFIG
9079 # Extract the first word of "pkg-config", so it can be a program name with args.
9080set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9082$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009083if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009084 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009085else
9086 case $ac_pt_PKG_CONFIG in
9087 [\\/]* | ?:[\\/]*)
9088 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9089 ;;
9090 *)
9091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9092for as_dir in $PATH
9093do
9094 IFS=$as_save_IFS
9095 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009098 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009100 break 2
9101 fi
9102done
Matthias Kloseb9621712010-04-24 17:59:49 +00009103 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009104IFS=$as_save_IFS
9105
9106 ;;
9107esac
9108fi
9109ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9110if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9112$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009113else
Matthias Kloseb9621712010-04-24 17:59:49 +00009114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9115$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009116fi
9117
9118 if test "x$ac_pt_PKG_CONFIG" = x; then
9119 PKG_CONFIG=""
9120 else
9121 case $cross_compiling:$ac_tool_warned in
9122yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009123{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9124$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009125ac_tool_warned=yes ;;
9126esac
9127 PKG_CONFIG=$ac_pt_PKG_CONFIG
9128 fi
9129else
9130 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9131fi
9132
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009133
9134# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9136$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009137
9138# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009139if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009140 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009141else
9142 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009143fi
9144
9145
Matthias Kloseb9621712010-04-24 17:59:49 +00009146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9147$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009148
9149# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9151$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009152
9153# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009154if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009155 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009156else
9157 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009158fi
9159
9160
9161if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009162 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9163else
9164 LIBFFI_INCLUDEDIR=""
9165fi
9166
9167
Matthias Kloseb9621712010-04-24 17:59:49 +00009168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9169$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009170
Stefan Krah60187b52012-03-23 19:06:27 +01009171# Check for use of the system libmpdec library
9172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9173$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9174
9175# Check whether --with-system_libmpdec was given.
9176if test "${with_system_libmpdec+set}" = set; then :
9177 withval=$with_system_libmpdec;
9178else
9179 with_system_libmpdec="no"
9180fi
9181
9182
9183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9184$as_echo "$with_system_libmpdec" >&6; }
9185
Benjamin Peterson076ed002010-10-31 17:11:02 +00009186# Check for support for loadable sqlite extensions
9187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9188$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9189# Check whether --enable-loadable-sqlite-extensions was given.
9190if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9191 enableval=$enable_loadable_sqlite_extensions;
9192else
9193 enable_loadable_sqlite_extensions="no"
9194fi
9195
9196
9197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9198$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9199
Matthias Klose55708cc2009-04-30 08:06:49 +00009200# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9202$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009203
9204# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009205if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009206 withval=$with_dbmliborder;
9207if test x$with_dbmliborder = xyes
9208then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009209as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009210else
9211 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9212 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9213 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009214 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009215 fi
9216 done
9217fi
9218fi
9219
Matthias Kloseb9621712010-04-24 17:59:49 +00009220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9221$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009222
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009223# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009224
9225
Matthias Kloseb9621712010-04-24 17:59:49 +00009226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9227$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009229# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009230if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009231 withval=$with_signal_module;
9232fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009233
9234
9235if test -z "$with_signal_module"
9236then with_signal_module="yes"
9237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9239$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009240
9241if test "${with_signal_module}" = "yes"; then
9242 USE_SIGNAL_MODULE=""
9243 SIGNAL_OBJS=""
9244else
9245 USE_SIGNAL_MODULE="#"
9246 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9247fi
9248
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009249# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009250
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009251USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009253
Martin v. Löwis11437992002-04-12 09:54:03 +00009254
9255# Templates for things AC_DEFINEd more than once.
9256# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009257
9258
Martin v. Löwis11437992002-04-12 09:54:03 +00009259
Matthias Kloseb9621712010-04-24 17:59:49 +00009260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9261$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009262
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009263# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009264if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009265 withval=$with_threads;
9266fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009267
9268
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009269# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009272if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009273 withval=$with_thread; with_threads=$with_thread
9274fi
9275
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009276
9277if test -z "$with_threads"
9278then with_threads="yes"
9279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9281$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009282
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009283
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009284if test "$with_threads" = "no"
9285then
9286 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009287elif test "$ac_cv_pthread_is_default" = yes
9288then
Matthias Kloseb9621712010-04-24 17:59:49 +00009289 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009290
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009291 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009292 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009293
9294 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009295 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009296elif test "$ac_cv_kpthread" = "yes"
9297then
9298 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009299 if test "$ac_cv_cxx_thread" = "yes"; then
9300 CXX="$CXX -Kpthread"
9301 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009302 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009303
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009304 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009305 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009306elif test "$ac_cv_kthread" = "yes"
9307then
9308 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009309 if test "$ac_cv_cxx_thread" = "yes"; then
9310 CXX="$CXX -Kthread"
9311 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009312 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009313
9314 posix_threads=yes
9315 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009316elif test "$ac_cv_pthread" = "yes"
9317then
9318 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009319 if test "$ac_cv_cxx_thread" = "yes"; then
9320 CXX="$CXX -pthread"
9321 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009322 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009323
9324 posix_threads=yes
9325 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009326else
9327 if test ! -z "$with_threads" -a -d "$with_threads"
9328 then LDFLAGS="$LDFLAGS -L$with_threads"
9329 fi
9330 if test ! -z "$withval" -a -d "$withval"
9331 then LDFLAGS="$LDFLAGS -L$withval"
9332 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009333
9334 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009335 # define _POSIX_THREADS in unistd.h. Some apparently don't
9336 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9338$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009340/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009341
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009342#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009343#ifdef _POSIX_THREADS
9344yes
9345#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009346
9347_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009349 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009350 unistd_defines_pthreads=yes
9351else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009352 unistd_defines_pthreads=no
9353fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009354rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009355
Matthias Kloseb9621712010-04-24 17:59:49 +00009356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9357$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009358
Matthias Kloseb9621712010-04-24 17:59:49 +00009359 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009360
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009361 # Just looking for pthread_create in libpthread is not enough:
9362 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9363 # So we really have to include pthread.h, and then link.
9364 _libs=$LIBS
9365 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9367$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009369/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009370
9371#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009372#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009373
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009374void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009375int
9376main ()
9377{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009378
9379pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009380 ;
9381 return 0;
9382}
9383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009384if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009385
Matthias Kloseb9621712010-04-24 17:59:49 +00009386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9387$as_echo "yes" >&6; }
9388 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009389
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009390 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009391 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009392else
Martin v. Löwis11437992002-04-12 09:54:03 +00009393
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009394 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009395 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009396if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009397 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009398
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009399 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009400 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009401else
Guido van Rossumad678af1998-10-02 14:42:15 +00009402
Matthias Kloseb9621712010-04-24 17:59:49 +00009403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9404$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009405if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009406 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009407else
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009409LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009413/* Override any GCC internal prototype to avoid an error.
9414 Use char because int might match the return type of a GCC
9415 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009416#ifdef __cplusplus
9417extern "C"
9418#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009419char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009420int
9421main ()
9422{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009423return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009424 ;
9425 return 0;
9426}
9427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009428if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009429 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009430else
Matthias Kloseb9621712010-04-24 17:59:49 +00009431 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009433rm -f core conftest.err conftest.$ac_objext \
9434 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009435LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9438$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009439if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009440 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009441
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009442 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009443 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009444 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009445else
Greg Steinadf63d62000-07-05 10:38:09 +00009446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9448$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009449if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009450 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009451else
Martin v. Löwis11437992002-04-12 09:54:03 +00009452 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009453LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009457/* Override any GCC internal prototype to avoid an error.
9458 Use char because int might match the return type of a GCC
9459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009460#ifdef __cplusplus
9461extern "C"
9462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009463char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009464int
9465main ()
9466{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ;
9469 return 0;
9470}
9471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009472if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009474else
Matthias Kloseb9621712010-04-24 17:59:49 +00009475 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009477rm -f core conftest.err conftest.$ac_objext \
9478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009479LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9482$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009483if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009484 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009485
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009486 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009487 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009488 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009489else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009490
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9492$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009493if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009495else
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009497LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009501/* Override any GCC internal prototype to avoid an error.
9502 Use char because int might match the return type of a GCC
9503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009504#ifdef __cplusplus
9505extern "C"
9506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009507char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009508int
9509main ()
9510{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 ;
9513 return 0;
9514}
9515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009516if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009518else
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009521rm -f core conftest.err conftest.$ac_objext \
9522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009523LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9526$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009527if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009528 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009529
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009530 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009531 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009532 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009533else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009534
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9536$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009537if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009538 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009539else
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009541LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009545/* Override any GCC internal prototype to avoid an error.
9546 Use char because int might match the return type of a GCC
9547 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009548#ifdef __cplusplus
9549extern "C"
9550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009551char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009552int
9553main ()
9554{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009555return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009556 ;
9557 return 0;
9558}
9559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009560if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009562else
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009565rm -f core conftest.err conftest.$ac_objext \
9566 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009567LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9570$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009571if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009572 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009573
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009574 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009575 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009576 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009577else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009578
Martin v. Löwis130fb172001-07-19 11:00:41 +00009579 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009580fi
9581
Guido van Rossum627b2d71993-12-24 10:39:16 +00009582
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009583fi
9584
Guido van Rossum0be3e491997-05-22 20:33:33 +00009585fi
9586
Guido van Rossum49545951997-12-02 19:28:29 +00009587fi
9588
Guido van Rossumb93a8621998-05-07 13:27:32 +00009589fi
9590
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009592rm -f core conftest.err conftest.$ac_objext \
9593 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009594
Matthias Kloseb9621712010-04-24 17:59:49 +00009595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9596$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009597if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009598 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009599else
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009601LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605/* Override any GCC internal prototype to avoid an error.
9606 Use char because int might match the return type of a GCC
9607 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009608#ifdef __cplusplus
9609extern "C"
9610#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009611char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009612int
9613main ()
9614{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009615return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009616 ;
9617 return 0;
9618}
9619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009620if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009621 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009622else
Matthias Kloseb9621712010-04-24 17:59:49 +00009623 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009625rm -f core conftest.err conftest.$ac_objext \
9626 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009627LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9630$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009631if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009632 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009633
Martin v. Löwis130fb172001-07-19 11:00:41 +00009634 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009635 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009636 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009637fi
9638
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009639
Neal Norwitza978ab02002-11-02 16:58:05 +00009640 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9642$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009643if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009644 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009645else
Martin v. Löwis11437992002-04-12 09:54:03 +00009646 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009647LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009650
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651/* Override any GCC internal prototype to avoid an error.
9652 Use char because int might match the return type of a GCC
9653 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009654#ifdef __cplusplus
9655extern "C"
9656#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009657char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009658int
9659main ()
9660{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009661return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 ;
9663 return 0;
9664}
9665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009666if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009668else
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009671rm -f core conftest.err conftest.$ac_objext \
9672 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009673LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9676$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009677if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009678 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009679
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009680 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009681 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009682 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009683fi
9684
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009685 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009686fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009687
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009688if test "$posix_threads" = "yes"; then
9689 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009690
Matthias Kloseb9621712010-04-24 17:59:49 +00009691$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009692
9693 fi
9694
9695 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9696 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009697 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009698$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009699
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009700 ;;
9701 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009702$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009703
9704 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009705 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009706$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009707
9708 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009709 esac
9710
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9712$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009713 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009715else
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009717 ac_cv_pthread_system_supported=no
9718else
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009720/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009721
9722 #include <stdio.h>
9723 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009724 void *foo(void *parm) {
9725 return NULL;
9726 }
9727 main() {
9728 pthread_attr_t attr;
9729 pthread_t id;
9730 if (pthread_attr_init(&attr)) exit(-1);
9731 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9732 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9733 exit(0);
9734 }
9735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009736if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009737 ac_cv_pthread_system_supported=yes
9738else
Matthias Kloseb9621712010-04-24 17:59:49 +00009739 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9742 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009743fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009745
Guido van Rossum627b2d71993-12-24 10:39:16 +00009746fi
9747
Matthias Kloseb9621712010-04-24 17:59:49 +00009748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9749$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009750 if test "$ac_cv_pthread_system_supported" = "yes"; then
9751
Matthias Kloseb9621712010-04-24 17:59:49 +00009752$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009753
9754 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 for ac_func in pthread_sigmask
9756do :
9757 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009758if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009759 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009760#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009761_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009762 case $ac_sys_system in
9763 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009764
Matthias Kloseb9621712010-04-24 17:59:49 +00009765$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009766
9767 ;;
9768 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009769fi
9770done
9771
9772fi
9773
9774
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009775# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009776
Matthias Kloseb9621712010-04-24 17:59:49 +00009777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9778$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009779# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009780if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009782 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9784$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009785 ipv6=no
9786 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9788$as_echo "yes" >&6; }
9789 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009790
9791 ipv6=yes
9792 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009793 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009794else
Martin v. Löwis11437992002-04-12 09:54:03 +00009795
Matthias Kloseb9621712010-04-24 17:59:49 +00009796 if test "$cross_compiling" = yes; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009797
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9799$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009800 ipv6=no
9801
9802else
Matthias Kloseb9621712010-04-24 17:59:49 +00009803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009804/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009805 /* AF_INET6 available check */
9806#include <sys/types.h>
9807#include <sys/socket.h>
9808main()
9809{
9810 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
9811 exit(1);
9812 else
9813 exit(0);
9814}
9815
Martin v. Löwis11437992002-04-12 09:54:03 +00009816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009817if ac_fn_c_try_run "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009818
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9820$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009821 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009822
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823else
Matthias Kloseb159a552010-04-25 21:00:44 +00009824
Matthias Kloseb9621712010-04-24 17:59:49 +00009825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9826$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009827 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009828
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009830rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9831 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009832fi
9833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009835if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9837$as_echo_n "checking if RFC2553 API is available... " >&6; }
9838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009839/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009840
9841 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009842#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009843int
9844main ()
9845{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009846struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009847 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ;
9849 return 0;
9850}
Matthias Kloseb159a552010-04-25 21:00:44 +00009851
Martin v. Löwis11437992002-04-12 09:54:03 +00009852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009854
9855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009856$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009857 ipv6=yes
9858
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009859else
Matthias Kloseb159a552010-04-25 21:00:44 +00009860
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009862$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009863 ipv6=no
9864
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009867fi
9868
9869if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009870 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009871
9872fi
9873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874fi
9875
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009876
9877ipv6type=unknown
9878ipv6lib=none
9879ipv6trylibc=no
9880
9881if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9883$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009884 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9885 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009886 case $i in
9887 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009889/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009890
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009891#include <netinet/in.h>
9892#ifdef IPV6_INRIA_VERSION
9893yes
9894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009895_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009897 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009898 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009899fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009900rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009901
9902 ;;
9903 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009905/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009906
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009907#include <netinet/in.h>
9908#ifdef __KAME__
9909yes
9910#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009911_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009914 ipv6type=$i;
9915 ipv6lib=inet6
9916 ipv6libdir=/usr/local/v6/lib
9917 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009918fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009919rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009920
9921 ;;
9922 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009924/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009925
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009926#include <features.h>
9927#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9928yes
9929#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009930_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009933 ipv6type=$i;
9934 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009935fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009936rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009937
9938 ;;
9939 linux-inet6)
9940 if test -d /usr/inet6; then
9941 ipv6type=$i
9942 ipv6lib=inet6
9943 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009944 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009945 fi
9946 ;;
9947 solaris)
9948 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009949 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009950 ipv6type=$i
9951 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009952 fi
9953 fi
9954 ;;
9955 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009957/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009958
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009959#include <sys/param.h>
9960#ifdef _TOSHIBA_INET6
9961yes
9962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009963_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009965 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009966 ipv6type=$i;
9967 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009968 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009969fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009970rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009971
9972 ;;
9973 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009975/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009976
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009977#include </usr/local/v6/include/sys/v6config.h>
9978#ifdef __V6D__
9979yes
9980#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009981_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009984 ipv6type=$i;
9985 ipv6lib=v6;
9986 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009987 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009988fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009989rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009990
9991 ;;
9992 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009996#include <sys/param.h>
9997#ifdef _ZETA_MINAMI_INET6
9998yes
9999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010002 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010003 ipv6type=$i;
10004 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010005 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010006fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010007rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010008
10009 ;;
10010 esac
10011 if test "$ipv6type" != "unknown"; then
10012 break
10013 fi
10014 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10016$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010017fi
10018
10019if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10020 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10021 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10022 echo "using lib$ipv6lib"
10023 else
10024 if test $ipv6trylibc = "yes"; then
10025 echo "using libc"
10026 else
10027 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10028 echo "You need to fetch lib$ipv6lib.a from appropriate"
10029 echo 'ipv6 kit and compile beforehand.'
10030 exit 1
10031 fi
10032 fi
10033fi
10034
Matthias Kloseb9621712010-04-24 17:59:49 +000010035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10036$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010038/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010039
10040 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010041int
10042main ()
10043{
10044FSIORefNum fRef = 0
10045 ;
10046 return 0;
10047}
Matthias Kloseb159a552010-04-25 21:00:44 +000010048
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010050if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010051
Matthias Kloseb159a552010-04-25 21:00:44 +000010052
Matthias Kloseb9621712010-04-24 17:59:49 +000010053$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010054
Matthias Kloseb9621712010-04-24 17:59:49 +000010055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10056$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010057
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010058else
Matthias Kloseb159a552010-04-25 21:00:44 +000010059
Matthias Kloseb9621712010-04-24 17:59:49 +000010060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10061$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010062
10063fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10065
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010066# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10068$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010069
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010071if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010072 withval=$with_doc_strings;
10073fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010074
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010075
10076if test -z "$with_doc_strings"
10077then with_doc_strings="yes"
10078fi
10079if test "$with_doc_strings" != "no"
10080then
10081
Matthias Kloseb9621712010-04-24 17:59:49 +000010082$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010083
10084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10086$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010087
Antoine Pitrou042b1282010-08-13 21:15:58 +000010088# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10090$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010093if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010095if test "$withval" != no
10096then
10097
Matthias Kloseb9621712010-04-24 17:59:49 +000010098$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010099
Matthias Kloseb9621712010-04-24 17:59:49 +000010100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10101$as_echo "yes" >&6; }
10102else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10103$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010104fi
10105else
Matthias Kloseb9621712010-04-24 17:59:49 +000010106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10107$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108fi
10109
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010110
10111# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10113$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010115# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010116if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117 withval=$with_pymalloc;
10118fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010119
Neil Schemenauera35c6882001-02-27 04:45:05 +000010120
Neil Schemenauer16c22972002-03-22 15:34:49 +000010121if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010122then
10123 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010124fi
10125if test "$with_pymalloc" != "no"
10126then
Martin v. Löwis11437992002-04-12 09:54:03 +000010127
Matthias Kloseb9621712010-04-24 17:59:49 +000010128$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010129
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010130 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10133$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010134
Benjamin Peterson05159c42009-12-03 03:01:27 +000010135# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10137$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010138
10139# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010140if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010141 withval=$with_valgrind;
10142else
10143 with_valgrind=no
10144fi
10145
Matthias Kloseb9621712010-04-24 17:59:49 +000010146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10147$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010148if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010149 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 +020010150if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010151
Matthias Kloseb9621712010-04-24 17:59:49 +000010152$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010153
10154else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010155 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010156
10157fi
10158
10159
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010160 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010161fi
10162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010163# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010164
Guido van Rossum98935bf2001-09-05 19:13:16 +000010165DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010166
Guido van Rossume97ee181999-12-20 21:27:22 +000010167# the dlopen() function means we might want to use dynload_shlib.o. some
10168# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010169for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010170do :
10171 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010172if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010174#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010175_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010176
Guido van Rossume97ee181999-12-20 21:27:22 +000010177fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010178done
Guido van Rossume97ee181999-12-20 21:27:22 +000010179
Michael W. Hudson54241132001-12-07 15:38:26 +000010180
Guido van Rossume97ee181999-12-20 21:27:22 +000010181# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10182# loading of modules.
10183
Matthias Kloseb9621712010-04-24 17:59:49 +000010184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10185$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010186if test -z "$DYNLOADFILE"
10187then
10188 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010189 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10190 if test "$ac_cv_func_dlopen" = yes
10191 then DYNLOADFILE="dynload_shlib.o"
10192 else DYNLOADFILE="dynload_aix.o"
10193 fi
10194 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010195 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010196 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10197 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010198 *)
10199 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10200 # out any dynamic loading
10201 if test "$ac_cv_func_dlopen" = yes
10202 then DYNLOADFILE="dynload_shlib.o"
10203 else DYNLOADFILE="dynload_stub.o"
10204 fi
10205 ;;
10206 esac
10207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10209$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010210if test "$DYNLOADFILE" != "dynload_stub.o"
10211then
Martin v. Löwis11437992002-04-12 09:54:03 +000010212
Matthias Kloseb9621712010-04-24 17:59:49 +000010213$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010214
10215fi
10216
Neil Schemenauer4e425612001-06-19 15:44:15 +000010217# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10218
Michael W. Hudson54241132001-12-07 15:38:26 +000010219
Matthias Kloseb9621712010-04-24 17:59:49 +000010220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10221$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010222if test -z "$MACHDEP_OBJS"
10223then
Jack Jansene578a632001-08-15 01:27:14 +000010224 MACHDEP_OBJS=$extra_machdep_objs
10225else
10226 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010227fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010228if test -z "$MACHDEP_OBJS"; then
10229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10230$as_echo "none" >&6; }
10231else
10232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10233$as_echo "$MACHDEP_OBJS" >&6; }
10234fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010235
Guido van Rossum627b2d71993-12-24 10:39:16 +000010236# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010237for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010238 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010239 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010240 futimens futimes gai_strerror \
10241 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010242 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010243 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010244 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10245 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010246 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010247 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010248 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010249 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010250 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010251 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010252 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10253 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010254 sigaction sigaltstack siginterrupt sigpending sigrelse \
10255 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010256 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010257 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10258 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010259do :
10260 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10261ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010262if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010264#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010265_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010266
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010267fi
10268done
10269
Michael W. Hudson54241132001-12-07 15:38:26 +000010270
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010271ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10272 #include <dirent.h>
10273"
10274if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10275
10276$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10277
10278fi
10279
10280
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010281# For some functions, having a definition is not sufficient, since
10282# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10284$as_echo_n "checking for chroot... " >&6; }
10285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010286/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010287#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010288int
10289main ()
10290{
10291void *x=chroot
10292 ;
10293 return 0;
10294}
10295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010297
Matthias Kloseb9621712010-04-24 17:59:49 +000010298$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010299
Matthias Kloseb159a552010-04-25 21:00:44 +000010300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010301$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010302else
Matthias Kloseb9621712010-04-24 17:59:49 +000010303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010305
10306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10309$as_echo_n "checking for link... " >&6; }
10310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010311/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010312#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010313int
10314main ()
10315{
10316void *x=link
10317 ;
10318 return 0;
10319}
10320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010322
Matthias Kloseb9621712010-04-24 17:59:49 +000010323$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010324
Matthias Kloseb159a552010-04-25 21:00:44 +000010325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010326$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010327else
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010330
10331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10334$as_echo_n "checking for symlink... " >&6; }
10335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010337#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010338int
10339main ()
10340{
10341void *x=symlink
10342 ;
10343 return 0;
10344}
10345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010349
Matthias Kloseb159a552010-04-25 21:00:44 +000010350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010351$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010352else
Matthias Kloseb9621712010-04-24 17:59:49 +000010353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10354$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010355
10356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10359$as_echo_n "checking for fchdir... " >&6; }
10360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010361/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010362#include <unistd.h>
10363int
10364main ()
10365{
10366void *x=fchdir
10367 ;
10368 return 0;
10369}
10370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010372
Matthias Kloseb9621712010-04-24 17:59:49 +000010373$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010374
Matthias Kloseb159a552010-04-25 21:00:44 +000010375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010376$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010377else
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10379$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010380
10381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10384$as_echo_n "checking for fsync... " >&6; }
10385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010386/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010387#include <unistd.h>
10388int
10389main ()
10390{
10391void *x=fsync
10392 ;
10393 return 0;
10394}
10395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010397
Matthias Kloseb9621712010-04-24 17:59:49 +000010398$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010399
Matthias Kloseb159a552010-04-25 21:00:44 +000010400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010401$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010402else
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10404$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010405
10406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10409$as_echo_n "checking for fdatasync... " >&6; }
10410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010411/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010412#include <unistd.h>
10413int
10414main ()
10415{
10416void *x=fdatasync
10417 ;
10418 return 0;
10419}
10420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010422
Matthias Kloseb9621712010-04-24 17:59:49 +000010423$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010424
Matthias Kloseb159a552010-04-25 21:00:44 +000010425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010426$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010427else
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10429$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010430
10431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10434$as_echo_n "checking for epoll... " >&6; }
10435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010436/* end confdefs.h. */
10437#include <sys/epoll.h>
10438int
10439main ()
10440{
10441void *x=epoll_create
10442 ;
10443 return 0;
10444}
10445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010446if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010447
Matthias Kloseb9621712010-04-24 17:59:49 +000010448$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010449
Matthias Kloseb159a552010-04-25 21:00:44 +000010450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010451$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010452else
Matthias Kloseb9621712010-04-24 17:59:49 +000010453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10454$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010455
10456fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10459$as_echo_n "checking for epoll_create1... " >&6; }
10460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10461/* end confdefs.h. */
10462#include <sys/epoll.h>
10463int
10464main ()
10465{
10466void *x=epoll_create1
10467 ;
10468 return 0;
10469}
10470_ACEOF
10471if ac_fn_c_try_compile "$LINENO"; then :
10472
10473$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10474
10475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10476$as_echo "yes" >&6; }
10477else
10478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10479$as_echo "no" >&6; }
10480
10481fi
10482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10484$as_echo_n "checking for kqueue... " >&6; }
10485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010486/* end confdefs.h. */
10487
10488#include <sys/types.h>
10489#include <sys/event.h>
10490
10491int
10492main ()
10493{
10494int x=kqueue()
10495 ;
10496 return 0;
10497}
10498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010499if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010500
Matthias Kloseb9621712010-04-24 17:59:49 +000010501$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010502
Matthias Kloseb159a552010-04-25 21:00:44 +000010503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010504$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010505else
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10507$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010508
10509fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010511# On some systems (eg. FreeBSD 5), we would find a definition of the
10512# functions ctermid_r, setgroups in the library, but no prototype
10513# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10514# address to avoid compiler warnings and potential miscompilations
10515# because of the missing prototypes.
10516
Matthias Kloseb9621712010-04-24 17:59:49 +000010517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10518$as_echo_n "checking for ctermid_r... " >&6; }
10519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010520/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010521
Martin v. Löwisd5843682002-11-21 20:41:28 +000010522#include <stdio.h>
10523
Martin v. Löwisd5843682002-11-21 20:41:28 +000010524int
10525main ()
10526{
10527void* p = ctermid_r
10528 ;
10529 return 0;
10530}
10531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010532if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010533
Matthias Kloseb9621712010-04-24 17:59:49 +000010534$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010535
Matthias Kloseb159a552010-04-25 21:00:44 +000010536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010537$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010538else
Matthias Kloseb9621712010-04-24 17:59:49 +000010539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10540$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010541
10542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10544
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10546$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010547if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010548 $as_echo_n "(cached) " >&6
10549else
10550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010551/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010552#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010553int
10554main ()
10555{
10556void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010557
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010558 ;
10559 return 0;
10560}
10561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010562if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010563 ac_cv_flock_decl=yes
10564else
10565 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010566
10567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010569
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010570fi
10571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10572$as_echo "$ac_cv_flock_decl" >&6; }
10573if test "x${ac_cv_flock_decl}" = xyes; then
10574 for ac_func in flock
10575do :
10576 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010577if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010578 cat >>confdefs.h <<_ACEOF
10579#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010580_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010581
Antoine Pitroua3000072010-09-07 14:52:42 +000010582else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010584$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010585if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010586 $as_echo_n "(cached) " >&6
10587else
10588 ac_check_lib_save_LIBS=$LIBS
10589LIBS="-lbsd $LIBS"
10590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10591/* end confdefs.h. */
10592
10593/* Override any GCC internal prototype to avoid an error.
10594 Use char because int might match the return type of a GCC
10595 builtin and then its argument prototype would still apply. */
10596#ifdef __cplusplus
10597extern "C"
10598#endif
10599char flock ();
10600int
10601main ()
10602{
10603return flock ();
10604 ;
10605 return 0;
10606}
10607_ACEOF
10608if ac_fn_c_try_link "$LINENO"; then :
10609 ac_cv_lib_bsd_flock=yes
10610else
10611 ac_cv_lib_bsd_flock=no
10612fi
10613rm -f core conftest.err conftest.$ac_objext \
10614 conftest$ac_exeext conftest.$ac_ext
10615LIBS=$ac_check_lib_save_LIBS
10616fi
10617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10618$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010619if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010620 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010621
10622
10623$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10624
10625
10626fi
10627
10628
10629fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010630done
10631
Antoine Pitroua3000072010-09-07 14:52:42 +000010632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633
Matthias Kloseb9621712010-04-24 17:59:49 +000010634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10635$as_echo_n "checking for getpagesize... " >&6; }
10636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010637/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010638
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010639#include <unistd.h>
10640
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010641int
10642main ()
10643{
10644void* p = getpagesize
10645 ;
10646 return 0;
10647}
10648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010649if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010650
Matthias Kloseb9621712010-04-24 17:59:49 +000010651$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010652
Matthias Kloseb159a552010-04-25 21:00:44 +000010653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010654$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010655else
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010658
10659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010661
Victor Stinner984890f2011-11-24 13:53:38 +010010662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10663$as_echo_n "checking for broken unsetenv... " >&6; }
10664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10665/* end confdefs.h. */
10666
10667#include <stdlib.h>
10668
10669int
10670main ()
10671{
10672int res = unsetenv("DUMMY")
10673 ;
10674 return 0;
10675}
10676_ACEOF
10677if ac_fn_c_try_compile "$LINENO"; then :
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10679$as_echo "no" >&6; }
10680else
10681
10682$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10683
10684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10685$as_echo "yes" >&6; }
10686
10687fi
10688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10689
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010690for ac_prog in true
10691do
10692 # Extract the first word of "$ac_prog", so it can be a program name with args.
10693set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10695$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010696if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010698else
10699 if test -n "$TRUE"; then
10700 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10701else
10702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10703for as_dir in $PATH
10704do
10705 IFS=$as_save_IFS
10706 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010709 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010710 $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 +000010711 break 2
10712 fi
10713done
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010716
10717fi
10718fi
10719TRUE=$ac_cv_prog_TRUE
10720if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10722$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010723else
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10725$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010726fi
10727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010728
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010729 test -n "$TRUE" && break
10730done
10731test -n "$TRUE" || TRUE="/bin/true"
10732
10733
Matthias Kloseb9621712010-04-24 17:59:49 +000010734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10735$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010736if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010738else
10739 ac_check_lib_save_LIBS=$LIBS
10740LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010742/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010744/* Override any GCC internal prototype to avoid an error.
10745 Use char because int might match the return type of a GCC
10746 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010747#ifdef __cplusplus
10748extern "C"
10749#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010750char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010751int
10752main ()
10753{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010754return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010755 ;
10756 return 0;
10757}
10758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010759if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010760 ac_cv_lib_c_inet_aton=yes
10761else
Matthias Kloseb9621712010-04-24 17:59:49 +000010762 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010763fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010764rm -f core conftest.err conftest.$ac_objext \
10765 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010766LIBS=$ac_check_lib_save_LIBS
10767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10769$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010770if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010771 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010772else
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10774$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010775if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010777else
10778 ac_check_lib_save_LIBS=$LIBS
10779LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010781/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783/* Override any GCC internal prototype to avoid an error.
10784 Use char because int might match the return type of a GCC
10785 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010786#ifdef __cplusplus
10787extern "C"
10788#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010789char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010790int
10791main ()
10792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010793return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010794 ;
10795 return 0;
10796}
10797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010798if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010799 ac_cv_lib_resolv_inet_aton=yes
10800else
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010803rm -f core conftest.err conftest.$ac_objext \
10804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010805LIBS=$ac_check_lib_save_LIBS
10806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10808$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010809if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010810 cat >>confdefs.h <<_ACEOF
10811#define HAVE_LIBRESOLV 1
10812_ACEOF
10813
10814 LIBS="-lresolv $LIBS"
10815
10816fi
10817
10818
10819fi
10820
10821
Christian Heimesd0764e22007-12-04 15:00:33 +000010822# On Tru64, chflags seems to be present, but calling it will
10823# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10825$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010826if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010827 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010828else
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010830 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010831else
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010833/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010834
Christian Heimesd0764e22007-12-04 15:00:33 +000010835#include <sys/stat.h>
10836#include <unistd.h>
10837int main(int argc, char*argv[])
10838{
10839 if(chflags(argv[0], 0) != 0)
10840 return 1;
10841 return 0;
10842}
Ned Deily3eb67d52011-06-28 00:00:28 -070010843
Christian Heimesd0764e22007-12-04 15:00:33 +000010844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010845if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010846 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010847else
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010852fi
10853
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010854
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10857$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010858if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010859 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010860if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010861 ac_cv_have_chflags="yes"
10862else
10863 ac_cv_have_chflags="no"
10864fi
10865
10866fi
10867if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010868
Matthias Kloseb9621712010-04-24 17:59:49 +000010869$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010870
10871fi
10872
Matthias Kloseb9621712010-04-24 17:59:49 +000010873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10874$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010875if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010877else
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010879 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010880else
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010882/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010883
Christian Heimesd0764e22007-12-04 15:00:33 +000010884#include <sys/stat.h>
10885#include <unistd.h>
10886int main(int argc, char*argv[])
10887{
10888 if(lchflags(argv[0], 0) != 0)
10889 return 1;
10890 return 0;
10891}
Ned Deily3eb67d52011-06-28 00:00:28 -070010892
Christian Heimesd0764e22007-12-04 15:00:33 +000010893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010894if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010895 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010896else
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010899rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10900 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010901fi
10902
10903
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10906$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010907if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010908 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010909if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010910 ac_cv_have_lchflags="yes"
10911else
10912 ac_cv_have_lchflags="no"
10913fi
10914
10915fi
10916if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010919
10920fi
10921
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010922case $ac_sys_system/$ac_sys_release in
10923Darwin/*)
10924 _CUR_CFLAGS="${CFLAGS}"
10925 _CUR_LDFLAGS="${LDFLAGS}"
10926 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10927 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10928 ;;
10929esac
10930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10932$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010933if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010935else
10936 ac_check_lib_save_LIBS=$LIBS
10937LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010939/* end confdefs.h. */
10940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010941/* Override any GCC internal prototype to avoid an error.
10942 Use char because int might match the return type of a GCC
10943 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010944#ifdef __cplusplus
10945extern "C"
10946#endif
10947char inflateCopy ();
10948int
10949main ()
10950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010951return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010952 ;
10953 return 0;
10954}
10955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010956if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010957 ac_cv_lib_z_inflateCopy=yes
10958else
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010961rm -f core conftest.err conftest.$ac_objext \
10962 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010963LIBS=$ac_check_lib_save_LIBS
10964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10966$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010967if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010968
Matthias Kloseb9621712010-04-24 17:59:49 +000010969$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010970
10971fi
10972
10973
10974case $ac_sys_system/$ac_sys_release in
10975Darwin/*)
10976 CFLAGS="${_CUR_CFLAGS}"
10977 LDFLAGS="${_CUR_LDFLAGS}"
10978 ;;
10979esac
10980
Matthias Kloseb9621712010-04-24 17:59:49 +000010981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10982$as_echo_n "checking for hstrerror... " >&6; }
10983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010984/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010985
Martin v. Löwise9416172003-05-03 10:12:45 +000010986#include <netdb.h>
10987
Martin v. Löwise9416172003-05-03 10:12:45 +000010988int
10989main ()
10990{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010991void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010992 ;
10993 return 0;
10994}
10995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010996if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010997
Matthias Kloseb9621712010-04-24 17:59:49 +000010998$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010999
Matthias Kloseb159a552010-04-25 21:00:44 +000011000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011001$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011002else
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11004$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011005
11006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011007rm -f core conftest.err conftest.$ac_objext \
11008 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009
Matthias Kloseb9621712010-04-24 17:59:49 +000011010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11011$as_echo_n "checking for inet_aton... " >&6; }
11012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011013/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011014
Martin v. Löwis86d66262006-02-17 08:40:11 +000011015#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011016#include <sys/socket.h>
11017#include <netinet/in.h>
11018#include <arpa/inet.h>
11019
Martin v. Löwise9416172003-05-03 10:12:45 +000011020int
11021main ()
11022{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011023void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011024 ;
11025 return 0;
11026}
11027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011028if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011029
Matthias Kloseb9621712010-04-24 17:59:49 +000011030$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011031
Matthias Kloseb159a552010-04-25 21:00:44 +000011032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011033$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011034else
Matthias Kloseb9621712010-04-24 17:59:49 +000011035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11036$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011037
11038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011039rm -f core conftest.err conftest.$ac_objext \
11040 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041
Matthias Kloseb9621712010-04-24 17:59:49 +000011042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11043$as_echo_n "checking for inet_pton... " >&6; }
11044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011045/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011046
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011047#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011048#include <sys/socket.h>
11049#include <netinet/in.h>
11050#include <arpa/inet.h>
11051
Martin v. Löwise9416172003-05-03 10:12:45 +000011052int
11053main ()
11054{
11055void* p = inet_pton
11056 ;
11057 return 0;
11058}
11059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011060if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011063
Matthias Kloseb159a552010-04-25 21:00:44 +000011064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011065$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011066else
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11068$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011069
11070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011072
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011073# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11075$as_echo_n "checking for setgroups... " >&6; }
11076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011077/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011078
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011079#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011080#ifdef HAVE_GRP_H
11081#include <grp.h>
11082#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011083
Martin v. Löwisd5843682002-11-21 20:41:28 +000011084int
11085main ()
11086{
11087void* p = setgroups
11088 ;
11089 return 0;
11090}
11091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011092if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011093
Matthias Kloseb9621712010-04-24 17:59:49 +000011094$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011095
Matthias Kloseb159a552010-04-25 21:00:44 +000011096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011097$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011098else
Matthias Kloseb9621712010-04-24 17:59:49 +000011099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11100$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011101
11102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011104
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011105# check for openpty and forkpty
11106
11107for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011108do :
11109 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011110if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011111 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011112#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011113_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011114
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011115else
Matthias Kloseb9621712010-04-24 17:59:49 +000011116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11117$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011118if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011120else
Martin v. Löwis11437992002-04-12 09:54:03 +000011121 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011122LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011125
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öwis11437992002-04-12 09:54:03 +000011129#ifdef __cplusplus
11130extern "C"
11131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011132char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011133int
11134main ()
11135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011136return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000011142 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011143else
Matthias Kloseb9621712010-04-24 17:59:49 +000011144 ac_cv_lib_util_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öwis11437992002-04-12 09:54:03 +000011148LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11151$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011152if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011153 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011154 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011155else
Matthias Kloseb9621712010-04-24 17:59:49 +000011156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11157$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011158if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011159 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011160else
11161 ac_check_lib_save_LIBS=$LIBS
11162LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011164/* end confdefs.h. */
11165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011166/* Override any GCC internal prototype to avoid an error.
11167 Use char because int might match the return type of a GCC
11168 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011169#ifdef __cplusplus
11170extern "C"
11171#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011172char openpty ();
11173int
11174main ()
11175{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011176return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011177 ;
11178 return 0;
11179}
11180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011181if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011182 ac_cv_lib_bsd_openpty=yes
11183else
Matthias Kloseb9621712010-04-24 17:59:49 +000011184 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011186rm -f core conftest.err conftest.$ac_objext \
11187 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011188LIBS=$ac_check_lib_save_LIBS
11189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11191$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011192if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011193 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011194 LIBS="$LIBS -lbsd"
11195fi
11196
11197
11198fi
11199
Fred Drake8cef4cf2000-06-28 16:40:38 +000011200
11201fi
11202done
11203
11204for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011205do :
11206 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011207if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011209#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011210_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011211
Fred Drake8cef4cf2000-06-28 16:40:38 +000011212else
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11214$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011215if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011216 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011217else
Martin v. Löwis11437992002-04-12 09:54:03 +000011218 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011219LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011222
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öwis11437992002-04-12 09:54:03 +000011226#ifdef __cplusplus
11227extern "C"
11228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011229char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011230int
11231main ()
11232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011233return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000011239 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011240else
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 ac_cv_lib_util_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öwis11437992002-04-12 09:54:03 +000011245LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11248$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011249if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011250 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011251 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011252else
Matthias Kloseb9621712010-04-24 17:59:49 +000011253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11254$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011255if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011256 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011257else
11258 ac_check_lib_save_LIBS=$LIBS
11259LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011261/* end confdefs.h. */
11262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011263/* Override any GCC internal prototype to avoid an error.
11264 Use char because int might match the return type of a GCC
11265 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011266#ifdef __cplusplus
11267extern "C"
11268#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011269char forkpty ();
11270int
11271main ()
11272{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011273return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011274 ;
11275 return 0;
11276}
11277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011278if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011279 ac_cv_lib_bsd_forkpty=yes
11280else
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011283rm -f core conftest.err conftest.$ac_objext \
11284 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011285LIBS=$ac_check_lib_save_LIBS
11286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11288$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011289if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011290 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011291 LIBS="$LIBS -lbsd"
11292fi
11293
11294
11295fi
11296
Fred Drake8cef4cf2000-06-28 16:40:38 +000011297
11298fi
11299done
11300
Jack Jansendd19cf82001-12-06 22:36:17 +000011301
Christian Heimesb186d002008-03-18 15:15:01 +000011302# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011303for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011304do :
11305 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011306if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011307 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011308#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011309_ACEOF
11310
11311fi
11312done
11313
11314
Michael W. Hudson54241132001-12-07 15:38:26 +000011315# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011316for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011317do :
11318 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11319ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011320if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011321 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011322#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011323_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011324
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011325fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011326done
11327
Michael W. Hudson54241132001-12-07 15:38:26 +000011328
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011329ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011330if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011331 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011332
Martin v. Löwis1142de32002-03-29 16:28:31 +000011333else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011334 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011335 *" dup2.$ac_objext "* ) ;;
11336 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011337 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011338esac
11339
Martin v. Löwis1142de32002-03-29 16:28:31 +000011340fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011341
11342ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011343if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011344 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11345
11346else
11347 case " $LIBOBJS " in
11348 *" getcwd.$ac_objext "* ) ;;
11349 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11350 ;;
11351esac
11352
11353fi
11354
11355ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011356if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011357 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11358
11359else
11360 case " $LIBOBJS " in
11361 *" strdup.$ac_objext "* ) ;;
11362 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11363 ;;
11364esac
11365
11366fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011367
11368
11369for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011370do :
11371 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011372if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011374#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011377/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011378#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011379int
11380main ()
11381{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011382getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011383 ;
11384 return 0;
11385}
11386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011388
Matthias Kloseb9621712010-04-24 17:59:49 +000011389$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011390
Guido van Rossum627b2d71993-12-24 10:39:16 +000011391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011393
Guido van Rossum627b2d71993-12-24 10:39:16 +000011394fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011395done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011396
Jack Jansen150753c2003-03-29 22:07:47 +000011397for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011398do :
11399 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011400if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011401 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011402#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011405/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011406#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011407int
11408main ()
11409{
11410setpgrp(0,0);
11411 ;
11412 return 0;
11413}
11414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011415if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011416
Matthias Kloseb9621712010-04-24 17:59:49 +000011417$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011418
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011421
11422fi
11423done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011424
Thomas Wouters3a584202000-08-05 23:28:51 +000011425for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011426do :
11427 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011428if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011429 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011430#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011433/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011434#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011435int
11436main ()
11437{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011438gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011439 ;
11440 return 0;
11441}
11442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011443if ac_fn_c_try_compile "$LINENO"; then :
11444
Guido van Rossum627b2d71993-12-24 10:39:16 +000011445else
Skip Montanaro6dead952003-09-25 14:50:04 +000011446
Matthias Kloseb9621712010-04-24 17:59:49 +000011447$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011448
Martin v. Löwis11437992002-04-12 09:54:03 +000011449
Guido van Rossum627b2d71993-12-24 10:39:16 +000011450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011452
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011453fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011454done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011455
Michael W. Hudson54241132001-12-07 15:38:26 +000011456
Victor Stinnere0be4232011-10-25 13:06:09 +020011457for ac_func in clock_gettime
11458do :
11459 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11460if test "x$ac_cv_func_clock_gettime" = xyes; then :
11461 cat >>confdefs.h <<_ACEOF
11462#define HAVE_CLOCK_GETTIME 1
11463_ACEOF
11464
11465else
11466
11467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11468$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11469if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11470 $as_echo_n "(cached) " >&6
11471else
11472 ac_check_lib_save_LIBS=$LIBS
11473LIBS="-lrt $LIBS"
11474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11475/* end confdefs.h. */
11476
11477/* Override any GCC internal prototype to avoid an error.
11478 Use char because int might match the return type of a GCC
11479 builtin and then its argument prototype would still apply. */
11480#ifdef __cplusplus
11481extern "C"
11482#endif
11483char clock_gettime ();
11484int
11485main ()
11486{
11487return clock_gettime ();
11488 ;
11489 return 0;
11490}
11491_ACEOF
11492if ac_fn_c_try_link "$LINENO"; then :
11493 ac_cv_lib_rt_clock_gettime=yes
11494else
11495 ac_cv_lib_rt_clock_gettime=no
11496fi
11497rm -f core conftest.err conftest.$ac_objext \
11498 conftest$ac_exeext conftest.$ac_ext
11499LIBS=$ac_check_lib_save_LIBS
11500fi
11501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11502$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11503if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11504
11505 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11506
11507
11508$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11509
11510
11511fi
11512
11513
11514fi
11515done
11516
11517
11518for ac_func in clock_getres
11519do :
11520 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11521if test "x$ac_cv_func_clock_getres" = xyes; then :
11522 cat >>confdefs.h <<_ACEOF
11523#define HAVE_CLOCK_GETRES 1
11524_ACEOF
11525
11526else
11527
11528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11529$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11530if ${ac_cv_lib_rt_clock_getres+:} false; then :
11531 $as_echo_n "(cached) " >&6
11532else
11533 ac_check_lib_save_LIBS=$LIBS
11534LIBS="-lrt $LIBS"
11535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11536/* end confdefs.h. */
11537
11538/* Override any GCC internal prototype to avoid an error.
11539 Use char because int might match the return type of a GCC
11540 builtin and then its argument prototype would still apply. */
11541#ifdef __cplusplus
11542extern "C"
11543#endif
11544char clock_getres ();
11545int
11546main ()
11547{
11548return clock_getres ();
11549 ;
11550 return 0;
11551}
11552_ACEOF
11553if ac_fn_c_try_link "$LINENO"; then :
11554 ac_cv_lib_rt_clock_getres=yes
11555else
11556 ac_cv_lib_rt_clock_getres=no
11557fi
11558rm -f core conftest.err conftest.$ac_objext \
11559 conftest$ac_exeext conftest.$ac_ext
11560LIBS=$ac_check_lib_save_LIBS
11561fi
11562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11563$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11564if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11565
11566 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11567
11568
11569fi
11570
11571
11572fi
11573done
11574
11575
Matthias Kloseb9621712010-04-24 17:59:49 +000011576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11577$as_echo_n "checking for major... " >&6; }
11578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011579/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011580
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011581#if defined(MAJOR_IN_MKDEV)
11582#include <sys/mkdev.h>
11583#elif defined(MAJOR_IN_SYSMACROS)
11584#include <sys/sysmacros.h>
11585#else
11586#include <sys/types.h>
11587#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011588
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011589int
11590main ()
11591{
11592
11593 makedev(major(0),minor(0));
11594
11595 ;
11596 return 0;
11597}
11598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011599if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011600
11601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011603
Matthias Kloseb9621712010-04-24 17:59:49 +000011604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11605$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011606
11607else
Skip Montanaro6dead952003-09-25 14:50:04 +000011608
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11610$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011611
11612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011613rm -f core conftest.err conftest.$ac_objext \
11614 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011615
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011616# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011617# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11619$as_echo_n "checking for getaddrinfo... " >&6; }
11620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011621/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011622
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011623#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011624#include <sys/socket.h>
11625#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011626#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011627
Martin v. Löwis11437992002-04-12 09:54:03 +000011628int
11629main ()
11630{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011631getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011632 ;
11633 return 0;
11634}
11635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011636if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011637 have_getaddrinfo=yes
11638else
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011641rm -f core conftest.err conftest.$ac_objext \
11642 conftest$ac_exeext conftest.$ac_ext
11643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11644$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011645if test $have_getaddrinfo = yes
11646then
Matthias Kloseb9621712010-04-24 17:59:49 +000011647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11648$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011649 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011650 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011651else
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011653
11654if test "${enable_ipv6+set}" = set; then
11655 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11656else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011657 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011658fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011659else
Matthias Kloseb9621712010-04-24 17:59:49 +000011660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011661/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011662
Stefan Krah19c21392012-11-22 23:47:32 +010011663#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011664#include <sys/types.h>
11665#include <netdb.h>
11666#include <string.h>
11667#include <sys/socket.h>
11668#include <netinet/in.h>
11669
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011670int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011671{
11672 int passive, gaierr, inet4 = 0, inet6 = 0;
11673 struct addrinfo hints, *ai, *aitop;
11674 char straddr[INET6_ADDRSTRLEN], strport[16];
11675
11676 for (passive = 0; passive <= 1; passive++) {
11677 memset(&hints, 0, sizeof(hints));
11678 hints.ai_family = AF_UNSPEC;
11679 hints.ai_flags = passive ? AI_PASSIVE : 0;
11680 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011681 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011682 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11683 (void)gai_strerror(gaierr);
11684 goto bad;
11685 }
11686 for (ai = aitop; ai; ai = ai->ai_next) {
11687 if (ai->ai_addr == NULL ||
11688 ai->ai_addrlen == 0 ||
11689 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11690 straddr, sizeof(straddr), strport, sizeof(strport),
11691 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11692 goto bad;
11693 }
11694 switch (ai->ai_family) {
11695 case AF_INET:
11696 if (strcmp(strport, "54321") != 0) {
11697 goto bad;
11698 }
11699 if (passive) {
11700 if (strcmp(straddr, "0.0.0.0") != 0) {
11701 goto bad;
11702 }
11703 } else {
11704 if (strcmp(straddr, "127.0.0.1") != 0) {
11705 goto bad;
11706 }
11707 }
11708 inet4++;
11709 break;
11710 case AF_INET6:
11711 if (strcmp(strport, "54321") != 0) {
11712 goto bad;
11713 }
11714 if (passive) {
11715 if (strcmp(straddr, "::") != 0) {
11716 goto bad;
11717 }
11718 } else {
11719 if (strcmp(straddr, "::1") != 0) {
11720 goto bad;
11721 }
11722 }
11723 inet6++;
11724 break;
11725 case AF_UNSPEC:
11726 goto bad;
11727 break;
11728 default:
11729 /* another family support? */
11730 break;
11731 }
11732 }
11733 }
11734
11735 if (!(inet4 == 0 || inet4 == 2))
11736 goto bad;
11737 if (!(inet6 == 0 || inet6 == 2))
11738 goto bad;
11739
11740 if (aitop)
11741 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011742 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011743
11744 bad:
11745 if (aitop)
11746 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011747 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011748}
11749
Martin v. Löwis11437992002-04-12 09:54:03 +000011750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011751if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011752 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011753else
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11757 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011759
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011760fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011761
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011763
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11765$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11766
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011767if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011768then
11769 if test $ipv6 = yes
11770 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011771 echo 'Fatal: You must get working getaddrinfo() function.'
11772 echo ' or you can specify "--disable-ipv6"'.
11773 exit 1
11774 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011775else
Martin v. Löwis11437992002-04-12 09:54:03 +000011776
Matthias Kloseb9621712010-04-24 17:59:49 +000011777$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011778
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011779fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011780
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011781for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011782do :
11783 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011784if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011787_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011788
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011789fi
11790done
11791
Michael W. Hudson54241132001-12-07 15:38:26 +000011792
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011793# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11795$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011796if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011797 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011798else
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011800/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011801#include <sys/types.h>
11802#include <sys/time.h>
11803#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011804
Martin v. Löwis11437992002-04-12 09:54:03 +000011805int
11806main ()
11807{
11808if ((struct tm *) 0)
11809return 0;
11810 ;
11811 return 0;
11812}
11813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011814if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011815 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011816else
Matthias Kloseb9621712010-04-24 17:59:49 +000011817 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11822$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011823if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011824
Matthias Kloseb9621712010-04-24 17:59:49 +000011825$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011826
11827fi
11828
Matthias Kloseb9621712010-04-24 17:59:49 +000011829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11830$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011831if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011832 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011833else
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011835/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011836#include <sys/types.h>
11837#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011838
Martin v. Löwis11437992002-04-12 09:54:03 +000011839int
11840main ()
11841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011842struct tm tm;
11843 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011844 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011845 ;
11846 return 0;
11847}
11848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011849if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011850 ac_cv_struct_tm=time.h
11851else
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11857$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011858if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011861
11862fi
11863
Matthias Kloseb9621712010-04-24 17:59:49 +000011864ac_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 +000011865#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011866
Matthias Kloseb9621712010-04-24 17:59:49 +000011867"
Victor Stinnere0be4232011-10-25 13:06:09 +020011868if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011869
11870cat >>confdefs.h <<_ACEOF
11871#define HAVE_STRUCT_TM_TM_ZONE 1
11872_ACEOF
11873
11874
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011875fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011876
Martin v. Löwis11437992002-04-12 09:54:03 +000011877if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11878
Matthias Kloseb9621712010-04-24 17:59:49 +000011879$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011880
11881else
Matthias Kloseb9621712010-04-24 17:59:49 +000011882 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11883"
Victor Stinnere0be4232011-10-25 13:06:09 +020011884if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011885 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011888fi
11889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011890cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011891#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011892_ACEOF
11893
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11895$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011896if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011897 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011900/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011901#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011902#if !HAVE_DECL_TZNAME
11903extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011905
Martin v. Löwis11437992002-04-12 09:54:03 +000011906int
11907main ()
11908{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011909return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011910 ;
11911 return 0;
11912}
11913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011914if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011915 ac_cv_var_tzname=yes
11916else
Matthias Kloseb9621712010-04-24 17:59:49 +000011917 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011919rm -f core conftest.err conftest.$ac_objext \
11920 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011921fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11923$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011924 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011927
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011928 fi
11929fi
11930
Matthias Kloseb9621712010-04-24 17:59:49 +000011931ac_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 +020011932if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011933
11934cat >>confdefs.h <<_ACEOF
11935#define HAVE_STRUCT_STAT_ST_RDEV 1
11936_ACEOF
11937
11938
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011939fi
11940
Matthias Kloseb9621712010-04-24 17:59:49 +000011941ac_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 +020011942if test "x$ac_cv_member_struct_stat_st_blksize" = 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_BLKSIZE 1
11946_ACEOF
11947
11948
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011949fi
11950
Matthias Kloseb9621712010-04-24 17:59:49 +000011951ac_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 +020011952if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011953
11954cat >>confdefs.h <<_ACEOF
11955#define HAVE_STRUCT_STAT_ST_FLAGS 1
11956_ACEOF
11957
11958
11959fi
11960
Matthias Kloseb9621712010-04-24 17:59:49 +000011961ac_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 +020011962if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011963
11964cat >>confdefs.h <<_ACEOF
11965#define HAVE_STRUCT_STAT_ST_GEN 1
11966_ACEOF
11967
11968
11969fi
11970
Matthias Kloseb9621712010-04-24 17:59:49 +000011971ac_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 +020011972if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011973
11974cat >>confdefs.h <<_ACEOF
11975#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11976_ACEOF
11977
11978
11979fi
11980
Matthias Kloseb9621712010-04-24 17:59:49 +000011981ac_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 +020011982if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011983
Martin v. Löwis11437992002-04-12 09:54:03 +000011984cat >>confdefs.h <<_ACEOF
11985#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11986_ACEOF
11987
11988
Matthias Kloseb9621712010-04-24 17:59:49 +000011989$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011990
11991else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011992 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011993 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011994 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11995 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011996esac
11997
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011998fi
11999
Michael W. Hudson54241132001-12-07 15:38:26 +000012000
Martin v. Löwis11437992002-04-12 09:54:03 +000012001
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12003$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012004if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012006else
Matthias Kloseb159a552010-04-25 21:00:44 +000012007
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012009/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012010#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012011int
12012main ()
12013{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012014return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012015 ;
12016 return 0;
12017}
12018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012019if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012020 ac_cv_header_time_altzone=yes
12021else
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012026fi
12027
Matthias Kloseb9621712010-04-24 17:59:49 +000012028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12029$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012030if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012031
Matthias Kloseb9621712010-04-24 17:59:49 +000012032$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012033
12034fi
12035
Guido van Rossumda88dad1995-01-26 00:46:29 +000012036was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12038$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012040/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012041
12042#include <sys/types.h>
12043#include <sys/select.h>
12044#include <sys/time.h>
12045
Martin v. Löwis11437992002-04-12 09:54:03 +000012046int
12047main ()
12048{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012049;
Martin v. Löwis11437992002-04-12 09:54:03 +000012050 ;
12051 return 0;
12052}
12053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012054if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012055
12056
Matthias Kloseb9621712010-04-24 17:59:49 +000012057$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012058
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012059 was_it_defined=yes
12060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12064$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012065
Matthias Kloseb9621712010-04-24 17:59:49 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12067$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012068if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012070else
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012072/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012073#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012074int
12075main ()
12076{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012077struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012078 ;
12079 return 0;
12080}
12081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012082if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012083 ac_cv_struct_addrinfo=yes
12084else
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12088fi
12089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12091$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012092if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012093
Matthias Kloseb9621712010-04-24 17:59:49 +000012094$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012095
12096fi
12097
Matthias Kloseb9621712010-04-24 17:59:49 +000012098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12099$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012100if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012102else
Matthias Kloseb9621712010-04-24 17:59:49 +000012103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012104/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012105
12106# include <sys/types.h>
12107# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012108int
12109main ()
12110{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012111struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012112 ;
12113 return 0;
12114}
12115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012116if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012117 ac_cv_struct_sockaddr_storage=yes
12118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12122fi
12123
Matthias Kloseb9621712010-04-24 17:59:49 +000012124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12125$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012126if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012127
Matthias Kloseb9621712010-04-24 17:59:49 +000012128$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012129
12130fi
12131
Guido van Rossum627b2d71993-12-24 10:39:16 +000012132# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012133
Matthias Kloseb9621712010-04-24 17:59:49 +000012134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12135$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012136if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012137 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012138else
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012141$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012142int
12143main ()
12144{
12145static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012146test_array [0] = 0;
12147return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012148
12149 ;
12150 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012151}
Martin v. Löwis11437992002-04-12 09:54:03 +000012152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012153if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012154 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012155else
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12161$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012162if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012164
12165fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012166
Matthias Kloseb9621712010-04-24 17:59:49 +000012167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12168$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012169if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012171else
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012173/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012174
Martin v. Löwis11437992002-04-12 09:54:03 +000012175int
12176main ()
12177{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012178
Martin v. Löwis11437992002-04-12 09:54:03 +000012179#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012180 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012181 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012182 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012183 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012184 char const *const *pcpcc;
12185 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 /* NEC SVR4.0.2 mips cc rejects this. */
12187 struct point {int x, y;};
12188 static struct point const zero = {0,0};
12189 /* AIX XL C 1.02.0.0 rejects this.
12190 It does not let you subtract one const X* pointer from another in
12191 an arm of an if-expression whose if-part is not a constant
12192 expression */
12193 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012194 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196 ++pcpcc;
12197 ppc = (char**) pcpcc;
12198 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012199 { /* SCO 3.2v4 cc rejects this sort of thing. */
12200 char tx;
12201 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012203
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 }
12207 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12208 int x[] = {25, 17};
12209 const int *foo = &x[0];
12210 ++foo;
12211 }
12212 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12213 typedef const int *iptr;
12214 iptr p = 0;
12215 ++p;
12216 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012217 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012219 struct s { int j; const int *ap[3]; } bx;
12220 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012221 }
12222 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12223 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012224 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012225 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012226 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012227#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012228
Martin v. Löwis11437992002-04-12 09:54:03 +000012229 ;
12230 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012231}
Martin v. Löwis11437992002-04-12 09:54:03 +000012232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012233if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012234 ac_cv_c_const=yes
12235else
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12241$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012242if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012243
Matthias Kloseb9621712010-04-24 17:59:49 +000012244$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012245
12246fi
12247
Michael W. Hudson54241132001-12-07 15:38:26 +000012248
Guido van Rossumda88dad1995-01-26 00:46:29 +000012249works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12251$as_echo_n "checking for working volatile... " >&6; }
12252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012253/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012254
Martin v. Löwis11437992002-04-12 09:54:03 +000012255int
12256main ()
12257{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012258volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012259 ;
12260 return 0;
12261}
12262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012263if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012264 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012265else
Skip Montanaro6dead952003-09-25 14:50:04 +000012266
Matthias Kloseb9621712010-04-24 17:59:49 +000012267$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012268
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012269
Guido van Rossum627b2d71993-12-24 10:39:16 +000012270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12273$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012274
Guido van Rossumda88dad1995-01-26 00:46:29 +000012275works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12277$as_echo_n "checking for working signed char... " >&6; }
12278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012279/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012280
Martin v. Löwis11437992002-04-12 09:54:03 +000012281int
12282main ()
12283{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012284signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012285 ;
12286 return 0;
12287}
12288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012289if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012290 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012291else
Skip Montanaro6dead952003-09-25 14:50:04 +000012292
Matthias Kloseb9621712010-04-24 17:59:49 +000012293$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012294
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012295
Guido van Rossum7f43da71994-08-01 12:15:30 +000012296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12299$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012300
Guido van Rossumda88dad1995-01-26 00:46:29 +000012301have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12303$as_echo_n "checking for prototypes... " >&6; }
12304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012305/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012306int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012307int
12308main ()
12309{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012310return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012311 ;
12312 return 0;
12313}
12314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012318
Matthias Kloseb159a552010-04-25 21:00:44 +000012319 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12323$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012324
Guido van Rossumda88dad1995-01-26 00:46:29 +000012325works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12327$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012329/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012330
12331#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012332int foo(int x, ...) {
12333 va_list va;
12334 va_start(va, x);
12335 va_arg(va, int);
12336 va_arg(va, char *);
12337 va_arg(va, double);
12338 return 0;
12339}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012340
Martin v. Löwis11437992002-04-12 09:54:03 +000012341int
12342main ()
12343{
Guido van Rossum90eea071996-08-30 20:58:57 +000012344return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 ;
12346 return 0;
12347}
12348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012350
12351
Matthias Kloseb9621712010-04-24 17:59:49 +000012352$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012353
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012354 works=yes
12355
Guido van Rossum627b2d71993-12-24 10:39:16 +000012356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12359$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012360
Martin v. Löwisd6320502004-08-12 13:45:08 +000012361# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12363$as_echo_n "checking for socketpair... " >&6; }
12364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012365/* end confdefs.h. */
12366
12367#include <sys/types.h>
12368#include <sys/socket.h>
12369
12370int
12371main ()
12372{
12373void *x=socketpair
12374 ;
12375 return 0;
12376}
12377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012379
Matthias Kloseb9621712010-04-24 17:59:49 +000012380$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012381
Matthias Kloseb159a552010-04-25 21:00:44 +000012382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012383$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012384else
Matthias Kloseb9621712010-04-24 17:59:49 +000012385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12386$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012387
12388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012390
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12393$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012395/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012396#include <sys/types.h>
12397#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012398int
12399main ()
12400{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012401struct sockaddr x;
12402x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012403 ;
12404 return 0;
12405}
12406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012407if ac_fn_c_try_compile "$LINENO"; then :
12408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12409$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012412
12413else
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12415$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012416
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012419
Guido van Rossumda88dad1995-01-26 00:46:29 +000012420va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12422$as_echo_n "checking whether va_list is an array... " >&6; }
12423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012424/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012425
12426#ifdef HAVE_STDARG_PROTOTYPES
12427#include <stdarg.h>
12428#else
12429#include <varargs.h>
12430#endif
12431
Martin v. Löwis11437992002-04-12 09:54:03 +000012432int
12433main ()
12434{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012435va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 ;
12437 return 0;
12438}
12439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012440if ac_fn_c_try_compile "$LINENO"; then :
12441
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012442else
Skip Montanaro6dead952003-09-25 14:50:04 +000012443
Martin v. Löwis11437992002-04-12 09:54:03 +000012444
Matthias Kloseb9621712010-04-24 17:59:49 +000012445$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
Guido van Rossumda88dad1995-01-26 00:46:29 +000012447 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012448
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12452$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012453
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012454# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012455
12456
Matthias Kloseb9621712010-04-24 17:59:49 +000012457ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012458if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012459
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012461
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12463$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012464 OLD_CFLAGS=$CFLAGS
12465 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012467/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012468
12469# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012470
Martin v. Löwis11437992002-04-12 09:54:03 +000012471int
12472main ()
12473{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012474
12475 char *name;
12476 struct hostent *he, *res;
12477 char buffer[2048];
12478 int buflen = 2048;
12479 int h_errnop;
12480
12481 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012482
12483 ;
12484 return 0;
12485}
12486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012488
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012490
Martin v. Löwis11437992002-04-12 09:54:03 +000012491
Matthias Kloseb9621712010-04-24 17:59:49 +000012492$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012493
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12495$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012496
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012497else
Skip Montanaro6dead952003-09-25 14:50:04 +000012498
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12500$as_echo "no" >&6; }
12501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12502$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012504/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012505
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012506# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012507
Martin v. Löwis11437992002-04-12 09:54:03 +000012508int
12509main ()
12510{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012511
12512 char *name;
12513 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012514 char buffer[2048];
12515 int buflen = 2048;
12516 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012517
Matthias Kloseb159a552010-04-25 21:00:44 +000012518 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
12520 ;
12521 return 0;
12522}
12523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012525
Matthias Kloseb9621712010-04-24 17:59:49 +000012526 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012527
Martin v. Löwis11437992002-04-12 09:54:03 +000012528
Matthias Kloseb159a552010-04-25 21:00:44 +000012529$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012530
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12532$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012533
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012534else
Skip Montanaro6dead952003-09-25 14:50:04 +000012535
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12537$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12539$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12541/* end confdefs.h. */
12542
12543# include <netdb.h>
12544
12545int
12546main ()
12547{
12548
12549 char *name;
12550 struct hostent *he;
12551 struct hostent_data data;
12552
12553 (void) gethostbyname_r(name, he, &data);
12554
12555 ;
12556 return 0;
12557}
12558_ACEOF
12559if ac_fn_c_try_compile "$LINENO"; then :
12560
12561 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12562
12563
12564$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12565
12566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12567$as_echo "yes" >&6; }
12568
12569else
12570
12571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12572$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012573
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012576
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012579
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012582 CFLAGS=$OLD_CFLAGS
12583
12584else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012585
Matthias Kloseb9621712010-04-24 17:59:49 +000012586 for ac_func in gethostbyname
12587do :
12588 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012589if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012590 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012591#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012592_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012593
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012594fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012595done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012596
Michael W. Hudson54241132001-12-07 15:38:26 +000012597
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012598fi
12599
Michael W. Hudson54241132001-12-07 15:38:26 +000012600
12601
12602
12603
12604
12605
Guido van Rossum627b2d71993-12-24 10:39:16 +000012606# checks for system services
12607# (none yet)
12608
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012609# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012610ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012611if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012612
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012613else
Matthias Kloseb9621712010-04-24 17:59:49 +000012614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12615$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012616if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012617 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012618else
Martin v. Löwis11437992002-04-12 09:54:03 +000012619 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012620LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012624/* Override any GCC internal prototype to avoid an error.
12625 Use char because int might match the return type of a GCC
12626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012627#ifdef __cplusplus
12628extern "C"
12629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012630char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012631int
12632main ()
12633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012634return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012635 ;
12636 return 0;
12637}
12638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012640 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012641else
Matthias Kloseb9621712010-04-24 17:59:49 +000012642 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012644rm -f core conftest.err conftest.$ac_objext \
12645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012646LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12649$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012650if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012651 cat >>confdefs.h <<_ACEOF
12652#define HAVE_LIBIEEE 1
12653_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012654
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012655 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012656
Guido van Rossum627b2d71993-12-24 10:39:16 +000012657fi
12658
Michael W. Hudson54241132001-12-07 15:38:26 +000012659
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012660fi
12661
Michael W. Hudson54241132001-12-07 15:38:26 +000012662
Guido van Rossum7f253911997-05-09 02:42:48 +000012663# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12665$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012667# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012668if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012669 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012670if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012671then
12672
Matthias Kloseb9621712010-04-24 17:59:49 +000012673$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12676$as_echo "yes" >&6; }
12677else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12678$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012679fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012680else
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12682$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683fi
12684
Guido van Rossum7f253911997-05-09 02:42:48 +000012685
Guido van Rossum7f43da71994-08-01 12:15:30 +000012686# check for --with-libm=...
12687
Guido van Rossum563e7081996-09-10 18:20:48 +000012688case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012689Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012690*) LIBM=-lm
12691esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12693$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012696if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012697 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012698if test "$withval" = no
12699then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12701$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012702elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012703then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12705$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012706else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012707fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012708else
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12710$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711fi
12712
Guido van Rossum7f43da71994-08-01 12:15:30 +000012713
12714# check for --with-libc=...
12715
Matthias Kloseb9621712010-04-24 17:59:49 +000012716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12717$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012719# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012720if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012722if test "$withval" = no
12723then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12725$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012726elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012727then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12729$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012730else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012731fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012732else
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12734$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735fi
12736
Guido van Rossum7f43da71994-08-01 12:15:30 +000012737
Stefan Krah1919b7e2012-03-21 18:25:23 +010012738# **************************************
12739# * Check for gcc x64 inline assembler *
12740# **************************************
12741
12742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12743$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12745/* end confdefs.h. */
12746
12747int
12748main ()
12749{
12750
12751 __asm__ __volatile__ ("movq %rcx, %rax");
12752
12753 ;
12754 return 0;
12755}
12756_ACEOF
12757if ac_fn_c_try_compile "$LINENO"; then :
12758 have_gcc_asm_for_x64=yes
12759else
12760 have_gcc_asm_for_x64=no
12761fi
12762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12764$as_echo "$have_gcc_asm_for_x64" >&6; }
12765if test "$have_gcc_asm_for_x64" = yes
12766then
12767
12768$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12769
12770fi
12771
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012772# **************************************************
12773# * Check for various properties of floating point *
12774# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012775
Matthias Kloseb9621712010-04-24 17:59:49 +000012776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12777$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012778if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012780else
12781
Matthias Kloseb9621712010-04-24 17:59:49 +000012782if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012783 ac_cv_little_endian_double=no
12784else
Matthias Kloseb9621712010-04-24 17:59:49 +000012785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012786/* end confdefs.h. */
12787
12788#include <string.h>
12789int main() {
12790 double x = 9006104071832581.0;
12791 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12792 return 0;
12793 else
12794 return 1;
12795}
12796
12797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012798if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012799 ac_cv_little_endian_double=yes
12800else
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012803rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12804 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012805fi
12806
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012807fi
12808
Matthias Kloseb9621712010-04-24 17:59:49 +000012809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12810$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012811if test "$ac_cv_little_endian_double" = yes
12812then
12813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012815
12816fi
12817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12819$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012820if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012822else
12823
Matthias Kloseb9621712010-04-24 17:59:49 +000012824if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012825 ac_cv_big_endian_double=no
12826else
Matthias Kloseb9621712010-04-24 17:59:49 +000012827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012828/* end confdefs.h. */
12829
12830#include <string.h>
12831int main() {
12832 double x = 9006104071832581.0;
12833 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12834 return 0;
12835 else
12836 return 1;
12837}
12838
12839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012840if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012841 ac_cv_big_endian_double=yes
12842else
Matthias Kloseb9621712010-04-24 17:59:49 +000012843 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012845rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12846 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012847fi
12848
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012849fi
12850
Matthias Kloseb9621712010-04-24 17:59:49 +000012851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12852$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012853if test "$ac_cv_big_endian_double" = yes
12854then
12855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012857
12858fi
12859
12860# Some ARM platforms use a mixed-endian representation for doubles.
12861# While Python doesn't currently have full support for these platforms
12862# (see e.g., issue 1762561), we can at least make sure that float <-> string
12863# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12865$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012866if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012868else
12869
Matthias Kloseb9621712010-04-24 17:59:49 +000012870if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012871 ac_cv_mixed_endian_double=no
12872else
Matthias Kloseb9621712010-04-24 17:59:49 +000012873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012874/* end confdefs.h. */
12875
12876#include <string.h>
12877int main() {
12878 double x = 9006104071832581.0;
12879 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12880 return 0;
12881 else
12882 return 1;
12883}
12884
12885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012886if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012887 ac_cv_mixed_endian_double=yes
12888else
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12892 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012893fi
12894
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012895fi
12896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12898$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012899if test "$ac_cv_mixed_endian_double" = yes
12900then
12901
Matthias Kloseb9621712010-04-24 17:59:49 +000012902$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012903
12904fi
12905
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012906# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012907# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012908# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012909# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012910# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012911# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012912
12913# This inline assembler syntax may also work for suncc and icc,
12914# so we try it on all platforms.
12915
Matthias Kloseb9621712010-04-24 17:59:49 +000012916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12917$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012919/* end confdefs.h. */
12920
12921int
12922main ()
12923{
12924
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012925 unsigned short cw;
12926 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12927 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012928
12929 ;
12930 return 0;
12931}
12932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012933if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012934 have_gcc_asm_for_x87=yes
12935else
Matthias Kloseb9621712010-04-24 17:59:49 +000012936 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012937fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12940$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012941if test "$have_gcc_asm_for_x87" = yes
12942then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012943
Matthias Kloseb9621712010-04-24 17:59:49 +000012944$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012945
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012946fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012947
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012948# Detect whether system arithmetic is subject to x87-style double
12949# rounding issues. The result of this test has little meaning on non
12950# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12951# mode is round-to-nearest and double rounding issues are present, and
12952# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12954$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012955# $BASECFLAGS may affect the result
12956ac_save_cc="$CC"
12957CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012958if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012959 ac_cv_x87_double_rounding=no
12960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012962/* end confdefs.h. */
12963
12964#include <stdlib.h>
12965#include <math.h>
12966int main() {
12967 volatile double x, y, z;
12968 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12969 x = 0.99999999999999989; /* 1-2**-53 */
12970 y = 1./x;
12971 if (y != 1.)
12972 exit(0);
12973 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12974 x = 1e16;
12975 y = 2.99999;
12976 z = x + y;
12977 if (z != 1e16+4.)
12978 exit(0);
12979 /* both tests show evidence of double rounding */
12980 exit(1);
12981}
12982
12983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012984if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012985 ac_cv_x87_double_rounding=no
12986else
Matthias Kloseb9621712010-04-24 17:59:49 +000012987 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012989rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12990 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012991fi
12992
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012993CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12995$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012996if test "$ac_cv_x87_double_rounding" = yes
12997then
12998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013000
13001fi
13002
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013003# ************************************
13004# * Check for mathematical functions *
13005# ************************************
13006
13007LIBS_SAVE=$LIBS
13008LIBS="$LIBS $LIBM"
13009
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013010for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13011do :
13012 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13013ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013014if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013015 cat >>confdefs.h <<_ACEOF
13016#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13017_ACEOF
13018
13019fi
13020done
13021
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013022for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013023do :
13024 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13025ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013026if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013027 cat >>confdefs.h <<_ACEOF
13028#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13029_ACEOF
13030
13031fi
13032done
13033
13034ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13035"
Victor Stinnere0be4232011-10-25 13:06:09 +020013036if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013037 ac_have_decl=1
13038else
13039 ac_have_decl=0
13040fi
13041
13042cat >>confdefs.h <<_ACEOF
13043#define HAVE_DECL_ISINF $ac_have_decl
13044_ACEOF
13045ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13046"
Victor Stinnere0be4232011-10-25 13:06:09 +020013047if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013048 ac_have_decl=1
13049else
13050 ac_have_decl=0
13051fi
13052
13053cat >>confdefs.h <<_ACEOF
13054#define HAVE_DECL_ISNAN $ac_have_decl
13055_ACEOF
13056ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13057"
Victor Stinnere0be4232011-10-25 13:06:09 +020013058if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013059 ac_have_decl=1
13060else
13061 ac_have_decl=0
13062fi
13063
13064cat >>confdefs.h <<_ACEOF
13065#define HAVE_DECL_ISFINITE $ac_have_decl
13066_ACEOF
13067
13068
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013069# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13070# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13072$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013073if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013074 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013075else
13076
Matthias Kloseb9621712010-04-24 17:59:49 +000013077if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013078 ac_cv_tanh_preserves_zero_sign=no
13079else
Matthias Kloseb9621712010-04-24 17:59:49 +000013080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013081/* end confdefs.h. */
13082
13083#include <math.h>
13084#include <stdlib.h>
13085int main() {
13086 /* return 0 if either negative zeros don't exist
13087 on this platform or if negative zeros exist
13088 and tanh(-0.) == -0. */
13089 if (atan2(0., -1.) == atan2(-0., -1.) ||
13090 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13091 else exit(1);
13092}
13093
13094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013095if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013096 ac_cv_tanh_preserves_zero_sign=yes
13097else
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13101 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013102fi
13103
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013104fi
13105
Matthias Kloseb9621712010-04-24 17:59:49 +000013106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13107$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013108if test "$ac_cv_tanh_preserves_zero_sign" = yes
13109then
13110
Matthias Kloseb9621712010-04-24 17:59:49 +000013111$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013112
13113fi
13114
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013115if test "$ac_cv_func_log1p" = yes
13116then
13117 # On some versions of AIX, log1p(-0.) returns 0. instead of
13118 # -0. See issue #9920.
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13120$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013121 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013122 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013123else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013124
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013125 if test "$cross_compiling" = yes; then :
13126 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013127else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13129/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013130
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013131 #include <math.h>
13132 #include <stdlib.h>
13133 int main() {
13134 /* Fail if the signs of log1p(-0.) and -0. can be
13135 distinguished. */
13136 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13137 return 0;
13138 else
13139 return 1;
13140 }
13141
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013142_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013143if ac_fn_c_try_run "$LINENO"; then :
13144 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013145else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013146 ac_cv_log1p_drops_zero_sign=yes
13147fi
13148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13149 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013150fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013151
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013152fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013153
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13155$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13156fi
13157if test "$ac_cv_log1p_drops_zero_sign" = yes
13158then
13159
13160$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13161
13162fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013163
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013164LIBS=$LIBS_SAVE
13165
Mark Dickinsona614f042009-11-28 12:48:43 +000013166# For multiprocessing module, check that sem_open
13167# actually works. For FreeBSD versions <= 7.2,
13168# the kernel module that provides POSIX semaphores
13169# isn't loaded by default, so an attempt to call
13170# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13172$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013173if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013175else
Matthias Kloseb9621712010-04-24 17:59:49 +000013176 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013177 ac_cv_posix_semaphores_enabled=yes
13178else
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013180/* end confdefs.h. */
13181
13182#include <unistd.h>
13183#include <fcntl.h>
13184#include <stdio.h>
13185#include <semaphore.h>
13186#include <sys/stat.h>
13187
13188int main(void) {
13189 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13190 if (a == SEM_FAILED) {
13191 perror("sem_open");
13192 return 1;
13193 }
13194 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013195 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013196 return 0;
13197}
13198
13199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013200if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013201 ac_cv_posix_semaphores_enabled=yes
13202else
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13206 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013207fi
13208
13209
Mark Dickinsona614f042009-11-28 12:48:43 +000013210fi
13211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13213$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013214if test $ac_cv_posix_semaphores_enabled = no
13215then
13216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013218
13219fi
13220
Mark Dickinson10683072009-04-18 21:18:19 +000013221# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13223$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013224if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013226else
Matthias Kloseb9621712010-04-24 17:59:49 +000013227 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013228 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013229else
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013231/* end confdefs.h. */
13232
13233#include <unistd.h>
13234#include <fcntl.h>
13235#include <stdio.h>
13236#include <semaphore.h>
13237#include <sys/stat.h>
13238
13239int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013240 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013241 int count;
13242 int res;
13243 if(a==SEM_FAILED){
13244 perror("sem_open");
13245 return 1;
13246
13247 }
13248 res = sem_getvalue(a, &count);
13249 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013250 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013251 return res==-1 ? 1 : 0;
13252}
13253
Mark Dickinson10683072009-04-18 21:18:19 +000013254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013255if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013256 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013257else
Matthias Kloseb9621712010-04-24 17:59:49 +000013258 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013260rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13261 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013262fi
13263
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013264
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013265fi
13266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13268$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013269if test $ac_cv_broken_sem_getvalue = yes
13270then
13271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013273
13274fi
13275
Mark Dickinsonbd792642009-03-18 20:06:12 +000013276# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13278$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013279# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013280if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013281 enableval=$enable_big_digits; case $enable_big_digits in
13282yes)
13283 enable_big_digits=30 ;;
13284no)
13285 enable_big_digits=15 ;;
1328615|30)
13287 ;;
13288*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013289 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 +000013290esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13292$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013293
13294cat >>confdefs.h <<_ACEOF
13295#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13296_ACEOF
13297
13298
13299else
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13301$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013302fi
13303
13304
Guido van Rossumef2255b2000-03-10 22:30:29 +000013305# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013306ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013307if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013308
13309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013311
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013312 wchar_h="yes"
13313
Guido van Rossumef2255b2000-03-10 22:30:29 +000013314else
Martin v. Löwis11437992002-04-12 09:54:03 +000013315 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013316
13317fi
13318
Michael W. Hudson54241132001-12-07 15:38:26 +000013319
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013321# determine wchar_t size
13322if test "$wchar_h" = yes
13323then
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013325# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13326# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13327# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13329$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013330if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13334"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013335
Martin v. Löwis11437992002-04-12 09:54:03 +000013336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 if test "$ac_cv_type_wchar_t" = yes; then
13338 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13339$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013340as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013341See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342 else
13343 ac_cv_sizeof_wchar_t=0
13344 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013345fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013346
Martin v. Löwis11437992002-04-12 09:54:03 +000013347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13349$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013350
13351
13352
Martin v. Löwis11437992002-04-12 09:54:03 +000013353cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013354#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013355_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013356
Michael W. Hudson54241132001-12-07 15:38:26 +000013357
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013358fi
13359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13361$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013362have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013364/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013365
13366#include <tcl.h>
13367#if TCL_UTF_MAX != 6
13368# error "NOT UCS4_TCL"
13369#endif
13370int
13371main ()
13372{
13373
13374 ;
13375 return 0;
13376}
13377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013379
13380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013382
13383 have_ucs4_tcl=yes
13384
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13388$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013389
Skip Montanaro6dead952003-09-25 14:50:04 +000013390# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013391if test "$wchar_h" = yes
13392then
13393 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13395$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013396 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013398else
13399
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013401 ac_cv_wchar_t_signed=yes
13402else
Matthias Kloseb9621712010-04-24 17:59:49 +000013403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013404/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013405
13406 #include <wchar.h>
13407 int main()
13408 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013409 /* Success: exit code 0 */
13410 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013411 }
13412
13413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013414if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013415 ac_cv_wchar_t_signed=yes
13416else
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13420 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013421fi
13422
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013423fi
13424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13426$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013427fi
13428
Georg Brandl52d168a2008-01-07 18:10:24 +000013429# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013430if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013431 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013432then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013433 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013436
Georg Brandl52d168a2008-01-07 18:10:24 +000013437else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013438 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013439fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13441$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013442
13443# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13445$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013446if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013448else
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 ac_cv_c_bigendian=unknown
13450 # See if we're dealing with a universal compiler.
13451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13452/* end confdefs.h. */
13453#ifndef __APPLE_CC__
13454 not a universal capable compiler
13455 #endif
13456 typedef int dummy;
13457
Skip Montanaro6dead952003-09-25 14:50:04 +000013458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013459if ac_fn_c_try_compile "$LINENO"; then :
13460
13461 # Check for potential -arch flags. It is not universal unless
13462 # there are at least two -arch flags with different values.
13463 ac_arch=
13464 ac_prev=
13465 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13466 if test -n "$ac_prev"; then
13467 case $ac_word in
13468 i?86 | x86_64 | ppc | ppc64)
13469 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13470 ac_arch=$ac_word
13471 else
13472 ac_cv_c_bigendian=universal
13473 break
13474 fi
13475 ;;
13476 esac
13477 ac_prev=
13478 elif test "x$ac_word" = "x-arch"; then
13479 ac_prev=arch
13480 fi
13481 done
13482fi
13483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13484 if test $ac_cv_c_bigendian = unknown; then
13485 # See if sys/param.h defines the BYTE_ORDER macro.
13486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013487/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013488#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013489 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013490
Martin v. Löwis11437992002-04-12 09:54:03 +000013491int
13492main ()
13493{
Matthias Kloseb9621712010-04-24 17:59:49 +000013494#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13495 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13496 && LITTLE_ENDIAN)
13497 bogus endian macros
13498 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013499
13500 ;
13501 return 0;
13502}
13503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013504if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013505 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013507/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013508#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013510
Martin v. Löwis11437992002-04-12 09:54:03 +000013511int
13512main ()
13513{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013514#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 not big endian
13516 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013517
13518 ;
13519 return 0;
13520}
13521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013522if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013523 ac_cv_c_bigendian=yes
13524else
Matthias Kloseb9621712010-04-24 17:59:49 +000013525 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013528fi
13529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13530 fi
13531 if test $ac_cv_c_bigendian = unknown; then
13532 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013534/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013535#include <limits.h>
13536
Martin v. Löwis11437992002-04-12 09:54:03 +000013537int
13538main ()
13539{
Matthias Kloseb9621712010-04-24 17:59:49 +000013540#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13541 bogus endian macros
13542 #endif
13543
Martin v. Löwis11437992002-04-12 09:54:03 +000013544 ;
13545 return 0;
13546}
13547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013548if ac_fn_c_try_compile "$LINENO"; then :
13549 # It does; now see whether it defined to _BIG_ENDIAN or not.
13550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13551/* end confdefs.h. */
13552#include <limits.h>
13553
13554int
13555main ()
13556{
13557#ifndef _BIG_ENDIAN
13558 not big endian
13559 #endif
13560
13561 ;
13562 return 0;
13563}
13564_ACEOF
13565if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013566 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013567else
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13571fi
13572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13573 fi
13574 if test $ac_cv_c_bigendian = unknown; then
13575 # Compile a test program.
13576 if test "$cross_compiling" = yes; then :
13577 # Try to guess by grepping values from an object file.
13578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13579/* end confdefs.h. */
13580short int ascii_mm[] =
13581 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13582 short int ascii_ii[] =
13583 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13584 int use_ascii (int i) {
13585 return ascii_mm[i] + ascii_ii[i];
13586 }
13587 short int ebcdic_ii[] =
13588 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13589 short int ebcdic_mm[] =
13590 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13591 int use_ebcdic (int i) {
13592 return ebcdic_mm[i] + ebcdic_ii[i];
13593 }
13594 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596int
13597main ()
13598{
13599return use_ascii (foo) == use_ebcdic (foo);
13600 ;
13601 return 0;
13602}
13603_ACEOF
13604if ac_fn_c_try_compile "$LINENO"; then :
13605 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13606 ac_cv_c_bigendian=yes
13607 fi
13608 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13609 if test "$ac_cv_c_bigendian" = unknown; then
13610 ac_cv_c_bigendian=no
13611 else
13612 # finding both strings is unlikely to happen, but who knows?
13613 ac_cv_c_bigendian=unknown
13614 fi
13615 fi
13616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013618else
Matthias Kloseb9621712010-04-24 17:59:49 +000013619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013620/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013621$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013622int
13623main ()
13624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626 /* Are we little or big endian? From Harbison&Steele. */
13627 union
13628 {
13629 long int l;
13630 char c[sizeof (long int)];
13631 } u;
13632 u.l = 1;
13633 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013634
13635 ;
13636 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013637}
Martin v. Löwis11437992002-04-12 09:54:03 +000013638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013639if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013640 ac_cv_c_bigendian=no
13641else
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13645 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13651$as_echo "$ac_cv_c_bigendian" >&6; }
13652 case $ac_cv_c_bigendian in #(
13653 yes)
13654 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13655;; #(
13656 no)
13657 ;; #(
13658 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 ;; #(
13663 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013664 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013665 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013667
Michael W. Hudson54241132001-12-07 15:38:26 +000013668
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013669# ABI version string for Python extension modules. This appears between the
13670# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13671# from the following attributes which affect the ABI of this Python build (in
13672# this order):
13673#
13674# * The Python implementation (always 'cpython-' for us)
13675# * The major and minor version numbers
13676# * --with-pydebug (adds a 'd')
13677# * --with-pymalloc (adds a 'm')
13678# * --with-wide-unicode (adds a 'u')
13679#
13680# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013681# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13682# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013683
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13685$as_echo_n "checking ABIFLAGS... " >&6; }
13686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13687$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13689$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013690SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13692$as_echo "$SOABI" >&6; }
13693
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13695$as_echo_n "checking LDVERSION... " >&6; }
13696LDVERSION='$(VERSION)$(ABIFLAGS)'
13697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13698$as_echo "$LDVERSION" >&6; }
13699
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013700# SO is the extension of shared libraries `(including the dot!)
13701# -- usually .so, .sl on HP-UX, .dll on Cygwin
13702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13703$as_echo_n "checking SO... " >&6; }
13704if test -z "$SO"
13705then
13706 case $ac_sys_system in
13707 hp*|HP*)
13708 case `uname -m` in
13709 ia64) SO=.so;;
13710 *) SO=.sl;;
13711 esac
13712 ;;
13713 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013714 Linux*|GNU*)
13715 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013716 *) SO=.so;;
13717 esac
13718else
13719 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013720 echo
13721 echo '====================================================================='
13722 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013723 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013724 echo '+ Do you really mean to change the extension for shared libraries? +'
13725 echo '+ Continuing in 10 seconds to let you to ponder. +'
13726 echo '+ +'
13727 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013728 sleep 10
13729fi
13730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13731$as_echo "$SO" >&6; }
13732
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013733# Check whether right shifting a negative integer extends the sign bit
13734# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13736$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013737if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013739else
Martin v. Löwis11437992002-04-12 09:54:03 +000013740
Matthias Kloseb9621712010-04-24 17:59:49 +000013741if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013742 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013743else
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013745/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013746
13747int main()
13748{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013749 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013750}
13751
Martin v. Löwis11437992002-04-12 09:54:03 +000013752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013753if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013754 ac_cv_rshift_extends_sign=yes
13755else
Matthias Kloseb9621712010-04-24 17:59:49 +000013756 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013760fi
13761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762fi
13763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13765$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013766if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013767then
Martin v. Löwis11437992002-04-12 09:54:03 +000013768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013770
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013771fi
13772
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013773# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13775$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013776if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013778else
Martin v. Löwis11437992002-04-12 09:54:03 +000013779
Matthias Kloseb9621712010-04-24 17:59:49 +000013780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013781/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013782#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013783int
13784main ()
13785{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013786
13787 FILE *f = fopen("/dev/null", "r");
13788 flockfile(f);
13789 getc_unlocked(f);
13790 funlockfile(f);
13791
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 ;
13793 return 0;
13794}
13795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013797 ac_cv_have_getc_unlocked=yes
13798else
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 ac_cv_have_getc_unlocked=no
13800fi
13801rm -f core conftest.err conftest.$ac_objext \
13802 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804
Matthias Kloseb9621712010-04-24 17:59:49 +000013805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13806$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013807if test "$ac_cv_have_getc_unlocked" = yes
13808then
Martin v. Löwis11437992002-04-12 09:54:03 +000013809
Matthias Kloseb9621712010-04-24 17:59:49 +000013810$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013811
13812fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013813
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013814# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013815# save the value of LIBS so we don't actually link Python with readline
13816LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013817
Gregory P. Smith18820942008-09-07 06:24:49 +000013818# On some systems we need to link readline to a termcap compatible
13819# library. NOTE: Keep the precedence of listed libraries synchronised
13820# with setup.py.
13821py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13823$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013824for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013825 if test -z "$py_libtermcap"; then
13826 READLINE_LIBS="-lreadline"
13827 else
13828 READLINE_LIBS="-lreadline -l$py_libtermcap"
13829 fi
13830 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013832/* end confdefs.h. */
13833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834/* Override any GCC internal prototype to avoid an error.
13835 Use char because int might match the return type of a GCC
13836 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013837#ifdef __cplusplus
13838extern "C"
13839#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013840char readline ();
13841int
13842main ()
13843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013845 ;
13846 return 0;
13847}
13848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013849if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013850 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013852rm -f core conftest.err conftest.$ac_objext \
13853 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013854 if test $py_cv_lib_readline = yes; then
13855 break
13856 fi
13857done
13858# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13859#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013860if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13862$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013863else
Matthias Kloseb9621712010-04-24 17:59:49 +000013864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13865$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013866
Matthias Kloseb9621712010-04-24 17:59:49 +000013867$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013868
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013869fi
13870
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013871# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13873$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013874if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013876else
13877 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013878LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013880/* end confdefs.h. */
13881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882/* Override any GCC internal prototype to avoid an error.
13883 Use char because int might match the return type of a GCC
13884 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013885#ifdef __cplusplus
13886extern "C"
13887#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013888char rl_callback_handler_install ();
13889int
13890main ()
13891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013893 ;
13894 return 0;
13895}
13896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013897if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013898 ac_cv_lib_readline_rl_callback_handler_install=yes
13899else
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013902rm -f core conftest.err conftest.$ac_objext \
13903 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013904LIBS=$ac_check_lib_save_LIBS
13905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13907$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013908if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013909
Matthias Kloseb9621712010-04-24 17:59:49 +000013910$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013911
13912fi
13913
13914
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013915# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013917/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013918#include <readline/readline.h>
13919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013920if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013921 have_readline=yes
13922else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013923 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013924
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013925fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013926rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013927if test $have_readline = yes
13928then
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013930/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013931#include <readline/readline.h>
13932
13933_ACEOF
13934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013936
Matthias Kloseb9621712010-04-24 17:59:49 +000013937$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013938
13939fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013940rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013943/* end confdefs.h. */
13944#include <readline/readline.h>
13945
13946_ACEOF
13947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013951
13952fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013953rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013954
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013955fi
13956
Martin v. Löwis0daad592001-09-30 21:09:59 +000013957# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13959$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013960if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013962else
Martin v. Löwis11437992002-04-12 09:54:03 +000013963 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013964LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013968/* Override any GCC internal prototype to avoid an error.
13969 Use char because int might match the return type of a GCC
13970 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013971#ifdef __cplusplus
13972extern "C"
13973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013974char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013975int
13976main ()
13977{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ;
13980 return 0;
13981}
13982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013984 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013987fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013988rm -f core conftest.err conftest.$ac_objext \
13989 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013990LIBS=$ac_check_lib_save_LIBS
13991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13993$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013994if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013997
Martin v. Löwis0daad592001-09-30 21:09:59 +000013998fi
13999
Michael W. Hudson54241132001-12-07 15:38:26 +000014000
Thomas Wouters89d996e2007-09-08 17:39:28 +000014001# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14003$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014004if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014006else
14007 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014008LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014010/* end confdefs.h. */
14011
14012/* Override any GCC internal prototype to avoid an error.
14013 Use char because int might match the return type of a GCC
14014 builtin and then its argument prototype would still apply. */
14015#ifdef __cplusplus
14016extern "C"
14017#endif
14018char rl_completion_display_matches_hook ();
14019int
14020main ()
14021{
14022return rl_completion_display_matches_hook ();
14023 ;
14024 return 0;
14025}
14026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014027if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014028 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14029else
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014032rm -f core conftest.err conftest.$ac_objext \
14033 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014034LIBS=$ac_check_lib_save_LIBS
14035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14037$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014038if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014041
14042fi
14043
14044
Martin v. Löwis0daad592001-09-30 21:09:59 +000014045# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14047$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014048if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014050else
Martin v. Löwis11437992002-04-12 09:54:03 +000014051 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014052LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014056/* Override any GCC internal prototype to avoid an error.
14057 Use char because int might match the return type of a GCC
14058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014059#ifdef __cplusplus
14060extern "C"
14061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014062char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014063int
14064main ()
14065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014066return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 ;
14068 return 0;
14069}
14070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014071if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014073else
Matthias Kloseb9621712010-04-24 17:59:49 +000014074 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014076rm -f core conftest.err conftest.$ac_objext \
14077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014078LIBS=$ac_check_lib_save_LIBS
14079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14081$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014082if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014083
Matthias Kloseb9621712010-04-24 17:59:49 +000014084$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014085
Guido van Rossum353ae582001-07-10 16:45:32 +000014086fi
14087
Jack Jansendd19cf82001-12-06 22:36:17 +000014088
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014089# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014091/* end confdefs.h. */
14092#include <readline/readline.h>
14093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014094if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014095 have_readline=yes
14096else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014097 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014098
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014099fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014100rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014101if test $have_readline = yes
14102then
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014104/* end confdefs.h. */
14105#include <readline/readline.h>
14106
14107_ACEOF
14108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014110
Matthias Kloseb9621712010-04-24 17:59:49 +000014111$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014112
14113fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014114rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014115
14116fi
14117
Martin v. Löwis82bca632006-02-10 20:49:30 +000014118# End of readline checks: restore LIBS
14119LIBS=$LIBS_no_readline
14120
Matthias Kloseb9621712010-04-24 17:59:49 +000014121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14122$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014123if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014124 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014125else
Martin v. Löwis11437992002-04-12 09:54:03 +000014126
Matthias Kloseb9621712010-04-24 17:59:49 +000014127if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014128 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014129else
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014131/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014132
14133int main()
14134{
14135 int val1 = nice(1);
14136 if (val1 != -1 && val1 == nice(2))
14137 exit(0);
14138 exit(1);
14139}
14140
Martin v. Löwis11437992002-04-12 09:54:03 +000014141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014142if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014143 ac_cv_broken_nice=yes
14144else
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14148 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014149fi
14150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151fi
14152
Matthias Kloseb9621712010-04-24 17:59:49 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14154$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014155if test "$ac_cv_broken_nice" = yes
14156then
Martin v. Löwis11437992002-04-12 09:54:03 +000014157
Matthias Kloseb9621712010-04-24 17:59:49 +000014158$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014159
14160fi
14161
Matthias Kloseb9621712010-04-24 17:59:49 +000014162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14163$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014164if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014166else
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014168 ac_cv_broken_poll=no
14169else
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014171/* end confdefs.h. */
14172
14173#include <poll.h>
14174
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014175int main()
14176{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014177 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014178 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014179
14180 close (42);
14181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014183 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014185 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014186 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014187 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014188 return 1;
14189}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014190
14191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014192if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014193 ac_cv_broken_poll=yes
14194else
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14198 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014201fi
14202
Matthias Kloseb9621712010-04-24 17:59:49 +000014203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14204$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014205if test "$ac_cv_broken_poll" = yes
14206then
14207
Matthias Kloseb9621712010-04-24 17:59:49 +000014208$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014209
14210fi
14211
Brett Cannon43802422005-02-10 20:48:03 +000014212# 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 +000014213# (which is not required by ISO C or UNIX spec) and/or if we support
14214# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014215ac_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 +000014216#include <$ac_cv_struct_tm>
14217
Matthias Kloseb9621712010-04-24 17:59:49 +000014218"
Victor Stinnere0be4232011-10-25 13:06:09 +020014219if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014220
14221cat >>confdefs.h <<_ACEOF
14222#define HAVE_STRUCT_TM_TM_ZONE 1
14223_ACEOF
14224
14225
14226fi
14227
14228if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14229
Matthias Kloseb9621712010-04-24 17:59:49 +000014230$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014231
14232else
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14234"
Victor Stinnere0be4232011-10-25 13:06:09 +020014235if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237else
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239fi
14240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014242#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243_ACEOF
14244
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14246$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014247if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014249else
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014251/* end confdefs.h. */
14252#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253#if !HAVE_DECL_TZNAME
14254extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014255#endif
14256
14257int
14258main ()
14259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014260return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014261 ;
14262 return 0;
14263}
14264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014265if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014266 ac_cv_var_tzname=yes
14267else
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014270rm -f core conftest.err conftest.$ac_objext \
14271 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14274$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014275 if test $ac_cv_var_tzname = yes; then
14276
Matthias Kloseb9621712010-04-24 17:59:49 +000014277$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014278
14279 fi
14280fi
14281
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014282
Martin v. Löwis1d459062005-03-14 21:23:33 +000014283# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14285$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014286if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014288else
14289
Matthias Kloseb9621712010-04-24 17:59:49 +000014290if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014291 ac_cv_working_tzset=no
14292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014294/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014295
14296#include <stdlib.h>
14297#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014298#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014299
14300#if HAVE_TZNAME
14301extern char *tzname[];
14302#endif
14303
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014304int main()
14305{
Brett Cannon18367812003-09-19 00:59:16 +000014306 /* Note that we need to ensure that not only does tzset(3)
14307 do 'something' with localtime, but it works as documented
14308 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014309 This includes making sure that tzname is set properly if
14310 tm->tm_zone does not exist since it is the alternative way
14311 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014312
14313 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014314 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014315 */
14316
Martin v. Löwis1d459062005-03-14 21:23:33 +000014317 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014318 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14319
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014320 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014321 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014322 if (localtime(&groundhogday)->tm_hour != 0)
14323 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014324#if HAVE_TZNAME
14325 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14326 if (strcmp(tzname[0], "UTC") ||
14327 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14328 exit(1);
14329#endif
Brett Cannon18367812003-09-19 00:59:16 +000014330
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014331 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014332 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014333 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014334 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014335#if HAVE_TZNAME
14336 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14337 exit(1);
14338#endif
Brett Cannon18367812003-09-19 00:59:16 +000014339
14340 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14341 tzset();
14342 if (localtime(&groundhogday)->tm_hour != 11)
14343 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014344#if HAVE_TZNAME
14345 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14346 exit(1);
14347#endif
14348
14349#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014350 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14351 exit(1);
14352 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14353 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014354#endif
Brett Cannon18367812003-09-19 00:59:16 +000014355
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014356 exit(0);
14357}
14358
14359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014360if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014361 ac_cv_working_tzset=yes
14362else
Matthias Kloseb9621712010-04-24 17:59:49 +000014363 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14366 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014367fi
14368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369fi
14370
Matthias Kloseb9621712010-04-24 17:59:49 +000014371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14372$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014373if test "$ac_cv_working_tzset" = yes
14374then
14375
Matthias Kloseb9621712010-04-24 17:59:49 +000014376$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014377
14378fi
14379
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014380# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14382$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014383if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014384 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014385else
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014387/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014388#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014389int
14390main ()
14391{
14392
14393struct stat st;
14394st.st_mtim.tv_nsec = 1;
14395
14396 ;
14397 return 0;
14398}
14399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014401 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014402else
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14406fi
14407
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14409$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014410if test "$ac_cv_stat_tv_nsec" = yes
14411then
14412
Matthias Kloseb9621712010-04-24 17:59:49 +000014413$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014414
14415fi
14416
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014417# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14419$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014420if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014422else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014424/* end confdefs.h. */
14425#include <sys/stat.h>
14426int
14427main ()
14428{
14429
14430struct stat st;
14431st.st_mtimespec.tv_nsec = 1;
14432
14433 ;
14434 return 0;
14435}
14436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014438 ac_cv_stat_tv_nsec2=yes
14439else
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14443fi
14444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14446$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014447if test "$ac_cv_stat_tv_nsec2" = yes
14448then
14449
Matthias Kloseb9621712010-04-24 17:59:49 +000014450$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014451
14452fi
14453
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014454ac_save_cppflags="$CPPFLAGS"
14455CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014456# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14458$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014459if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014461else
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014463/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014464#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014465int
14466main ()
14467{
Jack Jansen666b1e72001-10-31 12:11:48 +000014468
14469 int rtn;
14470 rtn = mvwdelch(0,0,0);
14471
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 ;
14473 return 0;
14474}
14475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014476if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014477 ac_cv_mvwdelch_is_expression=yes
14478else
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14482fi
14483
Matthias Kloseb9621712010-04-24 17:59:49 +000014484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14485$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014486
14487if test "$ac_cv_mvwdelch_is_expression" = yes
14488then
Martin v. Löwis11437992002-04-12 09:54:03 +000014489
Matthias Kloseb9621712010-04-24 17:59:49 +000014490$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014491
14492fi
14493
Matthias Kloseb9621712010-04-24 17:59:49 +000014494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14495$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014496if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014498else
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014500/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014501#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014502int
14503main ()
14504{
Jack Jansen666b1e72001-10-31 12:11:48 +000014505
14506 WINDOW *w;
14507 w->_flags = 0;
14508
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 ;
14510 return 0;
14511}
14512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014513if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014514 ac_cv_window_has_flags=yes
14515else
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14519fi
14520
Matthias Kloseb9621712010-04-24 17:59:49 +000014521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14522$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014523
Jack Jansen666b1e72001-10-31 12:11:48 +000014524
14525if test "$ac_cv_window_has_flags" = yes
14526then
Martin v. Löwis11437992002-04-12 09:54:03 +000014527
Matthias Kloseb9621712010-04-24 17:59:49 +000014528$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014529
14530fi
14531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14533$as_echo_n "checking for is_term_resized... " >&6; }
14534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014535/* end confdefs.h. */
14536#include <curses.h>
14537int
14538main ()
14539{
14540void *x=is_term_resized
14541 ;
14542 return 0;
14543}
14544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014546
Matthias Kloseb9621712010-04-24 17:59:49 +000014547$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014548
Matthias Kloseb159a552010-04-25 21:00:44 +000014549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014550$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014551else
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14553$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014554
14555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14557
Matthias Kloseb9621712010-04-24 17:59:49 +000014558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14559$as_echo_n "checking for resize_term... " >&6; }
14560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014561/* end confdefs.h. */
14562#include <curses.h>
14563int
14564main ()
14565{
14566void *x=resize_term
14567 ;
14568 return 0;
14569}
14570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014571if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014574
Matthias Kloseb159a552010-04-25 21:00:44 +000014575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014576$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014577else
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14579$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014580
14581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14583
Matthias Kloseb9621712010-04-24 17:59:49 +000014584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14585$as_echo_n "checking for resizeterm... " >&6; }
14586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014587/* end confdefs.h. */
14588#include <curses.h>
14589int
14590main ()
14591{
14592void *x=resizeterm
14593 ;
14594 return 0;
14595}
14596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014597if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014598
Matthias Kloseb9621712010-04-24 17:59:49 +000014599$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014600
Matthias Kloseb159a552010-04-25 21:00:44 +000014601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014602$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014603else
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14605$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014606
14607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014609# last curses configure check
14610CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14613$as_echo "$as_me: checking for device files" >&6;}
14614
14615if test "x$cross_compiling" = xyes; then
14616 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14618$as_echo_n "checking for /dev/ptmx... " >&6; }
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14620$as_echo "not set" >&6; }
14621 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14622 fi
14623 if test "${ac_cv_file__dev_ptc+set}" != set; then
14624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14625$as_echo_n "checking for /dev/ptc... " >&6; }
14626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14627$as_echo "not set" >&6; }
14628 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14629 fi
14630fi
14631
Matthias Kloseb9621712010-04-24 17:59:49 +000014632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14633$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014634if ${ac_cv_file__dev_ptmx+:} false; then :
14635 $as_echo_n "(cached) " >&6
14636else
14637 test "$cross_compiling" = yes &&
14638 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14639if test -r "/dev/ptmx"; then
14640 ac_cv_file__dev_ptmx=yes
14641else
14642 ac_cv_file__dev_ptmx=no
14643fi
14644fi
14645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14646$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14647if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014648
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014649fi
14650
14651if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014652
Matthias Kloseb9621712010-04-24 17:59:49 +000014653$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014654
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14657$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014658if ${ac_cv_file__dev_ptc+:} false; then :
14659 $as_echo_n "(cached) " >&6
14660else
14661 test "$cross_compiling" = yes &&
14662 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14663if test -r "/dev/ptc"; then
14664 ac_cv_file__dev_ptc=yes
14665else
14666 ac_cv_file__dev_ptc=no
14667fi
14668fi
14669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14670$as_echo "$ac_cv_file__dev_ptc" >&6; }
14671if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014672
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014673fi
14674
14675if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014676
Matthias Kloseb9621712010-04-24 17:59:49 +000014677$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014678
Neal Norwitz865400f2003-03-21 01:42:58 +000014679fi
14680
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014681if test "$have_long_long" = yes
14682then
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14684$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014685 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014687else
Matthias Kloseb9621712010-04-24 17:59:49 +000014688 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014689 ac_cv_have_long_long_format="cross -- assuming no"
14690 if test x$GCC = xyes; then
14691 save_CFLAGS=$CFLAGS
14692 CFLAGS="$CFLAGS -Werror -Wformat"
14693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14694/* end confdefs.h. */
14695
14696 #include <stdio.h>
14697 #include <stddef.h>
14698
14699int
14700main ()
14701{
14702
14703 char *buffer;
14704 sprintf(buffer, "%lld", (long long)123);
14705 sprintf(buffer, "%lld", (long long)-123);
14706 sprintf(buffer, "%llu", (unsigned long long)123);
14707
14708 ;
14709 return 0;
14710}
14711_ACEOF
14712if ac_fn_c_try_compile "$LINENO"; then :
14713 ac_cv_have_long_long_format=yes
14714
14715fi
14716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14717 CFLAGS=$save_CFLAGS
14718 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014719else
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014721/* end confdefs.h. */
14722
14723 #include <stdio.h>
14724 #include <stddef.h>
14725 #include <string.h>
14726
14727 #ifdef HAVE_SYS_TYPES_H
14728 #include <sys/types.h>
14729 #endif
14730
14731 int main()
14732 {
14733 char buffer[256];
14734
14735 if (sprintf(buffer, "%lld", (long long)123) < 0)
14736 return 1;
14737 if (strcmp(buffer, "123"))
14738 return 1;
14739
14740 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14741 return 1;
14742 if (strcmp(buffer, "-123"))
14743 return 1;
14744
14745 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14746 return 1;
14747 if (strcmp(buffer, "123"))
14748 return 1;
14749
14750 return 0;
14751 }
14752
14753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014754if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014755 ac_cv_have_long_long_format=yes
14756else
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14760 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014761fi
14762
14763
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014764fi
14765
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14767$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014768fi
14769
Mark Dickinson89d7d412009-12-31 20:50:59 +000014770if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014771then
14772
Matthias Kloseb9621712010-04-24 17:59:49 +000014773$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014774
14775fi
14776
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014777if test $ac_sys_system = Darwin
14778then
14779 LIBS="$LIBS -framework CoreFoundation"
14780fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014781
Matthias Kloseb9621712010-04-24 17:59:49 +000014782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14783$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014784if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014786else
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014788 ac_cv_have_size_t_format="cross -- assuming yes"
14789
Thomas Wouters477c8d52006-05-27 19:21:47 +000014790else
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014792/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014793
Thomas Wouters477c8d52006-05-27 19:21:47 +000014794#include <stdio.h>
14795#include <stddef.h>
14796#include <string.h>
14797
Christian Heimes2c181612007-12-17 20:04:13 +000014798#ifdef HAVE_SYS_TYPES_H
14799#include <sys/types.h>
14800#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014801
14802#ifdef HAVE_SSIZE_T
14803typedef ssize_t Py_ssize_t;
14804#elif SIZEOF_VOID_P == SIZEOF_LONG
14805typedef long Py_ssize_t;
14806#else
14807typedef int Py_ssize_t;
14808#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014809
Christian Heimes2c181612007-12-17 20:04:13 +000014810int main()
14811{
14812 char buffer[256];
14813
Thomas Wouters477c8d52006-05-27 19:21:47 +000014814 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14815 return 1;
14816
Thomas Wouters89f507f2006-12-13 04:49:30 +000014817 if (strcmp(buffer, "123"))
14818 return 1;
14819
14820 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14821 return 1;
14822
14823 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014824 return 1;
14825
14826 return 0;
14827}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014828
Thomas Wouters477c8d52006-05-27 19:21:47 +000014829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014830if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014831 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014832else
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014837fi
14838
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14841$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014842if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014843
Matthias Kloseb9621712010-04-24 17:59:49 +000014844$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014845
14846fi
14847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014849#ifdef HAVE_SYS_TYPES_H
14850#include <sys/types.h>
14851#endif
14852#ifdef HAVE_SYS_SOCKET_H
14853#include <sys/socket.h>
14854#endif
14855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856"
Victor Stinnere0be4232011-10-25 13:06:09 +020014857if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014858
Martin v. Löwis11437992002-04-12 09:54:03 +000014859else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014860
Matthias Kloseb9621712010-04-24 17:59:49 +000014861$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014862
14863fi
14864
Michael W. Hudson54241132001-12-07 15:38:26 +000014865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14867$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014868if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014870else
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014872 ac_cv_broken_mbstowcs=no
14873else
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014875/* end confdefs.h. */
14876
Stefan Krah19c21392012-11-22 23:47:32 +010014877#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014878#include<stdlib.h>
14879int main() {
14880 size_t len = -1;
14881 const char *str = "text";
14882 len = mbstowcs(NULL, str, 0);
14883 return (len != 4);
14884}
14885
14886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014887if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014888 ac_cv_broken_mbstowcs=no
14889else
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014894fi
14895
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014896fi
14897
Matthias Kloseb9621712010-04-24 17:59:49 +000014898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14899$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014900if test "$ac_cv_broken_mbstowcs" = yes
14901then
14902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014904
14905fi
14906
Antoine Pitroub52ec782009-01-25 16:34:23 +000014907# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14909$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014910
14911# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014912if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014913 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014914if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014915then
14916
Matthias Kloseb9621712010-04-24 17:59:49 +000014917$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014918
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14920$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014921fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014922if test "$withval" = no
14923then
14924
14925$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14926
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14928$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014929fi
14930
Antoine Pitrou042b1282010-08-13 21:15:58 +000014931else
14932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14933$as_echo "no value specified" >&6; }
14934fi
14935
Antoine Pitroub52ec782009-01-25 16:34:23 +000014936
Matthias Kloseb17289e2012-03-15 19:51:34 +010014937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14938$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14939if ${ac_cv_computed_gotos+:} false; then :
14940 $as_echo_n "(cached) " >&6
14941else
14942 if test "$cross_compiling" = yes; then :
14943 if test "${with_computed_gotos+set}" = set; then
14944 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14945 else
14946 ac_cv_computed_gotos=no
14947 fi
14948else
14949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14950/* end confdefs.h. */
14951
14952int main(int argc, char **argv)
14953{
14954 static void *targets[1] = { &&LABEL1 };
14955 goto LABEL2;
14956LABEL1:
14957 return 0;
14958LABEL2:
14959 goto *targets[0];
14960 return 1;
14961}
14962
14963_ACEOF
14964if ac_fn_c_try_run "$LINENO"; then :
14965 ac_cv_computed_gotos=yes
14966else
14967 ac_cv_computed_gotos=no
14968fi
14969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14970 conftest.$ac_objext conftest.beam conftest.$ac_ext
14971fi
14972
14973fi
14974
14975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14976$as_echo "$ac_cv_computed_gotos" >&6; }
14977case "$ac_cv_computed_gotos" in yes*)
14978
14979$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14980
14981esac
14982
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014983case $ac_sys_system in
14984AIX*)
14985
14986$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14987 ;;
14988esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014989
Michael W. Hudson54241132001-12-07 15:38:26 +000014990
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014991
14992
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014993for h in `(cd $srcdir;echo Python/thread_*.h)`
14994do
14995 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14996done
14997
Michael W. Hudson54241132001-12-07 15:38:26 +000014998
Neal Norwitzd24499d2005-12-18 21:36:39 +000014999SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15001$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015002for dir in $SRCDIRS; do
15003 if test ! -d $dir; then
15004 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015005 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015006done
Matthias Kloseb9621712010-04-24 17:59:49 +000015007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15008$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015009
Stefan Krah1919b7e2012-03-21 18:25:23 +010015010# Availability of -O2:
15011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15012$as_echo_n "checking for -O2... " >&6; }
15013saved_cflags="$CFLAGS"
15014CFLAGS="-O2"
15015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15016/* end confdefs.h. */
15017
15018int
15019main ()
15020{
15021
15022
15023 ;
15024 return 0;
15025}
15026_ACEOF
15027if ac_fn_c_try_compile "$LINENO"; then :
15028 have_O2=yes
15029else
15030 have_O2=no
15031fi
15032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15034$as_echo "$have_O2" >&6; }
15035CFLAGS="$saved_cflags"
15036
15037# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15038# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15040$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15041saved_cflags="$CFLAGS"
15042CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15043if test "$have_O2" = no; then
15044 CFLAGS=""
15045fi
15046if test "$cross_compiling" = yes; then :
15047 have_glibc_memmove_bug=undefined
15048else
15049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15050/* end confdefs.h. */
15051
15052#include <stdio.h>
15053#include <stdlib.h>
15054#include <string.h>
15055void foo(void *p, void *q) { memmove(p, q, 19); }
15056int main() {
15057 char a[32] = "123456789000000000";
15058 foo(&a[9], a);
15059 if (strcmp(a, "123456789123456789000000000") != 0)
15060 return 1;
15061 foo(a, &a[9]);
15062 if (strcmp(a, "123456789000000000") != 0)
15063 return 1;
15064 return 0;
15065}
15066
15067_ACEOF
15068if ac_fn_c_try_run "$LINENO"; then :
15069 have_glibc_memmove_bug=no
15070else
15071 have_glibc_memmove_bug=yes
15072fi
15073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15074 conftest.$ac_objext conftest.beam conftest.$ac_ext
15075fi
15076
15077CFLAGS="$saved_cflags"
15078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15079$as_echo "$have_glibc_memmove_bug" >&6; }
15080if test "$have_glibc_memmove_bug" = yes; then
15081
15082$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15083
15084fi
15085
15086if test "$have_gcc_asm_for_x87" = yes; then
15087 # Some versions of gcc miscompile inline asm:
15088 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15089 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15090 case $CC in
15091 *gcc*)
15092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15093$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15094 saved_cflags="$CFLAGS"
15095 CFLAGS="-O2"
15096 if test "$cross_compiling" = yes; then :
15097 have_ipa_pure_const_bug=undefined
15098else
15099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15100/* end confdefs.h. */
15101
15102 __attribute__((noinline)) int
15103 foo(int *p) {
15104 int r;
15105 asm ( "movl \$6, (%1)\n\t"
15106 "xorl %0, %0\n\t"
15107 : "=r" (r) : "r" (p) : "memory"
15108 );
15109 return r;
15110 }
15111 int main() {
15112 int p = 8;
15113 if ((foo(&p) ? : p) != 6)
15114 return 1;
15115 return 0;
15116 }
15117
15118_ACEOF
15119if ac_fn_c_try_run "$LINENO"; then :
15120 have_ipa_pure_const_bug=no
15121else
15122 have_ipa_pure_const_bug=yes
15123fi
15124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15125 conftest.$ac_objext conftest.beam conftest.$ac_ext
15126fi
15127
15128 CFLAGS="$saved_cflags"
15129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15130$as_echo "$have_ipa_pure_const_bug" >&6; }
15131 if test "$have_ipa_pure_const_bug" = yes; then
15132
15133$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15134
15135 fi
15136 ;;
15137 esac
15138fi
15139
Guido van Rossum627b2d71993-12-24 10:39:16 +000015140# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015141ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015142
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015143ac_config_files="$ac_config_files Modules/ld_so_aix"
15144
Martin v. Löwis11437992002-04-12 09:54:03 +000015145cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015146# This file is a shell script that caches the results of configure
15147# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015148# scripts and configure runs, see configure's option --config-cache.
15149# It is not useful on other systems. If it contains results you don't
15150# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015151#
Martin v. Löwis11437992002-04-12 09:54:03 +000015152# config.status only pays attention to the cache file if you give it
15153# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015154#
Skip Montanaro6dead952003-09-25 14:50:04 +000015155# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015156# loading this file, other *unset* `ac_cv_foo' will be assigned the
15157# following values.
15158
15159_ACEOF
15160
Guido van Rossumf78abae1997-01-21 22:02:36 +000015161# The following way of writing the cache mishandles newlines in values,
15162# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015164# Ultrix sh set writes to stderr and can't be redirected directly,
15165# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166(
15167 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15168 eval ac_val=\$$ac_var
15169 case $ac_val in #(
15170 *${as_nl}*)
15171 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15173$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174 esac
15175 case $ac_var in #(
15176 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15178 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015179 esac ;;
15180 esac
15181 done
15182
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015184 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15185 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015186 # `set' does not quote correctly, so add quotes: double-quote
15187 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015189 "s/'/'\\\\''/g;
15190 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 *)
15193 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196 esac |
15197 sort
15198) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015199 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15204 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015205 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15206 :end' >>confcache
15207if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15208 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015209 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015210 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15211$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015212 if test ! -f "$cache_file" || test -h "$cache_file"; then
15213 cat confcache >"$cache_file"
15214 else
15215 case $cache_file in #(
15216 */* | ?:*)
15217 mv -f confcache "$cache_file"$$ &&
15218 mv -f "$cache_file"$$ "$cache_file" ;; #(
15219 *)
15220 mv -f confcache "$cache_file" ;;
15221 esac
15222 fi
15223 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015224 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15226$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015227 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015228fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015229rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015230
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015231test "x$prefix" = xNONE && prefix=$ac_default_prefix
15232# Let make expand exec_prefix.
15233test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015234
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015235DEFS=-DHAVE_CONFIG_H
15236
Skip Montanaro6dead952003-09-25 14:50:04 +000015237ac_libobjs=
15238ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015239U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015240for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15241 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015243 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015244 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15245 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15247 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015248done
15249LIBOBJS=$ac_libobjs
15250
15251LTLIBOBJS=$ac_ltlibobjs
15252
15253
Martin v. Löwis11437992002-04-12 09:54:03 +000015254
Matthias Kloseb9621712010-04-24 17:59:49 +000015255
Victor Stinnere0be4232011-10-25 13:06:09 +020015256: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015257ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015258ac_clean_files_save=$ac_clean_files
15259ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015260{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15261$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15262as_write_fail=0
15263cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015264#! $SHELL
15265# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015266# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015267# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015268# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015269
Martin v. Löwis11437992002-04-12 09:54:03 +000015270debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015271ac_cs_recheck=false
15272ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015273
Matthias Kloseb9621712010-04-24 17:59:49 +000015274SHELL=\${CONFIG_SHELL-$SHELL}
15275export SHELL
15276_ASEOF
15277cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15278## -------------------- ##
15279## M4sh Initialization. ##
15280## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282# Be more Bourne compatible
15283DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015284if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 emulate sh
15286 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015288 # is contrary to our usage. Disable this feature.
15289 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015291else
Matthias Kloseb9621712010-04-24 17:59:49 +000015292 case `(set -o) 2>/dev/null` in #(
15293 *posix*) :
15294 set -o posix ;; #(
15295 *) :
15296 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015298fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015299
15300
Matthias Kloseb9621712010-04-24 17:59:49 +000015301as_nl='
15302'
15303export as_nl
15304# Printing a long string crashes Solaris 7 /usr/bin/printf.
15305as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15306as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15307as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15308# Prefer a ksh shell builtin over an external printf program on Solaris,
15309# but without wasting forks for bash or zsh.
15310if test -z "$BASH_VERSION$ZSH_VERSION" \
15311 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15312 as_echo='print -r --'
15313 as_echo_n='print -rn --'
15314elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15315 as_echo='printf %s\n'
15316 as_echo_n='printf %s'
15317else
15318 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15319 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15320 as_echo_n='/usr/ucb/echo -n'
15321 else
15322 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15323 as_echo_n_body='eval
15324 arg=$1;
15325 case $arg in #(
15326 *"$as_nl"*)
15327 expr "X$arg" : "X\\(.*\\)$as_nl";
15328 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15329 esac;
15330 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15331 '
15332 export as_echo_n_body
15333 as_echo_n='sh -c $as_echo_n_body as_echo'
15334 fi
15335 export as_echo_body
15336 as_echo='sh -c $as_echo_body as_echo'
15337fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015338
15339# The user is always right.
15340if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 PATH_SEPARATOR=:
15342 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15343 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15344 PATH_SEPARATOR=';'
15345 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348
15349# IFS
15350# We need space, tab and new line, in precisely that order. Quoting is
15351# there to prevent editors from complaining about space-tab.
15352# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15353# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354IFS=" "" $as_nl"
15355
15356# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015357as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015358case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015359 *[\\/]* ) as_myself=$0 ;;
15360 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015361for as_dir in $PATH
15362do
15363 IFS=$as_save_IFS
15364 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15366 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369 ;;
15370esac
15371# We did not find ourselves, most probably we were run as `sh COMMAND'
15372# in which case we are not to be found in the path.
15373if test "x$as_myself" = x; then
15374 as_myself=$0
15375fi
15376if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15378 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015379fi
15380
Matthias Kloseb9621712010-04-24 17:59:49 +000015381# Unset variables that we do not need and which cause bugs (e.g. in
15382# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15383# suppresses any "Segmentation fault" message there. '((' could
15384# trigger a bug in pdksh 5.2.14.
15385for as_var in BASH_ENV ENV MAIL MAILPATH
15386do eval test x\${$as_var+set} = xset \
15387 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388done
15389PS1='$ '
15390PS2='> '
15391PS4='+ '
15392
15393# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015394LC_ALL=C
15395export LC_ALL
15396LANGUAGE=C
15397export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398
Matthias Kloseb9621712010-04-24 17:59:49 +000015399# CDPATH.
15400(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15401
15402
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015403# as_fn_error STATUS ERROR [LINENO LOG_FD]
15404# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015407# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015408as_fn_error ()
15409{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015410 as_status=$1; test $as_status -eq 0 && as_status=1
15411 if test "$4"; then
15412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015414 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015415 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015416 as_fn_exit $as_status
15417} # as_fn_error
15418
15419
15420# as_fn_set_status STATUS
15421# -----------------------
15422# Set $? to STATUS, without forking.
15423as_fn_set_status ()
15424{
15425 return $1
15426} # as_fn_set_status
15427
15428# as_fn_exit STATUS
15429# -----------------
15430# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15431as_fn_exit ()
15432{
15433 set +e
15434 as_fn_set_status $1
15435 exit $1
15436} # as_fn_exit
15437
15438# as_fn_unset VAR
15439# ---------------
15440# Portably unset VAR.
15441as_fn_unset ()
15442{
15443 { eval $1=; unset $1;}
15444}
15445as_unset=as_fn_unset
15446# as_fn_append VAR VALUE
15447# ----------------------
15448# Append the text in VALUE to the end of the definition contained in VAR. Take
15449# advantage of any shell optimizations that allow amortized linear growth over
15450# repeated appends, instead of the typical quadratic growth present in naive
15451# implementations.
15452if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15453 eval 'as_fn_append ()
15454 {
15455 eval $1+=\$2
15456 }'
15457else
15458 as_fn_append ()
15459 {
15460 eval $1=\$$1\$2
15461 }
15462fi # as_fn_append
15463
15464# as_fn_arith ARG...
15465# ------------------
15466# Perform arithmetic evaluation on the ARGs, and store the result in the
15467# global $as_val. Take advantage of shells that can avoid forks. The arguments
15468# must be portable across $(()) and expr.
15469if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15470 eval 'as_fn_arith ()
15471 {
15472 as_val=$(( $* ))
15473 }'
15474else
15475 as_fn_arith ()
15476 {
15477 as_val=`expr "$@" || test $? -eq 1`
15478 }
15479fi # as_fn_arith
15480
15481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482if expr a : '\(a\)' >/dev/null 2>&1 &&
15483 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15484 as_expr=expr
15485else
15486 as_expr=false
15487fi
15488
15489if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15490 as_basename=basename
15491else
15492 as_basename=false
15493fi
15494
Matthias Kloseb9621712010-04-24 17:59:49 +000015495if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15496 as_dirname=dirname
15497else
15498 as_dirname=false
15499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015501as_me=`$as_basename -- "$0" ||
15502$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15503 X"$0" : 'X\(//\)$' \| \
15504 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015505$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015506 sed '/^.*\/\([^/][^/]*\)\/*$/{
15507 s//\1/
15508 q
15509 }
15510 /^X\/\(\/\/\)$/{
15511 s//\1/
15512 q
15513 }
15514 /^X\/\(\/\).*/{
15515 s//\1/
15516 q
15517 }
15518 s/.*/./; q'`
15519
Matthias Kloseb9621712010-04-24 17:59:49 +000015520# Avoid depending upon Character Ranges.
15521as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15522as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15523as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15524as_cr_digits='0123456789'
15525as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526
15527ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015528case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015529-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015531 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 xy) ECHO_C='\c';;
15533 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15534 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535 esac;;
15536*)
15537 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015538esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015539
Martin v. Löwis11437992002-04-12 09:54:03 +000015540rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015541if test -d conf$$.dir; then
15542 rm -f conf$$.dir/conf$$.file
15543else
15544 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015547if (echo >conf$$.file) 2>/dev/null; then
15548 if ln -s conf$$.file conf$$ 2>/dev/null; then
15549 as_ln_s='ln -s'
15550 # ... but there are two gotchas:
15551 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15552 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015553 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015555 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 elif ln conf$$.file conf$$ 2>/dev/null; then
15557 as_ln_s=ln
15558 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015559 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015560 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015561else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015562 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015564rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15565rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015566
Matthias Kloseb9621712010-04-24 17:59:49 +000015567
15568# as_fn_mkdir_p
15569# -------------
15570# Create "$as_dir" as a directory, including parents if necessary.
15571as_fn_mkdir_p ()
15572{
15573
15574 case $as_dir in #(
15575 -*) as_dir=./$as_dir;;
15576 esac
15577 test -d "$as_dir" || eval $as_mkdir_p || {
15578 as_dirs=
15579 while :; do
15580 case $as_dir in #(
15581 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15582 *) as_qdir=$as_dir;;
15583 esac
15584 as_dirs="'$as_qdir' $as_dirs"
15585 as_dir=`$as_dirname -- "$as_dir" ||
15586$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15587 X"$as_dir" : 'X\(//\)[^/]' \| \
15588 X"$as_dir" : 'X\(//\)$' \| \
15589 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15590$as_echo X"$as_dir" |
15591 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15592 s//\1/
15593 q
15594 }
15595 /^X\(\/\/\)[^/].*/{
15596 s//\1/
15597 q
15598 }
15599 /^X\(\/\/\)$/{
15600 s//\1/
15601 q
15602 }
15603 /^X\(\/\).*/{
15604 s//\1/
15605 q
15606 }
15607 s/.*/./; q'`
15608 test -d "$as_dir" && break
15609 done
15610 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015611 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015612
15613
15614} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015615if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015616 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015617else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015618 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015619 as_mkdir_p=false
15620fi
15621
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015622
15623# as_fn_executable_p FILE
15624# -----------------------
15625# Test if FILE is an executable regular file.
15626as_fn_executable_p ()
15627{
15628 test -f "$1" && test -x "$1"
15629} # as_fn_executable_p
15630as_test_x='test -x'
15631as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015632
15633# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015634as_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 +000015635
15636# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015637as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015638
15639
Martin v. Löwis11437992002-04-12 09:54:03 +000015640exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015641## ----------------------------------- ##
15642## Main body of $CONFIG_STATUS script. ##
15643## ----------------------------------- ##
15644_ASEOF
15645test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015646
Matthias Kloseb9621712010-04-24 17:59:49 +000015647cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15648# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015649# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015650# values after options handling.
15651ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015652This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015653generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015654
15655 CONFIG_FILES = $CONFIG_FILES
15656 CONFIG_HEADERS = $CONFIG_HEADERS
15657 CONFIG_LINKS = $CONFIG_LINKS
15658 CONFIG_COMMANDS = $CONFIG_COMMANDS
15659 $ $0 $@
15660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015661on `(hostname || uname -n) 2>/dev/null | sed 1q`
15662"
15663
Martin v. Löwis11437992002-04-12 09:54:03 +000015664_ACEOF
15665
Matthias Kloseb9621712010-04-24 17:59:49 +000015666case $ac_config_files in *"
15667"*) set x $ac_config_files; shift; ac_config_files=$*;;
15668esac
15669
15670case $ac_config_headers in *"
15671"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15672esac
15673
15674
15675cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015676# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015677config_files="$ac_config_files"
15678config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015680_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015681
Matthias Kloseb9621712010-04-24 17:59:49 +000015682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015683ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015684\`$as_me' instantiates files and other configuration actions
15685from templates according to the current configuration. Unless the files
15686and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015689
15690 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015692 --config print configuration, then exit
15693 -q, --quiet, --silent
15694 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015695 -d, --debug don't remove temporary files
15696 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 --file=FILE[:TEMPLATE]
15698 instantiate the configuration file FILE
15699 --header=FILE[:TEMPLATE]
15700 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015701
15702Configuration files:
15703$config_files
15704
15705Configuration headers:
15706$config_headers
15707
Matthias Kloseb9621712010-04-24 17:59:49 +000015708Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015711cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15712ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015713ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015714python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015715configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015716 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015717
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015718Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015719This config.status script is free software; the Free Software Foundation
15720gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015721
15722ac_pwd='$ac_pwd'
15723srcdir='$srcdir'
15724INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015725MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015726test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015727_ACEOF
15728
Matthias Kloseb9621712010-04-24 17:59:49 +000015729cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15730# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015731ac_need_defaults=:
15732while test $# != 0
15733do
15734 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015735 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15737 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015738 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015740 --*=)
15741 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15742 ac_optarg=
15743 ac_shift=:
15744 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015745 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015746 ac_option=$1
15747 ac_optarg=$2
15748 ac_shift=shift
15749 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 esac
15751
Skip Montanaro6dead952003-09-25 14:50:04 +000015752 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015753 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015754 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15755 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 $as_echo "$ac_cs_version"; exit ;;
15758 --config | --confi | --conf | --con | --co | --c )
15759 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015760 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 debug=: ;;
15762 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015763 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015764 case $ac_optarg in
15765 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015766 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015767 esac
15768 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 ac_need_defaults=false;;
15770 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015771 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015772 case $ac_optarg in
15773 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15774 esac
15775 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015776 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777 --he | --h)
15778 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015779 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015780Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015782 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015783 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15784 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15785 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015786
15787 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015788 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015789Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015790
Matthias Kloseb9621712010-04-24 17:59:49 +000015791 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015793
15794 esac
15795 shift
15796done
15797
Skip Montanaro6dead952003-09-25 14:50:04 +000015798ac_configure_extra_args=
15799
15800if $ac_cs_silent; then
15801 exec 6>/dev/null
15802 ac_configure_extra_args="$ac_configure_extra_args --silent"
15803fi
15804
15805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015806cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015807if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015808 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 shift
15810 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15811 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015813 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015814fi
15815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015817cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015818exec 5>>config.log
15819{
15820 echo
15821 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15822## Running $as_me. ##
15823_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015824 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015828cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015830
Matthias Kloseb9621712010-04-24 17:59:49 +000015831cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015832
15833# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015834for ac_config_target in $ac_config_targets
15835do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015836 case $ac_config_target in
15837 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15838 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15839 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015840 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15841 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015842 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15843 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015844 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015845 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015846
Victor Stinnere0be4232011-10-25 13:06:09 +020015847 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015848 esac
15849done
15850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851
Martin v. Löwis11437992002-04-12 09:54:03 +000015852# If the user did not use the arguments to specify the items to instantiate,
15853# then the envvar interface is used. Set only those that are not.
15854# We use the long form for the default assignment because of an extremely
15855# bizarre bug on SunOS 4.1.3.
15856if $ac_need_defaults; then
15857 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15858 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15859fi
15860
Skip Montanaro6dead952003-09-25 14:50:04 +000015861# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015863# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864# Hook for its removal unless debugging.
15865# Note that there is a small window in which the directory will not be cleaned:
15866# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015867$debug ||
15868{
Victor Stinnere0be4232011-10-25 13:06:09 +020015869 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015870 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015871 : "${ac_tmp:=$tmp}"
15872 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015873' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015874 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015875}
Martin v. Löwis11437992002-04-12 09:54:03 +000015876# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015877
Martin v. Löwis11437992002-04-12 09:54:03 +000015878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015879 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015880 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015881} ||
15882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015883 tmp=./conf$$-$RANDOM
15884 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015885} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015886ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015887
Matthias Kloseb9621712010-04-24 17:59:49 +000015888# Set up the scripts for CONFIG_FILES section.
15889# No need to generate them if there are no CONFIG_FILES.
15890# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015891if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015892
Matthias Kloseb9621712010-04-24 17:59:49 +000015893
15894ac_cr=`echo X | tr X '\015'`
15895# On cygwin, bash can eat \r inside `` if the user requested igncr.
15896# But we know of no other shell where ac_cr would be empty at this
15897# point, so we can use a bashism as a fallback.
15898if test "x$ac_cr" = x; then
15899 eval ac_cr=\$\'\\r\'
15900fi
15901ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15902if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015903 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015904else
15905 ac_cs_awk_cr=$ac_cr
15906fi
15907
Victor Stinnere0be4232011-10-25 13:06:09 +020015908echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015909_ACEOF
15910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015911
Matthias Kloseb9621712010-04-24 17:59:49 +000015912{
15913 echo "cat >conf$$subs.awk <<_ACEOF" &&
15914 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15915 echo "_ACEOF"
15916} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015917 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15918ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015919ac_delim='%!_!# '
15920for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015921 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015922 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923
Matthias Kloseb9621712010-04-24 17:59:49 +000015924 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15925 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015926 break
15927 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015928 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015929 else
15930 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015931 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932done
Matthias Kloseb9621712010-04-24 17:59:49 +000015933rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015934
Matthias Kloseb9621712010-04-24 17:59:49 +000015935cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015936cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015938sed -n '
15939h
15940s/^/S["/; s/!.*/"]=/
15941p
15942g
15943s/^[^!]*!//
15944:repl
15945t repl
15946s/'"$ac_delim"'$//
15947t delim
15948:nl
15949h
15950s/\(.\{148\}\)..*/\1/
15951t more1
15952s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15953p
15954n
15955b repl
15956:more1
15957s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15958p
15959g
15960s/.\{148\}//
15961t nl
15962:delim
15963h
15964s/\(.\{148\}\)..*/\1/
15965t more2
15966s/["\\]/\\&/g; s/^/"/; s/$/"/
15967p
15968b
15969:more2
15970s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15971p
15972g
15973s/.\{148\}//
15974t delim
15975' <conf$$subs.awk | sed '
15976/^[^""]/{
15977 N
15978 s/\n//
15979}
15980' >>$CONFIG_STATUS || ac_write_fail=1
15981rm -f conf$$subs.awk
15982cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15983_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015984cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 for (key in S) S_is_set[key] = 1
15986 FS = ""
15987
15988}
15989{
15990 line = $ 0
15991 nfields = split(line, field, "@")
15992 substed = 0
15993 len = length(field[1])
15994 for (i = 2; i < nfields; i++) {
15995 key = field[i]
15996 keylen = length(key)
15997 if (S_is_set[key]) {
15998 value = S[key]
15999 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16000 len += length(value) + length(field[++i])
16001 substed = 1
16002 } else
16003 len += 1 + keylen
16004 }
16005
16006 print line
16007}
16008
16009_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16012if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16013 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16014else
16015 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016016fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016017 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016018_ACEOF
16019
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016020# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16021# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016022# trailing colons and then remove the whole line if VPATH becomes empty
16023# (actually we leave an empty line to preserve line numbers).
16024if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016025 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16026h
16027s///
16028s/^/:/
16029s/[ ]*$/:/
16030s/:\$(srcdir):/:/g
16031s/:\${srcdir}:/:/g
16032s/:@srcdir@:/:/g
16033s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016034s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016035x
16036s/\(=[ ]*\).*/\1/
16037G
16038s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016039s/^[^=]*=[ ]*$//
16040}'
16041fi
16042
Matthias Kloseb9621712010-04-24 17:59:49 +000016043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016044fi # test -n "$CONFIG_FILES"
16045
Matthias Kloseb9621712010-04-24 17:59:49 +000016046# Set up the scripts for CONFIG_HEADERS section.
16047# No need to generate them if there are no CONFIG_HEADERS.
16048# This happens for instance with `./config.status Makefile'.
16049if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016050cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016051BEGIN {
16052_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016053
Matthias Kloseb9621712010-04-24 17:59:49 +000016054# Transform confdefs.h into an awk script `defines.awk', embedded as
16055# here-document in config.status, that substitutes the proper values into
16056# config.h.in to produce config.h.
16057
16058# Create a delimiter string that does not exist in confdefs.h, to ease
16059# handling of long lines.
16060ac_delim='%!_!# '
16061for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016062 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16063 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016064 break
16065 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016066 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016067 else
16068 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16069 fi
16070done
16071
16072# For the awk script, D is an array of macro values keyed by name,
16073# likewise P contains macro parameters if any. Preserve backslash
16074# newline sequences.
16075
16076ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16077sed -n '
16078s/.\{148\}/&'"$ac_delim"'/g
16079t rset
16080:rset
16081s/^[ ]*#[ ]*define[ ][ ]*/ /
16082t def
16083d
16084:def
16085s/\\$//
16086t bsnl
16087s/["\\]/\\&/g
16088s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16089D["\1"]=" \3"/p
16090s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16091d
16092:bsnl
16093s/["\\]/\\&/g
16094s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16095D["\1"]=" \3\\\\\\n"\\/p
16096t cont
16097s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16098t cont
16099d
16100:cont
16101n
16102s/.\{148\}/&'"$ac_delim"'/g
16103t clear
16104:clear
16105s/\\$//
16106t bsnlc
16107s/["\\]/\\&/g; s/^/"/; s/$/"/p
16108d
16109:bsnlc
16110s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16111b cont
16112' <confdefs.h | sed '
16113s/'"$ac_delim"'/"\\\
16114"/g' >>$CONFIG_STATUS || ac_write_fail=1
16115
16116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16117 for (key in D) D_is_set[key] = 1
16118 FS = ""
16119}
16120/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16121 line = \$ 0
16122 split(line, arg, " ")
16123 if (arg[1] == "#") {
16124 defundef = arg[2]
16125 mac1 = arg[3]
16126 } else {
16127 defundef = substr(arg[1], 2)
16128 mac1 = arg[2]
16129 }
16130 split(mac1, mac2, "(") #)
16131 macro = mac2[1]
16132 prefix = substr(line, 1, index(line, defundef) - 1)
16133 if (D_is_set[macro]) {
16134 # Preserve the white space surrounding the "#".
16135 print prefix "define", macro P[macro] D[macro]
16136 next
16137 } else {
16138 # Replace #undef with comments. This is necessary, for example,
16139 # in the case of _POSIX_SOURCE, which is predefined and required
16140 # on some systems where configure will not decide to define it.
16141 if (defundef == "undef") {
16142 print "/*", prefix defundef, macro, "*/"
16143 next
16144 }
16145 }
16146}
16147{ print }
16148_ACAWK
16149_ACEOF
16150cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016151 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016152fi # test -n "$CONFIG_HEADERS"
16153
16154
16155eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16156shift
16157for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016158do
16159 case $ac_tag in
16160 :[FHLC]) ac_mode=$ac_tag; continue;;
16161 esac
16162 case $ac_mode$ac_tag in
16163 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016164 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165 :[FH]-) ac_tag=-:-;;
16166 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16167 esac
16168 ac_save_IFS=$IFS
16169 IFS=:
16170 set x $ac_tag
16171 IFS=$ac_save_IFS
16172 shift
16173 ac_file=$1
16174 shift
16175
16176 case $ac_mode in
16177 :L) ac_source=$1;;
16178 :[FH])
16179 ac_file_inputs=
16180 for ac_f
16181 do
16182 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016183 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184 *) # Look for the file first in the build tree, then in the source tree
16185 # (if the path is not absolute). The absolute path cannot be DOS-style,
16186 # because $ac_f cannot contain `:'.
16187 test -f "$ac_f" ||
16188 case $ac_f in
16189 [\\/$]*) false;;
16190 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16191 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016192 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016193 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016194 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16195 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016196 done
16197
16198 # Let's still pretend it is `configure' which instantiates (i.e., don't
16199 # use $as_me), people would be surprised to read:
16200 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016201 configure_input='Generated from '`
16202 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16203 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204 if test x"$ac_file" != x-; then
16205 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016206 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16207$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016209 # Neutralize special characters interpreted by sed in replacement strings.
16210 case $configure_input in #(
16211 *\&* | *\|* | *\\* )
16212 ac_sed_conf_input=`$as_echo "$configure_input" |
16213 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16214 *) ac_sed_conf_input=$configure_input;;
16215 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216
16217 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016218 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16219 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016220 esac
16221 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 esac
16223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016225$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016226 X"$ac_file" : 'X\(//\)[^/]' \| \
16227 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016229$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16231 s//\1/
16232 q
16233 }
16234 /^X\(\/\/\)[^/].*/{
16235 s//\1/
16236 q
16237 }
16238 /^X\(\/\/\)$/{
16239 s//\1/
16240 q
16241 }
16242 /^X\(\/\).*/{
16243 s//\1/
16244 q
16245 }
16246 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016247 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016248 ac_builddir=.
16249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016250case "$ac_dir" in
16251.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16252*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016253 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016255 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256 case $ac_top_builddir_sub in
16257 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16258 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16259 esac ;;
16260esac
16261ac_abs_top_builddir=$ac_pwd
16262ac_abs_builddir=$ac_pwd$ac_dir_suffix
16263# for backward compatibility:
16264ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016265
16266case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016267 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269 ac_top_srcdir=$ac_top_builddir_sub
16270 ac_abs_top_srcdir=$ac_pwd ;;
16271 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273 ac_top_srcdir=$srcdir
16274 ac_abs_top_srcdir=$srcdir ;;
16275 *) # Relative name.
16276 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16277 ac_top_srcdir=$ac_top_build_prefix$srcdir
16278 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016279esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016281
Martin v. Löwis11437992002-04-12 09:54:03 +000016282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283 case $ac_mode in
16284 :F)
16285 #
16286 # CONFIG_FILE
16287 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016288
16289 case $INSTALL in
16290 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016291 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016292 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016293 ac_MKDIR_P=$MKDIR_P
16294 case $MKDIR_P in
16295 [\\/$]* | ?:[\\/]* ) ;;
16296 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16297 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016298_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016299
Matthias Kloseb9621712010-04-24 17:59:49 +000016300cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301# If the template does not know about datarootdir, expand it.
16302# FIXME: This hack should be removed a few years after 2.60.
16303ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016304ac_sed_dataroot='
16305/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306 p
16307 q
16308}
16309/@datadir@/p
16310/@docdir@/p
16311/@infodir@/p
16312/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016313/@mandir@/p'
16314case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315*datarootdir*) ac_datarootdir_seen=yes;;
16316*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016317 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16318$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016320cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321 ac_datarootdir_hack='
16322 s&@datadir@&$datadir&g
16323 s&@docdir@&$docdir&g
16324 s&@infodir@&$infodir&g
16325 s&@localedir@&$localedir&g
16326 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016327 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016328esac
16329_ACEOF
16330
16331# Neutralize VPATH when `$srcdir' = `.'.
16332# Shell code in configure.ac might set extrasub.
16333# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16335ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016336$extrasub
16337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016338cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016339:t
16340/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016341s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016343s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344s&@srcdir@&$ac_srcdir&;t t
16345s&@abs_srcdir@&$ac_abs_srcdir&;t t
16346s&@top_srcdir@&$ac_top_srcdir&;t t
16347s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16348s&@builddir@&$ac_builddir&;t t
16349s&@abs_builddir@&$ac_abs_builddir&;t t
16350s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16351s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016352s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016353$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016354"
Victor Stinnere0be4232011-10-25 13:06:09 +020016355eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16356 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016358test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016359 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16360 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16361 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016362 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016363which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016364$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016365which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016366
Victor Stinnere0be4232011-10-25 13:06:09 +020016367 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016369 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16370 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016371 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016372 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016373 ;;
16374 :H)
16375 #
16376 # CONFIG_HEADER
16377 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016378 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016379 {
16380 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016381 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16382 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016383 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016384 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016385 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16386$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016388 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016389 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016390 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016391 fi
16392 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016393 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016394 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016395 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399
16400 esac
16401
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016402
16403 case $ac_file$ac_mode in
16404 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16405
16406 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016407done # for ac_tag
16408
Guido van Rossum627b2d71993-12-24 10:39:16 +000016409
Matthias Kloseb9621712010-04-24 17:59:49 +000016410as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016411_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016412ac_clean_files=$ac_clean_files_save
16413
Matthias Kloseb9621712010-04-24 17:59:49 +000016414test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016415 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016416
Martin v. Löwis11437992002-04-12 09:54:03 +000016417
16418# configure is writing to config.log, and then calls config.status.
16419# config.status does its own redirection, appending to config.log.
16420# Unfortunately, on DOS this fails, as config.log is still kept open
16421# by configure, so config.status won't be able to write to it; its
16422# output is simply discarded. So we exec the FD to /dev/null,
16423# effectively closing config.log, so it can be properly (re)opened and
16424# appended to by config.status. When coming back to configure, we
16425# need to make the FD available again.
16426if test "$no_create" != yes; then
16427 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016428 ac_config_status_args=
16429 test "$silent" = yes &&
16430 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016432 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 exec 5>>config.log
16434 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16435 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016436 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016437fi
16438if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16439 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16440$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016441fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016442
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016443
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016444echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016445if test ! -f Modules/Setup
16446then
16447 cp $srcdir/Modules/Setup.dist Modules/Setup
16448fi
16449
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016450echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016451if test ! -f Modules/Setup.local
16452then
16453 echo "# Edit this file for local setup changes" >Modules/Setup.local
16454fi
16455
16456echo "creating Makefile"
16457$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16458 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016459 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016460mv config.c Modules