blob: 035f0ac4f949f791c8bd1469510d37e574967e17 [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
doko@python.org87421192013-01-26 11:39:31 +0100628LIBPL
629PY_ENABLE_SHARED
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000630SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
648LIBFFI_INCLUDEDIR
649PKG_CONFIG
650SHLIBS
651CFLAGSFORSHARED
652LINKFORSHARED
653CCSHARED
654BLDSHARED
655LDCXXSHARED
656LDSHARED
657SO
658LIBTOOL_CRUFT
659OTHER_LIBTOOL_OPT
660UNIVERSAL_ARCH_FLAGS
661BASECFLAGS
662OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000663ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100665MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000666INSTALL_DATA
667INSTALL_SCRIPT
668INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200669PYTHON
670ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200671ac_ct_READELF
672READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000673ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200674ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000675AR
676RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000677USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000678GNULD
679LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000680LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000681RUNSHARED
682INSTSONAME
683LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000684PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000685BLDLIBRARY
686DLLLIBRARY
687LDLIBRARY
688LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100689MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000690BUILDEXEEXT
691EGREP
692GREP
693CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200694NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200695ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000696MAINCC
697CXX
698OBJEXT
699EXEEXT
700ac_ct_CC
701CPPFLAGS
702LDFLAGS
703CFLAGS
704CC
705EXPORT_MACOSX_DEPLOYMENT_TARGET
706CONFIGURE_MACOSX_DEPLOYMENT_TARGET
707SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200708_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000709MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000710FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000711FRAMEWORKUNIXTOOLSPREFIX
712FRAMEWORKALTINSTALLLAST
713FRAMEWORKALTINSTALLFIRST
714FRAMEWORKINSTALLLAST
715FRAMEWORKINSTALLFIRST
716PYTHONFRAMEWORKINSTALLDIR
717PYTHONFRAMEWORKPREFIX
718PYTHONFRAMEWORKDIR
719PYTHONFRAMEWORKIDENTIFIER
720PYTHONFRAMEWORK
721LIPO_32BIT_FLAGS
722ARCH_RUN_32BIT
723UNIVERSALSDK
724CONFIG_ARGS
725SOVERSION
726VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200727PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100728host_os
729host_vendor
730host_cpu
731host
732build_os
733build_vendor
734build_cpu
735build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500736HAS_HG
737HGBRANCH
738HGTAG
739HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400740BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000741target_alias
742host_alias
743build_alias
744LIBS
745ECHO_T
746ECHO_N
747ECHO_C
748DEFS
749mandir
750localedir
751libdir
752psdir
753pdfdir
754dvidir
755htmldir
756infodir
757docdir
758oldincludedir
759includedir
760localstatedir
761sharedstatedir
762sysconfdir
763datadir
764datarootdir
765libexecdir
766sbindir
767bindir
768program_transform_name
769prefix
770exec_prefix
771PACKAGE_URL
772PACKAGE_BUGREPORT
773PACKAGE_STRING
774PACKAGE_VERSION
775PACKAGE_TARNAME
776PACKAGE_NAME
777PATH_SEPARATOR
778SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000779ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000780ac_user_opts='
781enable_option_checking
782enable_universalsdk
783with_universal_archs
784with_framework_name
785enable_framework
786with_gcc
787with_cxx_main
788with_suffix
789enable_shared
790enable_profiling
791with_pydebug
792with_libs
793with_system_expat
794with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100795with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000796enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000797with_dbmliborder
798with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000799with_threads
800with_thread
801enable_ipv6
802with_doc_strings
803with_tsc
804with_pymalloc
805with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000806with_fpectl
807with_libm
808with_libc
809enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_computed_gotos
811'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000812 ac_precious_vars='build_alias
813host_alias
814target_alias
815CC
816CFLAGS
817LDFLAGS
818LIBS
819CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200820CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821
Guido van Rossum627b2d71993-12-24 10:39:16 +0000822
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000824ac_init_help=
825ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000826ac_unrecognized_opts=
827ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828# The variables have the same names as the options, with
829# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000830cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833no_recursion=
834prefix=NONE
835program_prefix=NONE
836program_suffix=NONE
837program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000842x_includes=NONE
843x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000844
845# Installation directory options.
846# These are left unexpanded so users can "make install exec_prefix=/foo"
847# and all the variables that are supposed to be based on exec_prefix
848# by default will actually change.
849# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851bindir='${exec_prefix}/bin'
852sbindir='${exec_prefix}/sbin'
853libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854datarootdir='${prefix}/share'
855datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000856sysconfdir='${prefix}/etc'
857sharedstatedir='${prefix}/com'
858localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859includedir='${prefix}/include'
860oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
862infodir='${datarootdir}/info'
863htmldir='${docdir}'
864dvidir='${docdir}'
865pdfdir='${docdir}'
866psdir='${docdir}'
867libdir='${exec_prefix}/lib'
868localedir='${datarootdir}/locale'
869mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000874do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 # If the previous option needs an argument, assign it.
876 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 ac_prev=
879 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000880 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000882 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200883 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
884 *=) ac_optarg= ;;
885 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Accept the important Cygnus configure options, so we can diagnose typos.
889
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890 case $ac_dashdash$ac_option in
891 --)
892 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894 -bindir | --bindir | --bindi | --bind | --bin | --bi)
895 ac_prev=bindir ;;
896 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898
899 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904 -cache-file | --cache-file | --cache-fil | --cache-fi \
905 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
906 ac_prev=cache_file ;;
907 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
908 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000909 cache_file=$ac_optarg ;;
910
911 --config-cache | -C)
912 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000913
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
920 | --dataroo | --dataro | --datar)
921 ac_prev=datarootdir ;;
922 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
923 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
924 datarootdir=$ac_optarg ;;
925
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000927 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000929 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200930 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000931 ac_useropt_orig=$ac_useropt
932 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
933 case $ac_user_opts in
934 *"
935"enable_$ac_useropt"
936"*) ;;
937 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
938 ac_unrecognized_sep=', ';;
939 esac
940 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941
942 -docdir | --docdir | --docdi | --doc | --do)
943 ac_prev=docdir ;;
944 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
945 docdir=$ac_optarg ;;
946
947 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
948 ac_prev=dvidir ;;
949 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
950 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
952 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000953 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000955 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200956 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000957 ac_useropt_orig=$ac_useropt
958 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
959 case $ac_user_opts in
960 *"
961"enable_$ac_useropt"
962"*) ;;
963 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
964 ac_unrecognized_sep=', ';;
965 esac
966 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
969 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
970 | --exec | --exe | --ex)
971 ac_prev=exec_prefix ;;
972 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
973 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
974 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976
977 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000978 # Obsolete; use --with-gas.
979 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 -help | --help | --hel | --he | -h)
982 ac_init_help=long ;;
983 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
984 ac_init_help=recursive ;;
985 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
986 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
994 ac_prev=htmldir ;;
995 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
996 | --ht=*)
997 htmldir=$ac_optarg ;;
998
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999 -includedir | --includedir | --includedi | --included | --include \
1000 | --includ | --inclu | --incl | --inc)
1001 ac_prev=includedir ;;
1002 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1003 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
1006 -infodir | --infodir | --infodi | --infod | --info | --inf)
1007 ac_prev=infodir ;;
1008 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010
1011 -libdir | --libdir | --libdi | --libd)
1012 ac_prev=libdir ;;
1013 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015
1016 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1017 | --libexe | --libex | --libe)
1018 ac_prev=libexecdir ;;
1019 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1020 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001023 -localedir | --localedir | --localedi | --localed | --locale)
1024 ac_prev=localedir ;;
1025 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1026 localedir=$ac_optarg ;;
1027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 ac_prev=localstatedir ;;
1031 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
1035 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1036 ac_prev=mandir ;;
1037 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041 # Obsolete; use --without-fp.
1042 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
1044 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 no_create=yes ;;
1047
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1049 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1050 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1053 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1054 | --oldin | --oldi | --old | --ol | --o)
1055 ac_prev=oldincludedir ;;
1056 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1057 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1058 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1062 ac_prev=prefix ;;
1063 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1067 | --program-pre | --program-pr | --program-p)
1068 ac_prev=program_prefix ;;
1069 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1070 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1074 | --program-suf | --program-su | --program-s)
1075 ac_prev=program_suffix ;;
1076 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1077 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -program-transform-name | --program-transform-name \
1081 | --program-transform-nam | --program-transform-na \
1082 | --program-transform-n | --program-transform- \
1083 | --program-transform | --program-transfor \
1084 | --program-transfo | --program-transf \
1085 | --program-trans | --program-tran \
1086 | --progr-tra | --program-tr | --program-t)
1087 ac_prev=program_transform_name ;;
1088 -program-transform-name=* | --program-transform-name=* \
1089 | --program-transform-nam=* | --program-transform-na=* \
1090 | --program-transform-n=* | --program-transform-=* \
1091 | --program-transform=* | --program-transfor=* \
1092 | --program-transfo=* | --program-transf=* \
1093 | --program-trans=* | --program-tran=* \
1094 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001097 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1098 ac_prev=pdfdir ;;
1099 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1100 pdfdir=$ac_optarg ;;
1101
1102 -psdir | --psdir | --psdi | --psd | --ps)
1103 ac_prev=psdir ;;
1104 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1105 psdir=$ac_optarg ;;
1106
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1108 | -silent | --silent | --silen | --sile | --sil)
1109 silent=yes ;;
1110
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001111 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1112 ac_prev=sbindir ;;
1113 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1114 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116
1117 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1118 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1119 | --sharedst | --shareds | --shared | --share | --shar \
1120 | --sha | --sh)
1121 ac_prev=sharedstatedir ;;
1122 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1123 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1124 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1125 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001127
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001128 -site | --site | --sit)
1129 ac_prev=site ;;
1130 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1134 ac_prev=srcdir ;;
1135 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001138 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1139 | --syscon | --sysco | --sysc | --sys | --sy)
1140 ac_prev=sysconfdir ;;
1141 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1142 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
1150 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1151 verbose=yes ;;
1152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 -version | --version | --versio | --versi | --vers | -V)
1154 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001157 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001159 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001160 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 ac_useropt_orig=$ac_useropt
1162 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1163 case $ac_user_opts in
1164 *"
1165"with_$ac_useropt"
1166"*) ;;
1167 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1168 ac_unrecognized_sep=', ';;
1169 esac
1170 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171
1172 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001176 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 ac_useropt_orig=$ac_useropt
1178 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1179 case $ac_user_opts in
1180 *"
1181"with_$ac_useropt"
1182"*) ;;
1183 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1184 ac_unrecognized_sep=', ';;
1185 esac
1186 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188 --x)
1189 # Obsolete; use --with-x.
1190 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1193 | --x-incl | --x-inc | --x-in | --x-i)
1194 ac_prev=x_includes ;;
1195 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1196 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1200 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1201 ac_prev=x_libraries ;;
1202 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1203 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001206 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1207Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 ;;
1209
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 *=*)
1211 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 case $ac_envvar in #(
1214 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001217 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 export $ac_envvar ;;
1219
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001220 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001225 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226 ;;
1227
1228 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001229done
1230
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001233 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234fi
1235
Matthias Kloseb9621712010-04-24 17:59:49 +00001236if test -n "$ac_unrecognized_opts"; then
1237 case $enable_option_checking in
1238 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001239 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001240 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1241 esac
1242fi
1243
1244# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1246 datadir sysconfdir sharedstatedir localstatedir includedir \
1247 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1248 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001249do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 # Remove trailing slashes.
1252 case $ac_val in
1253 */ )
1254 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1255 eval $ac_var=\$ac_val;;
1256 esac
1257 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 [\\/$]* | ?:[\\/]* ) continue;;
1260 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001262 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001263done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001264
Martin v. Löwis11437992002-04-12 09:54:03 +00001265# There might be people who depend on the old broken behavior: `$host'
1266# used to hold the argument of --host etc.
1267# FIXME: To remove some day.
1268build=$build_alias
1269host=$host_alias
1270target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272# FIXME: To remove some day.
1273if test "x$host_alias" != x; then
1274 if test "x$build_alias" = x; then
1275 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 elif test "x$build_alias" != "x$host_alias"; then
1277 cross_compiling=yes
1278 fi
1279fi
1280
1281ac_tool_prefix=
1282test -n "$host_alias" && ac_tool_prefix=$host_alias-
1283
1284test "$silent" = yes && exec 6>/dev/null
1285
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287ac_pwd=`pwd` && test -n "$ac_pwd" &&
1288ac_ls_di=`ls -di .` &&
1289ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001292 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293
1294
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295# Find the source files, if location was not specified.
1296if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001297 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001299 ac_confdir=`$as_dirname -- "$as_myself" ||
1300$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1301 X"$as_myself" : 'X\(//\)[^/]' \| \
1302 X"$as_myself" : 'X\(//\)$' \| \
1303 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1304$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1306 s//\1/
1307 q
1308 }
1309 /^X\(\/\/\)[^/].*/{
1310 s//\1/
1311 q
1312 }
1313 /^X\(\/\/\)$/{
1314 s//\1/
1315 q
1316 }
1317 /^X\(\/\).*/{
1318 s//\1/
1319 q
1320 }
1321 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001322 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324 srcdir=..
1325 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001326else
1327 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329if test ! -r "$srcdir/$ac_unique_file"; then
1330 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1334ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 pwd)`
1337# When building in place, set srcdir=.
1338if test "$ac_abs_confdir" = "$ac_pwd"; then
1339 srcdir=.
1340fi
1341# Remove unnecessary trailing slashes from srcdir.
1342# Double slashes in file names in object file debugging info
1343# mess up M-x gdb in Emacs.
1344case $srcdir in
1345*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1346esac
1347for ac_var in $ac_precious_vars; do
1348 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1349 eval ac_env_${ac_var}_value=\$${ac_var}
1350 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1351 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1352done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001353
Martin v. Löwis11437992002-04-12 09:54:03 +00001354#
1355# Report the --help message.
1356#
1357if test "$ac_init_help" = "long"; then
1358 # Omit some internal or obsolete options to make the list less imposing.
1359 # This message is too long to be a string in the A/UX 3.1 sh.
1360 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001361\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001362
1363Usage: $0 [OPTION]... [VAR=VALUE]...
1364
1365To assign environment variables (e.g., CC, CFLAGS...), specify them as
1366VAR=VALUE. See below for descriptions of some of the useful variables.
1367
1368Defaults for the options are specified in brackets.
1369
1370Configuration:
1371 -h, --help display this help and exit
1372 --help=short display options specific to this package
1373 --help=recursive display the short help of all the included packages
1374 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001376 --cache-file=FILE cache test results in FILE [disabled]
1377 -C, --config-cache alias for \`--cache-file=config.cache'
1378 -n, --no-create do not create output files
1379 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1380
Martin v. Löwis11437992002-04-12 09:54:03 +00001381Installation directories:
1382 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001383 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001385 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
1387By default, \`make install' will install all the files in
1388\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1389an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1390for instance \`--prefix=\$HOME'.
1391
1392For better control, use the options below.
1393
1394Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 --bindir=DIR user executables [EPREFIX/bin]
1396 --sbindir=DIR system admin executables [EPREFIX/sbin]
1397 --libexecdir=DIR program executables [EPREFIX/libexec]
1398 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1399 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1400 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1401 --libdir=DIR object code libraries [EPREFIX/lib]
1402 --includedir=DIR C header files [PREFIX/include]
1403 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1404 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1405 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1406 --infodir=DIR info documentation [DATAROOTDIR/info]
1407 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1408 --mandir=DIR man documentation [DATAROOTDIR/man]
1409 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1410 --htmldir=DIR html documentation [DOCDIR]
1411 --dvidir=DIR dvi documentation [DOCDIR]
1412 --pdfdir=DIR pdf documentation [DOCDIR]
1413 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001414_ACEOF
1415
1416 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001417
1418System types:
1419 --build=BUILD configure for building on BUILD [guessed]
1420 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001421_ACEOF
1422fi
1423
1424if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001425 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001426 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001427 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 cat <<\_ACEOF
1429
1430Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1433 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001434 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001435 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --enable-framework[=INSTALLDIR]
1437 Build (MacOSX|Darwin) framework
1438 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001439 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001440 --enable-loadable-sqlite-extensions
1441 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --enable-ipv6 Enable ipv6 (with ipv4) support
1443 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001444 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
1447Optional Packages:
1448 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1449 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001450 --with-universal-archs=ARCH
1451 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001452 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001453 --with-framework-name=FRAMEWORK
1454 specify an alternate name of the framework built
1455 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001457 --with-cxx-main=<compiler>
1458 compile main() and link python executable with C++
1459 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --with-suffix=.exe set executable suffix
1461 --with-pydebug build with Py_DEBUG defined
1462 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001463 --with-system-expat build pyexpat module using an installed expat
1464 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001465 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001466 --with-system-libmpdec build _decimal module using an installed libmpdec
1467 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001468 --with-dbmliborder=db1:db2:...
1469 order to check db backends for dbm. Valid value is a
1470 colon separated string with the backend names
1471 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --with(out)-threads[=DIRECTORY]
1474 disable/enable thread support
1475 --with(out)-thread[=DIRECTORY]
1476 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001478 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001480 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --with-fpectl enable SIGFPE catching
1482 --with-libm=STRING math library
1483 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001484 --with(out)-computed-gotos
1485 Use computed gotos in evaluation loop (enabled by
1486 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Some influential environment variables:
1489 CC C compiler command
1490 CFLAGS C compiler flags
1491 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1492 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001494 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 CPP C preprocessor
1497
1498Use these variables to override the choices made by `configure' or to help
1499it to find libraries and programs with nonstandard names/locations.
1500
Georg Brandle2e15612009-05-20 18:25:10 +00001501Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001502_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001504fi
1505
1506if test "$ac_init_help" = "recursive"; then
1507 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001509 test -d "$ac_dir" ||
1510 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1511 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 ac_builddir=.
1513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514case "$ac_dir" in
1515.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1516*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001517 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001519 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 case $ac_top_builddir_sub in
1521 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1522 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1523 esac ;;
1524esac
1525ac_abs_top_builddir=$ac_pwd
1526ac_abs_builddir=$ac_pwd$ac_dir_suffix
1527# for backward compatibility:
1528ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001529
1530case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001533 ac_top_srcdir=$ac_top_builddir_sub
1534 ac_abs_top_srcdir=$ac_pwd ;;
1535 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537 ac_top_srcdir=$srcdir
1538 ac_abs_top_srcdir=$srcdir ;;
1539 *) # Relative name.
1540 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1541 ac_top_srcdir=$ac_top_build_prefix$srcdir
1542 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001543esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001546 cd "$ac_dir" || { ac_status=$?; continue; }
1547 # Check for guested configure.
1548 if test -f "$ac_srcdir/configure.gnu"; then
1549 echo &&
1550 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1551 elif test -f "$ac_srcdir/configure"; then
1552 echo &&
1553 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001555 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 fi || ac_status=$?
1557 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001558 done
1559fi
1560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001562if $ac_init_version; then
1563 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001564python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001565generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001566
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001567Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568This configure script is free software; the Free Software Foundation
1569gives unlimited permission to copy, distribute and modify it.
1570_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001571 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001573
1574## ------------------------ ##
1575## Autoconf initialization. ##
1576## ------------------------ ##
1577
1578# ac_fn_c_try_compile LINENO
1579# --------------------------
1580# Try to compile conftest.$ac_ext, and return whether this succeeded.
1581ac_fn_c_try_compile ()
1582{
1583 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1584 rm -f conftest.$ac_objext
1585 if { { ac_try="$ac_compile"
1586case "(($ac_try" in
1587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1588 *) ac_try_echo=$ac_try;;
1589esac
1590eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1591$as_echo "$ac_try_echo"; } >&5
1592 (eval "$ac_compile") 2>conftest.err
1593 ac_status=$?
1594 if test -s conftest.err; then
1595 grep -v '^ *+' conftest.err >conftest.er1
1596 cat conftest.er1 >&5
1597 mv -f conftest.er1 conftest.err
1598 fi
1599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1600 test $ac_status = 0; } && {
1601 test -z "$ac_c_werror_flag" ||
1602 test ! -s conftest.err
1603 } && test -s conftest.$ac_objext; then :
1604 ac_retval=0
1605else
1606 $as_echo "$as_me: failed program was:" >&5
1607sed 's/^/| /' conftest.$ac_ext >&5
1608
1609 ac_retval=1
1610fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001611 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001612 as_fn_set_status $ac_retval
1613
1614} # ac_fn_c_try_compile
1615
Matthias Kloseb9621712010-04-24 17:59:49 +00001616# ac_fn_c_try_link LINENO
1617# -----------------------
1618# Try to link conftest.$ac_ext, and return whether this succeeded.
1619ac_fn_c_try_link ()
1620{
1621 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1622 rm -f conftest.$ac_objext conftest$ac_exeext
1623 if { { ac_try="$ac_link"
1624case "(($ac_try" in
1625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1626 *) ac_try_echo=$ac_try;;
1627esac
1628eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1629$as_echo "$ac_try_echo"; } >&5
1630 (eval "$ac_link") 2>conftest.err
1631 ac_status=$?
1632 if test -s conftest.err; then
1633 grep -v '^ *+' conftest.err >conftest.er1
1634 cat conftest.er1 >&5
1635 mv -f conftest.er1 conftest.err
1636 fi
1637 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1638 test $ac_status = 0; } && {
1639 test -z "$ac_c_werror_flag" ||
1640 test ! -s conftest.err
1641 } && test -s conftest$ac_exeext && {
1642 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001643 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001644 }; then :
1645 ac_retval=0
1646else
1647 $as_echo "$as_me: failed program was:" >&5
1648sed 's/^/| /' conftest.$ac_ext >&5
1649
1650 ac_retval=1
1651fi
1652 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1653 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1654 # interfere with the next link command; also delete a directory that is
1655 # left behind by Apple's compiler. We do this before executing the actions.
1656 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001657 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 as_fn_set_status $ac_retval
1659
1660} # ac_fn_c_try_link
1661
Matthias Kloseb9621712010-04-24 17:59:49 +00001662# ac_fn_c_try_cpp LINENO
1663# ----------------------
1664# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1665ac_fn_c_try_cpp ()
1666{
1667 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1668 if { { ac_try="$ac_cpp conftest.$ac_ext"
1669case "(($ac_try" in
1670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1671 *) ac_try_echo=$ac_try;;
1672esac
1673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1674$as_echo "$ac_try_echo"; } >&5
1675 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1676 ac_status=$?
1677 if test -s conftest.err; then
1678 grep -v '^ *+' conftest.err >conftest.er1
1679 cat conftest.er1 >&5
1680 mv -f conftest.er1 conftest.err
1681 fi
1682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001683 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001684 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1685 test ! -s conftest.err
1686 }; then :
1687 ac_retval=0
1688else
1689 $as_echo "$as_me: failed program was:" >&5
1690sed 's/^/| /' conftest.$ac_ext >&5
1691
1692 ac_retval=1
1693fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001694 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001695 as_fn_set_status $ac_retval
1696
1697} # ac_fn_c_try_cpp
1698
1699# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1700# -------------------------------------------------------
1701# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1702# the include files in INCLUDES and setting the cache variable VAR
1703# accordingly.
1704ac_fn_c_check_header_mongrel ()
1705{
1706 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001707 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1709$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001710if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001711 $as_echo_n "(cached) " >&6
1712fi
1713eval ac_res=\$$3
1714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1715$as_echo "$ac_res" >&6; }
1716else
1717 # Is the header compilable?
1718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1719$as_echo_n "checking $2 usability... " >&6; }
1720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1721/* end confdefs.h. */
1722$4
1723#include <$2>
1724_ACEOF
1725if ac_fn_c_try_compile "$LINENO"; then :
1726 ac_header_compiler=yes
1727else
1728 ac_header_compiler=no
1729fi
1730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1732$as_echo "$ac_header_compiler" >&6; }
1733
1734# Is the header present?
1735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1736$as_echo_n "checking $2 presence... " >&6; }
1737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1738/* end confdefs.h. */
1739#include <$2>
1740_ACEOF
1741if ac_fn_c_try_cpp "$LINENO"; then :
1742 ac_header_preproc=yes
1743else
1744 ac_header_preproc=no
1745fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001746rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1748$as_echo "$ac_header_preproc" >&6; }
1749
1750# So? What about this header?
1751case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1752 yes:no: )
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1754$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1756$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1757 ;;
1758 no:yes:* )
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1760$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1762$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1764$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1766$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1768$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001769( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001770## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001771## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001772 ) | sed "s/^/$as_me: WARNING: /" >&2
1773 ;;
1774esac
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1776$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001777if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 $as_echo_n "(cached) " >&6
1779else
1780 eval "$3=\$ac_header_compiler"
1781fi
1782eval ac_res=\$$3
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1784$as_echo "$ac_res" >&6; }
1785fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001786 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001787
1788} # ac_fn_c_check_header_mongrel
1789
1790# ac_fn_c_try_run LINENO
1791# ----------------------
1792# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1793# that executables *can* be run.
1794ac_fn_c_try_run ()
1795{
1796 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1797 if { { ac_try="$ac_link"
1798case "(($ac_try" in
1799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1800 *) ac_try_echo=$ac_try;;
1801esac
1802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1803$as_echo "$ac_try_echo"; } >&5
1804 (eval "$ac_link") 2>&5
1805 ac_status=$?
1806 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1807 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1808 { { case "(($ac_try" in
1809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1810 *) ac_try_echo=$ac_try;;
1811esac
1812eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1813$as_echo "$ac_try_echo"; } >&5
1814 (eval "$ac_try") 2>&5
1815 ac_status=$?
1816 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1817 test $ac_status = 0; }; }; then :
1818 ac_retval=0
1819else
1820 $as_echo "$as_me: program exited with status $ac_status" >&5
1821 $as_echo "$as_me: failed program was:" >&5
1822sed 's/^/| /' conftest.$ac_ext >&5
1823
1824 ac_retval=$ac_status
1825fi
1826 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001827 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001828 as_fn_set_status $ac_retval
1829
1830} # ac_fn_c_try_run
1831
1832# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1833# -------------------------------------------------------
1834# Tests whether HEADER exists and can be compiled using the include files in
1835# INCLUDES, setting the cache variable VAR accordingly.
1836ac_fn_c_check_header_compile ()
1837{
1838 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1840$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001841if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 $as_echo_n "(cached) " >&6
1843else
1844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1845/* end confdefs.h. */
1846$4
1847#include <$2>
1848_ACEOF
1849if ac_fn_c_try_compile "$LINENO"; then :
1850 eval "$3=yes"
1851else
1852 eval "$3=no"
1853fi
1854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1855fi
1856eval ac_res=\$$3
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1858$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001859 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001860
1861} # ac_fn_c_check_header_compile
1862
Matthias Kloseb9621712010-04-24 17:59:49 +00001863# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1864# -------------------------------------------
1865# Tests whether TYPE exists after having included INCLUDES, setting cache
1866# variable VAR accordingly.
1867ac_fn_c_check_type ()
1868{
1869 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1871$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001872if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001873 $as_echo_n "(cached) " >&6
1874else
1875 eval "$3=no"
1876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878$4
1879int
1880main ()
1881{
1882if (sizeof ($2))
1883 return 0;
1884 ;
1885 return 0;
1886}
1887_ACEOF
1888if ac_fn_c_try_compile "$LINENO"; then :
1889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1890/* end confdefs.h. */
1891$4
1892int
1893main ()
1894{
1895if (sizeof (($2)))
1896 return 0;
1897 ;
1898 return 0;
1899}
1900_ACEOF
1901if ac_fn_c_try_compile "$LINENO"; then :
1902
1903else
1904 eval "$3=yes"
1905fi
1906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1907fi
1908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1909fi
1910eval ac_res=\$$3
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1912$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001913 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001914
1915} # ac_fn_c_check_type
1916
1917# ac_fn_c_find_uintX_t LINENO BITS VAR
1918# ------------------------------------
1919# Finds an unsigned integer type with width BITS, setting cache variable VAR
1920# accordingly.
1921ac_fn_c_find_uintX_t ()
1922{
1923 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1925$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001926if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001927 $as_echo_n "(cached) " >&6
1928else
1929 eval "$3=no"
1930 # Order is important - never check a type that is potentially smaller
1931 # than half of the expected target width.
1932 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1933 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1935/* end confdefs.h. */
1936$ac_includes_default
1937int
1938main ()
1939{
1940static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001941test_array [0] = 0;
1942return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001943
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 case $ac_type in #(
1950 uint$2_t) :
1951 eval "$3=yes" ;; #(
1952 *) :
1953 eval "$3=\$ac_type" ;;
1954esac
1955fi
1956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001957 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001958
1959else
1960 break
1961fi
1962 done
1963fi
1964eval ac_res=\$$3
1965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1966$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001967 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001968
1969} # ac_fn_c_find_uintX_t
1970
1971# ac_fn_c_find_intX_t LINENO BITS VAR
1972# -----------------------------------
1973# Finds a signed integer type with width BITS, setting cache variable VAR
1974# accordingly.
1975ac_fn_c_find_intX_t ()
1976{
1977 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1979$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001980if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001981 $as_echo_n "(cached) " >&6
1982else
1983 eval "$3=no"
1984 # Order is important - never check a type that is potentially smaller
1985 # than half of the expected target width.
1986 for ac_type in int$2_t 'int' 'long int' \
1987 'long long int' 'short int' 'signed char'; do
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989/* end confdefs.h. */
1990$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001991 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001992int
1993main ()
1994{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001995static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001996test_array [0] = 0;
1997return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001998
1999 ;
2000 return 0;
2001}
2002_ACEOF
2003if ac_fn_c_try_compile "$LINENO"; then :
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002007 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002008int
2009main ()
2010{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002011static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002012 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002013test_array [0] = 0;
2014return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002015
2016 ;
2017 return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021
2022else
2023 case $ac_type in #(
2024 int$2_t) :
2025 eval "$3=yes" ;; #(
2026 *) :
2027 eval "$3=\$ac_type" ;;
2028esac
2029fi
2030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2031fi
2032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002033 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035else
2036 break
2037fi
2038 done
2039fi
2040eval ac_res=\$$3
2041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2042$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002043 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002044
2045} # ac_fn_c_find_intX_t
2046
2047# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2048# --------------------------------------------
2049# Tries to find the compile-time value of EXPR in a program that includes
2050# INCLUDES, setting VAR accordingly. Returns whether the value could be
2051# computed
2052ac_fn_c_compute_int ()
2053{
2054 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2055 if test "$cross_compiling" = yes; then
2056 # Depending upon the size, compute the lo and hi bounds.
2057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002064test_array [0] = 0;
2065return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=0 ac_mid=0
2073 while :; do
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002081test_array [0] = 0;
2082return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002083
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_hi=$ac_mid; break
2090else
2091 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2092 if test $ac_lo -le $ac_mid; then
2093 ac_lo= ac_hi=
2094 break
2095 fi
2096 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099 done
2100else
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002108test_array [0] = 0;
2109return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002110
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_hi=-1 ac_mid=-1
2117 while :; do
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002125test_array [0] = 0;
2126return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002127
2128 ;
2129 return 0;
2130}
2131_ACEOF
2132if ac_fn_c_try_compile "$LINENO"; then :
2133 ac_lo=$ac_mid; break
2134else
2135 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2136 if test $ac_mid -le $ac_hi; then
2137 ac_lo= ac_hi=
2138 break
2139 fi
2140 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2141fi
2142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 done
2144else
2145 ac_lo= ac_hi=
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150# Binary search between lo and hi bounds.
2151while test "x$ac_lo" != "x$ac_hi"; do
2152 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2154/* end confdefs.h. */
2155$4
2156int
2157main ()
2158{
2159static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002160test_array [0] = 0;
2161return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_compile "$LINENO"; then :
2168 ac_hi=$ac_mid
2169else
2170 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2171fi
2172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173done
2174case $ac_lo in #((
2175?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2176'') ac_retval=1 ;;
2177esac
2178 else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180/* end confdefs.h. */
2181$4
2182static long int longval () { return $2; }
2183static unsigned long int ulongval () { return $2; }
2184#include <stdio.h>
2185#include <stdlib.h>
2186int
2187main ()
2188{
2189
2190 FILE *f = fopen ("conftest.val", "w");
2191 if (! f)
2192 return 1;
2193 if (($2) < 0)
2194 {
2195 long int i = longval ();
2196 if (i != ($2))
2197 return 1;
2198 fprintf (f, "%ld", i);
2199 }
2200 else
2201 {
2202 unsigned long int i = ulongval ();
2203 if (i != ($2))
2204 return 1;
2205 fprintf (f, "%lu", i);
2206 }
2207 /* Do not output a trailing newline, as this causes \r\n confusion
2208 on some platforms. */
2209 return ferror (f) || fclose (f) != 0;
2210
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215if ac_fn_c_try_run "$LINENO"; then :
2216 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2217else
2218 ac_retval=1
2219fi
2220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2221 conftest.$ac_objext conftest.beam conftest.$ac_ext
2222rm -f conftest.val
2223
2224 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002225 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002226 as_fn_set_status $ac_retval
2227
2228} # ac_fn_c_compute_int
2229
2230# ac_fn_c_check_func LINENO FUNC VAR
2231# ----------------------------------
2232# Tests whether FUNC exists, setting the cache variable VAR accordingly
2233ac_fn_c_check_func ()
2234{
2235 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2237$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002238if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002239 $as_echo_n "(cached) " >&6
2240else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
2243/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2244 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2245#define $2 innocuous_$2
2246
2247/* System header to define __stub macros and hopefully few prototypes,
2248 which can conflict with char $2 (); below.
2249 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2250 <limits.h> exists even on freestanding compilers. */
2251
2252#ifdef __STDC__
2253# include <limits.h>
2254#else
2255# include <assert.h>
2256#endif
2257
2258#undef $2
2259
2260/* Override any GCC internal prototype to avoid an error.
2261 Use char because int might match the return type of a GCC
2262 builtin and then its argument prototype would still apply. */
2263#ifdef __cplusplus
2264extern "C"
2265#endif
2266char $2 ();
2267/* The GNU C library defines this for functions which it implements
2268 to always fail with ENOSYS. Some functions are actually named
2269 something starting with __ and the normal name is an alias. */
2270#if defined __stub_$2 || defined __stub___$2
2271choke me
2272#endif
2273
2274int
2275main ()
2276{
2277return $2 ();
2278 ;
2279 return 0;
2280}
2281_ACEOF
2282if ac_fn_c_try_link "$LINENO"; then :
2283 eval "$3=yes"
2284else
2285 eval "$3=no"
2286fi
2287rm -f core conftest.err conftest.$ac_objext \
2288 conftest$ac_exeext conftest.$ac_ext
2289fi
2290eval ac_res=\$$3
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2292$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002293 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002294
2295} # ac_fn_c_check_func
2296
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002297# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2298# ---------------------------------------------
2299# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2300# accordingly.
2301ac_fn_c_check_decl ()
2302{
2303 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304 as_decl_name=`echo $2|sed 's/ *(.*//'`
2305 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2307$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2308if eval \${$3+:} false; then :
2309 $as_echo_n "(cached) " >&6
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$4
2314int
2315main ()
2316{
2317#ifndef $as_decl_name
2318#ifdef __cplusplus
2319 (void) $as_decl_use;
2320#else
2321 (void) $as_decl_name;
2322#endif
2323#endif
2324
2325 ;
2326 return 0;
2327}
2328_ACEOF
2329if ac_fn_c_try_compile "$LINENO"; then :
2330 eval "$3=yes"
2331else
2332 eval "$3=no"
2333fi
2334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335fi
2336eval ac_res=\$$3
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2338$as_echo "$ac_res" >&6; }
2339 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2340
2341} # ac_fn_c_check_decl
2342
Matthias Kloseb9621712010-04-24 17:59:49 +00002343# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2344# ----------------------------------------------------
2345# Tries to find if the field MEMBER exists in type AGGR, after including
2346# INCLUDES, setting cache variable VAR accordingly.
2347ac_fn_c_check_member ()
2348{
2349 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2351$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002352if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002353 $as_echo_n "(cached) " >&6
2354else
2355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356/* end confdefs.h. */
2357$5
2358int
2359main ()
2360{
2361static $2 ac_aggr;
2362if (ac_aggr.$3)
2363return 0;
2364 ;
2365 return 0;
2366}
2367_ACEOF
2368if ac_fn_c_try_compile "$LINENO"; then :
2369 eval "$4=yes"
2370else
2371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2372/* end confdefs.h. */
2373$5
2374int
2375main ()
2376{
2377static $2 ac_aggr;
2378if (sizeof ac_aggr.$3)
2379return 0;
2380 ;
2381 return 0;
2382}
2383_ACEOF
2384if ac_fn_c_try_compile "$LINENO"; then :
2385 eval "$4=yes"
2386else
2387 eval "$4=no"
2388fi
2389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2390fi
2391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2392fi
2393eval ac_res=\$$4
2394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2395$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002396 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002397
2398} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002400This file contains any messages produced by compilers while
2401running configure, to aid debugging if configure makes a mistake.
2402
Georg Brandl08a90122012-09-29 09:34:13 +02002403It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002404generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002405
2406 $ $0 $@
2407
2408_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002410{
2411cat <<_ASUNAME
2412## --------- ##
2413## Platform. ##
2414## --------- ##
2415
2416hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2417uname -m = `(uname -m) 2>/dev/null || echo unknown`
2418uname -r = `(uname -r) 2>/dev/null || echo unknown`
2419uname -s = `(uname -s) 2>/dev/null || echo unknown`
2420uname -v = `(uname -v) 2>/dev/null || echo unknown`
2421
2422/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2423/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2424
2425/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2426/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2427/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002428/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002429/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2430/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2431/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2432
2433_ASUNAME
2434
2435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2436for as_dir in $PATH
2437do
2438 IFS=$as_save_IFS
2439 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002440 $as_echo "PATH: $as_dir"
2441 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444} >&5
2445
2446cat >&5 <<_ACEOF
2447
2448
2449## ----------- ##
2450## Core tests. ##
2451## ----------- ##
2452
2453_ACEOF
2454
2455
2456# Keep a trace of the command line.
2457# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002458# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002459# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002460# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002461ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002462ac_configure_args0=
2463ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002464ac_must_keep_next=false
2465for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002466do
Skip Montanaro6dead952003-09-25 14:50:04 +00002467 for ac_arg
2468 do
2469 case $ac_arg in
2470 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2471 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2472 | -silent | --silent | --silen | --sile | --sil)
2473 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 esac
2477 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002479 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002481 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002482 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002484 case $ac_arg in
2485 *=* | --config-cache | -C | -disable-* | --disable-* \
2486 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2487 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2488 | -with-* | --with-* | -without-* | --without-* | --x)
2489 case "$ac_configure_args0 " in
2490 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2491 esac
2492 ;;
2493 -* ) ac_must_keep_next=true ;;
2494 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 ;;
2498 esac
2499 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002500done
Matthias Kloseb9621712010-04-24 17:59:49 +00002501{ ac_configure_args0=; unset ac_configure_args0;}
2502{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002503
2504# When interrupted or exit'd, cleanup temporary files, and complete
2505# config.log. We remove comments because anyway the quotes in there
2506# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507# WARNING: Use '\'' to represent an apostrophe within the trap.
2508# 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 +00002509trap 'exit_status=$?
2510 # Save into config.log some information that might help in debugging.
2511 {
2512 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002513
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002515## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 echo
2518 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519(
2520 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2521 eval ac_val=\$$ac_var
2522 case $ac_val in #(
2523 *${as_nl}*)
2524 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2526$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 esac
2528 case $ac_var in #(
2529 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2531 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 esac ;;
2533 esac
2534 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2537 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 "s/'\''/'\''\\\\'\'''\''/g;
2540 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2541 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002542 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002544 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545 esac |
2546 sort
2547)
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002549
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002551## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002553 echo
2554 for ac_var in $ac_subst_vars
2555 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 eval ac_val=\$$ac_var
2557 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002560 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002561 done | sort
2562 echo
2563
2564 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002565 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002567## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002568 echo
2569 for ac_var in $ac_subst_files
2570 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571 eval ac_val=\$$ac_var
2572 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002573 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002576 done | sort
2577 echo
2578 fi
2579
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002581 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002582## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002583## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 echo
2587 fi
2588 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 $as_echo "$as_me: caught signal $ac_signal"
2590 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 rm -f core *.core core.conftest.* &&
2593 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002596for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002598done
2599ac_signal=0
2600
2601# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002603
Matthias Kloseb9621712010-04-24 17:59:49 +00002604$as_echo "/* confdefs.h */" > confdefs.h
2605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606# Predefined preprocessor variables.
2607
2608cat >>confdefs.h <<_ACEOF
2609#define PACKAGE_NAME "$PACKAGE_NAME"
2610_ACEOF
2611
Martin v. Löwis11437992002-04-12 09:54:03 +00002612cat >>confdefs.h <<_ACEOF
2613#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2614_ACEOF
2615
Martin v. Löwis11437992002-04-12 09:54:03 +00002616cat >>confdefs.h <<_ACEOF
2617#define PACKAGE_VERSION "$PACKAGE_VERSION"
2618_ACEOF
2619
Martin v. Löwis11437992002-04-12 09:54:03 +00002620cat >>confdefs.h <<_ACEOF
2621#define PACKAGE_STRING "$PACKAGE_STRING"
2622_ACEOF
2623
Martin v. Löwis11437992002-04-12 09:54:03 +00002624cat >>confdefs.h <<_ACEOF
2625#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2626_ACEOF
2627
Matthias Kloseb9621712010-04-24 17:59:49 +00002628cat >>confdefs.h <<_ACEOF
2629#define PACKAGE_URL "$PACKAGE_URL"
2630_ACEOF
2631
Martin v. Löwis11437992002-04-12 09:54:03 +00002632
2633# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002634# Prefer an explicitly selected file to automatically selected ones.
2635ac_site_file1=NONE
2636ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002638 # We do not want a PATH search for config.site.
2639 case $CONFIG_SITE in #((
2640 -*) ac_site_file1=./$CONFIG_SITE;;
2641 */*) ac_site_file1=$CONFIG_SITE;;
2642 *) ac_site_file1=./$CONFIG_SITE;;
2643 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 ac_site_file1=$prefix/share/config.site
2646 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002647else
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 ac_site_file1=$ac_default_prefix/share/config.site
2649 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002651for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652do
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 test "x$ac_site_file" = xNONE && continue
2654 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2656$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002658 . "$ac_site_file" \
2659 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2660$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2661as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002662See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002663 fi
2664done
2665
2666if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 # Some versions of bash will fail to source /dev/null (special files
2668 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2669 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2671$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2674 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 esac
2676 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677else
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2679$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 >$cache_file
2681fi
2682
2683# Check that the precious variables saved in the cache have kept the same
2684# value.
2685ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2688 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2690 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 case $ac_old_set,$ac_new_set in
2692 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002693 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2694$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 +00002695 ac_cache_corrupted=: ;;
2696 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2698$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002699 ac_cache_corrupted=: ;;
2700 ,);;
2701 *)
2702 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002703 # differences in whitespace do not lead to failure.
2704 ac_old_val_w=`echo x $ac_old_val`
2705 ac_new_val_w=`echo x $ac_new_val`
2706 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2708$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2709 ac_cache_corrupted=:
2710 else
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2712$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2713 eval $ac_var=\$ac_old_val
2714 fi
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2716$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2718$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 fi;;
2720 esac
2721 # Pass precious variables to config.status.
2722 if test "$ac_new_set" = set; then
2723 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002724 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002725 *) ac_arg=$ac_var=$ac_new_val ;;
2726 esac
2727 case " $ac_configure_args " in
2728 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002729 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 esac
2731 fi
2732done
2733if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002734 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2737$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002738 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002740## -------------------- ##
2741## Main body of script. ##
2742## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002743
Guido van Rossum7f43da71994-08-01 12:15:30 +00002744ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002745ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002746ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2747ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2748ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002749
Guido van Rossum627b2d71993-12-24 10:39:16 +00002750
Michael W. Hudson54241132001-12-07 15:38:26 +00002751
Trent Nelson4d4ec652012-10-16 08:51:24 -04002752
Trent Nelson5595ab52012-10-17 04:47:31 -04002753if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002754 # If we're building out-of-tree, we need to make sure the following
2755 # resources get picked up before their $srcdir counterparts.
2756 # Objects/ -> typeslots.inc
2757 # Include/ -> Python-ast.h, graminit.h
2758 # Python/ -> importlib.h
2759 # (A side effect of this is that these resources will automatically be
2760 # regenerated when building out-of-tree, regardless of whether or not
2761 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2762 # off.)
2763 BASECPPFLAGS="-IObjects -IInclude -IPython"
2764else
2765 BASECPPFLAGS=""
2766fi
2767
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002768
2769
2770
2771
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002772if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773then
2774# Extract the first word of "hg", so it can be a program name with args.
2775set dummy hg; ac_word=$2
2776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2777$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002778if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779 $as_echo_n "(cached) " >&6
2780else
2781 if test -n "$HAS_HG"; then
2782 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2783else
2784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2785for as_dir in $PATH
2786do
2787 IFS=$as_save_IFS
2788 test -z "$as_dir" && as_dir=.
2789 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002791 ac_cv_prog_HAS_HG="found"
2792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2793 break 2
2794 fi
2795done
2796 done
2797IFS=$as_save_IFS
2798
2799 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2800fi
2801fi
2802HAS_HG=$ac_cv_prog_HAS_HG
2803if test -n "$HAS_HG"; then
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2805$as_echo "$HAS_HG" >&6; }
2806else
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2808$as_echo "no" >&6; }
2809fi
2810
2811
2812else
2813HAS_HG=no-repository
2814fi
2815if test $HAS_HG = found
2816then
2817 HGVERSION="hg id -i \$(srcdir)"
2818 HGTAG="hg id -t \$(srcdir)"
2819 HGBRANCH="hg id -b \$(srcdir)"
2820else
2821 HGVERSION=""
2822 HGTAG=""
2823 HGBRANCH=""
2824fi
2825
2826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002828
2829
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002830ac_aux_dir=
2831for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2832 if test -f "$ac_dir/install-sh"; then
2833 ac_aux_dir=$ac_dir
2834 ac_install_sh="$ac_aux_dir/install-sh -c"
2835 break
2836 elif test -f "$ac_dir/install.sh"; then
2837 ac_aux_dir=$ac_dir
2838 ac_install_sh="$ac_aux_dir/install.sh -c"
2839 break
2840 elif test -f "$ac_dir/shtool"; then
2841 ac_aux_dir=$ac_dir
2842 ac_install_sh="$ac_aux_dir/shtool install -c"
2843 break
2844 fi
2845done
2846if test -z "$ac_aux_dir"; then
2847 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2848fi
2849
2850# These three variables are undocumented and unsupported,
2851# and are intended to be withdrawn in a future Autoconf release.
2852# They can cause serious problems if a builder's source tree is in a directory
2853# whose full name contains unusual characters.
2854ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2855ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2856ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2857
2858
2859# Make sure we can run config.sub.
2860$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2861 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2862
2863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2864$as_echo_n "checking build system type... " >&6; }
2865if ${ac_cv_build+:} false; then :
2866 $as_echo_n "(cached) " >&6
2867else
2868 ac_build_alias=$build_alias
2869test "x$ac_build_alias" = x &&
2870 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2871test "x$ac_build_alias" = x &&
2872 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2873ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2874 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2875
2876fi
2877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2878$as_echo "$ac_cv_build" >&6; }
2879case $ac_cv_build in
2880*-*-*) ;;
2881*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2882esac
2883build=$ac_cv_build
2884ac_save_IFS=$IFS; IFS='-'
2885set x $ac_cv_build
2886shift
2887build_cpu=$1
2888build_vendor=$2
2889shift; shift
2890# Remember, the first character of IFS is used to create $*,
2891# except with old shells:
2892build_os=$*
2893IFS=$ac_save_IFS
2894case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2895
2896
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2898$as_echo_n "checking host system type... " >&6; }
2899if ${ac_cv_host+:} false; then :
2900 $as_echo_n "(cached) " >&6
2901else
2902 if test "x$host_alias" = x; then
2903 ac_cv_host=$ac_cv_build
2904else
2905 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2906 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2907fi
2908
2909fi
2910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2911$as_echo "$ac_cv_host" >&6; }
2912case $ac_cv_host in
2913*-*-*) ;;
2914*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2915esac
2916host=$ac_cv_host
2917ac_save_IFS=$IFS; IFS='-'
2918set x $ac_cv_host
2919shift
2920host_cpu=$1
2921host_vendor=$2
2922shift; shift
2923# Remember, the first character of IFS is used to create $*,
2924# except with old shells:
2925host_os=$*
2926IFS=$ac_save_IFS
2927case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2928
2929
2930
doko@python.orga10e4a92013-01-25 18:45:12 +01002931
2932
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002933if test "$cross_compiling" = yes; then
2934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2935$as_echo_n "checking for python interpreter for cross build... " >&6; }
2936 if test -z "$PYTHON_FOR_BUILD"; then
2937 for interp in python$PACKAGE_VERSION python3 python; do
2938 which $interp >/dev/null 2>&1 || continue
2939 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2940 break
2941 fi
2942 interp=
2943 done
2944 if test x$interp = x; then
2945 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2946 fi
2947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2948$as_echo "$interp" >&6; }
doko@python.org97313302013-01-25 14:33:33 +01002949 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002950 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002951elif test "$cross_compiling" = maybe; then
2952 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002953else
2954 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2955fi
2956
2957
Martin v. Löwis11437992002-04-12 09:54:03 +00002958
Benjamin Petersond23f8222009-04-05 19:13:16 +00002959if test "$prefix" != "/"; then
2960 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2961fi
2962
2963
Martin v. Löwis11437992002-04-12 09:54:03 +00002964
2965
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002966# We don't use PACKAGE_ variables, and they cause conflicts
2967# with other autoconf-based packages that include Python.h
2968grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2969rm confdefs.h
2970mv confdefs.h.new confdefs.h
2971
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002972
Georg Brandl08a90122012-09-29 09:34:13 +02002973VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002974
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002975# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002976
2977SOVERSION=1.0
2978
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002979# The later defininition of _XOPEN_SOURCE disables certain features
2980# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002983
2984
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2986# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2987# them.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002990
2991
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002992# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2993# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2994# them.
2995
Matthias Kloseb9621712010-04-24 17:59:49 +00002996$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002997
2998
Martin v. Löwisd6320502004-08-12 13:45:08 +00002999# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3000# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003003
3004
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003005# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3006# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3007# them.
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003010
3011
3012
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003013define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003014
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003015# Arguments passed to configure.
3016
3017CONFIG_ARGS="$ac_configure_args"
3018
Matthias Kloseb9621712010-04-24 17:59:49 +00003019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3020$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003021# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003022if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003023 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024 case $enableval in
3025 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003026 # Locate the best usable SDK, see Mac/README.txt for more
3027 # information
3028 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3029 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003031 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3032 if test ! -d "${enableval}"
3033 then
3034 enableval=/
3035 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003036 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037 ;;
3038 esac
3039 case $enableval in
3040 no)
3041 UNIVERSALSDK=
3042 enable_universalsdk=
3043 ;;
3044 *)
3045 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046 if test ! -d "${UNIVERSALSDK}"
3047 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003048 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050 ;;
3051 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003052
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053
Thomas Wouters477c8d52006-05-27 19:21:47 +00003054else
3055
3056 UNIVERSALSDK=
3057 enable_universalsdk=
3058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003059fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003060
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003061if test -n "${UNIVERSALSDK}"
3062then
Matthias Kloseb9621712010-04-24 17:59:49 +00003063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3064$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003065else
Matthias Kloseb9621712010-04-24 17:59:49 +00003066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3067$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003068fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003070
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003071
3072
Ned Deilycbfb9a52012-06-23 16:02:19 -07003073# For backward compatibility reasons we prefer to select '32-bit' if available,
3074# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003076if test "`uname -s`" = "Darwin"
3077then
3078 if test -n "${UNIVERSALSDK}"
3079 then
3080 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3081 then
3082 UNIVERSAL_ARCHS="intel"
3083 fi
3084 fi
3085fi
3086
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003087
Matthias Kloseb9621712010-04-24 17:59:49 +00003088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3089$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090
3091# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003092if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3095$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003096 UNIVERSAL_ARCHS="$withval"
3097
3098else
3099
Ned Deilycbfb9a52012-06-23 16:02:19 -07003100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3101$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003102
3103fi
3104
3105
3106
3107
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003108
3109# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003110if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003111 withval=$with_framework_name;
3112 PYTHONFRAMEWORK=${withval}
3113 PYTHONFRAMEWORKDIR=${withval}.framework
3114 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3115
3116else
3117
3118 PYTHONFRAMEWORK=Python
3119 PYTHONFRAMEWORKDIR=Python.framework
3120 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3121
3122fi
3123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003124# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003125if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003126 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003127 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003128 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003129 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 esac
3131 case $enableval in
3132 no)
3133 PYTHONFRAMEWORK=
3134 PYTHONFRAMEWORKDIR=no-framework
3135 PYTHONFRAMEWORKPREFIX=
3136 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003137 FRAMEWORKINSTALLFIRST=
3138 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 FRAMEWORKALTINSTALLFIRST=
3140 FRAMEWORKALTINSTALLLAST=
3141 if test "x${prefix}" = "xNONE"; then
3142 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3143 else
3144 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3145 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003146 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003147 ;;
3148 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003150 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003151 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003152 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003153 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3154 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003156
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 if test "x${prefix}" = "xNONE" ; then
3158 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003159
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003160 else
3161 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3162 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003163
3164 case "${enableval}" in
3165 /System*)
3166 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3167 if test "${prefix}" = "NONE" ; then
3168 # See below
3169 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3170 fi
3171 ;;
3172
3173 /Library*)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 ;;
3176
3177 */Library/Frameworks)
3178 MDIR="`dirname "${enableval}"`"
3179 MDIR="`dirname "${MDIR}"`"
3180 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3181
3182 if test "${prefix}" = "NONE"; then
3183 # User hasn't specified the
3184 # --prefix option, but wants to install
3185 # the framework in a non-default location,
3186 # ensure that the compatibility links get
3187 # installed relative to that prefix as well
3188 # instead of in /usr/local.
3189 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3190 fi
3191 ;;
3192
3193 *)
3194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3195 ;;
3196 esac
3197
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003206 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3207
3208 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3209
Jack Jansene578a632001-08-15 01:27:14 +00003210 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
Guido van Rossum563e7081996-09-10 18:20:48 +00003212else
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Jack Jansene578a632001-08-15 01:27:14 +00003214 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003215 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003216 PYTHONFRAMEWORKPREFIX=
3217 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218 FRAMEWORKINSTALLFIRST=
3219 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 FRAMEWORKALTINSTALLFIRST=
3221 FRAMEWORKALTINSTALLLAST=
3222 if test "x${prefix}" = "xNONE" ; then
3223 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3224 else
3225 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3226 fi
Jack Jansene578a632001-08-15 01:27:14 +00003227 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230fi
3231
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
3233
Michael W. Hudson54241132001-12-07 15:38:26 +00003234
3235
3236
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003239
3240
3241
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003242
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003243
Jack Jansene578a632001-08-15 01:27:14 +00003244##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003245## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003246## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003247##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248# Set name for machine-dependent library files
3249
Matthias Kloseb9621712010-04-24 17:59:49 +00003250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3251$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003252if test -z "$MACHDEP"
3253then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003254 # avoid using uname for cross builds
3255 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003256 # ac_sys_system and ac_sys_release are used for setting
3257 # a lot of different things including 'define_xopen_source'
3258 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003259 case "$host" in
3260 *-*-linux*)
3261 ac_sys_system=Linux
3262 ;;
3263 *-*-cygwin*)
3264 ac_sys_system=Cygwin
3265 ;;
3266 *)
3267 # for now, limit cross builds to known configurations
3268 MACHDEP="unknown"
3269 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3270 esac
3271 ac_sys_release=
3272 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003273 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003274 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003275 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003276 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003277 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003280 fi
3281 ac_md_system=`echo $ac_sys_system |
3282 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3283 ac_md_release=`echo $ac_sys_release |
3284 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3285 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003286
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003287 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003288 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003289 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003290 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003291 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003292 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003293 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003294fi
Guido van Rossum91922671997-10-09 20:24:13 +00003295
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003296
3297if test "$cross_compiling" = yes; then
3298 case "$host" in
3299 *-*-linux*)
3300 case "$host_cpu" in
3301 arm*)
3302 _host_cpu=arm
3303 ;;
3304 *)
3305 _host_cpu=$host_cpu
3306 esac
3307 ;;
3308 *-*-cygwin*)
3309 _host_cpu=
3310 ;;
3311 *)
3312 # for now, limit cross builds to known configurations
3313 MACHDEP="unknown"
3314 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3315 esac
3316 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3317fi
3318
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003319# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3320# disable features if it is defined, without any means to access these
3321# features as extensions. For these systems, we skip the definition of
3322# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3323# some feature, make sure there is no alternative way to access this
3324# feature. Also, when using wildcards, make sure you have verified the
3325# need for not defining _XOPEN_SOURCE on all systems matching the
3326# wildcard, and that the wildcard does not include future systems
3327# (which may remove their limitations).
3328case $ac_sys_system/$ac_sys_release in
3329 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3330 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003331 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003332 # In addition, Stefan Krah confirms that issue #1244610 exists through
3333 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003334 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003335 define_xopen_source=no
3336 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3337 # also defined. This can be overridden by defining _BSD_SOURCE
3338 # As this has a different meaning on Linux, only define it on OpenBSD
3339
Matthias Kloseb9621712010-04-24 17:59:49 +00003340$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003341
3342 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003343 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003344 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3345 # also defined. This can be overridden by defining _BSD_SOURCE
3346 # As this has a different meaning on Linux, only define it on OpenBSD
3347
Matthias Kloseb9621712010-04-24 17:59:49 +00003348$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003349
3350 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003351 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3352 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3353 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003354 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 +00003355 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003356 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3357 # request to enable features supported by the standard as a request
3358 # to disable features not supported by the standard. The best way
3359 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3360 # entirely and define __EXTENSIONS__ instead.
3361 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003362 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3364 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003365 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003366 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 define_xopen_source=no;;
3368 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003369 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003370 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003371 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003372 # On FreeBSD 4, the math functions C89 does not cover are never defined
3373 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3374 FreeBSD/4.*)
3375 define_xopen_source=no;;
3376 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3377 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3378 # identifies itself as Darwin/7.*
3379 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3380 # disables platform specific features beyond repair.
3381 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3382 # has no effect, don't bother defining them
3383 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003384 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003385 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003386 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003387 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3388 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3389 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003390 AIX/4)
3391 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003392 AIX/5)
3393 if test `uname -r` -eq 1; then
3394 define_xopen_source=no
3395 fi
3396 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003397 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3398 # defining NI_NUMERICHOST.
3399 QNX/6.3.2)
3400 define_xopen_source=no
3401 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003402
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403esac
3404
3405if test $define_xopen_source = yes
3406then
Victor Stinner14d098d2011-09-07 22:29:43 +02003407 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003408
Victor Stinner14d098d2011-09-07 22:29:43 +02003409$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003410
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3413 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3414 # several APIs are not declared. Since this is also needed in some
3415 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
Matthias Kloseb9621712010-04-24 17:59:49 +00003417$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
3419
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003420
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003421$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003423fi
3424
Guido van Rossum91922671997-10-09 20:24:13 +00003425#
3426# SGI compilers allow the specification of the both the ABI and the
3427# ISA on the command line. Depending on the values of these switches,
3428# different and often incompatable code will be generated.
3429#
3430# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3431# thus supply support for various ABI/ISA combinations. The MACHDEP
3432# variable is also adjusted.
3433#
3434
3435if test ! -z "$SGI_ABI"
3436then
3437 CC="cc $SGI_ABI"
3438 LDFLAGS="$SGI_ABI $LDFLAGS"
3439 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3442$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003443
Jack Jansen6b08a402004-06-03 12:41:45 +00003444# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3445# it may influence the way we can build extensions, so distutils
3446# needs to check it
3447
Thomas Wouters477c8d52006-05-27 19:21:47 +00003448
Jack Jansen6b08a402004-06-03 12:41:45 +00003449CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003450EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003451
Guido van Rossum627b2d71993-12-24 10:39:16 +00003452# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003453
3454# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3455# for debug/optimization stuff. BASECFLAGS is for flags that are required
3456# just to get things to compile and link. Users are free to override OPT
3457# when running configure or make. The build should not break if they do.
3458# BASECFLAGS should generally not be messed with, however.
3459
3460# XXX shouldn't some/most/all of this code be merged with the stuff later
3461# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3463$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003464
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003466if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003468 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003469 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003470 without_gcc=yes;;
3471 yes) CC=gcc
3472 without_gcc=no;;
3473 *) CC=$withval
3474 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003475 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003476else
Martin v. Löwis11437992002-04-12 09:54:03 +00003477
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003478 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003479 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003480 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003481 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003482 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003483fi
3484
Matthias Kloseb9621712010-04-24 17:59:49 +00003485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3486$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003487
Guido van Rossum8b131c51995-03-09 14:10:13 +00003488# If the user switches compilers, we can't believe the cache
3489if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3490then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003491 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003492(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003493fi
3494
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003495# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3496# when the compiler supports them, but we don't always want -O2, and
3497# we set -g later.
3498if test -z "$CFLAGS"; then
3499 CFLAGS=
3500fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003501
3502if test "$ac_sys_system" = "Darwin"
3503then
3504 # Compiler selection on MacOSX is more complicated than
3505 # AC_PROG_CC can handle, see Mac/README.txt for more
3506 # information
3507 if test -z "${CC}"
3508 then
3509 found_gcc=
3510 found_clang=
3511 as_save_IFS=$IFS; IFS=:
3512 for as_dir in $PATH
3513 do
3514 IFS=$as_save_IFS
3515 if test -x $as_dir/gcc; then
3516 if test -z "${found_gcc}"; then
3517 found_gcc=$as_dir/gcc
3518 fi
3519 fi
3520 if test -x $as_dir/clang; then
3521 if test -z "${found_clang}"; then
3522 found_clang=$as_dir/clang
3523 fi
3524 fi
3525 done
3526 IFS=$as_save_IFS
3527
3528 if test -n "$found_gcc" -a -n "$found_clang"
3529 then
3530 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3531 then
3532 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3533$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3534 CC="$found_clang"
3535 CXX="$found_clang++"
3536 fi
3537
3538
3539 elif test -z "$found_gcc" -a -n "$found_clang"
3540 then
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3542$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3543 CC="$found_clang"
3544 CXX="$found_clang++"
3545
3546 elif test -z "$found_gcc" -a -z "$found_clang"
3547 then
3548 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3549 if test -n "${found_clang}"
3550 then
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3552$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3553 CC="${found_clang}"
3554 CXX="`/usr/bin/xcrun -find clang++`"
3555
3556 # else: use default behaviour
3557 fi
3558 fi
3559 fi
3560fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003561ac_ext=c
3562ac_cpp='$CPP $CPPFLAGS'
3563ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3564ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3565ac_compiler_gnu=$ac_cv_c_compiler_gnu
3566if test -n "$ac_tool_prefix"; then
3567 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3568set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3570$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003571if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003572 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003573else
3574 if test -n "$CC"; then
3575 ac_cv_prog_CC="$CC" # Let the user override the test.
3576else
Martin v. Löwis11437992002-04-12 09:54:03 +00003577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3578for as_dir in $PATH
3579do
3580 IFS=$as_save_IFS
3581 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 $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 +00003586 break 2
3587 fi
3588done
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003591
Jack Jansendd19cf82001-12-06 22:36:17 +00003592fi
3593fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003594CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003595if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3597$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003598else
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3600$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003601fi
3602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603
Martin v. Löwis11437992002-04-12 09:54:03 +00003604fi
3605if test -z "$ac_cv_prog_CC"; then
3606 ac_ct_CC=$CC
3607 # Extract the first word of "gcc", so it can be a program name with args.
3608set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3610$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003611if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003613else
3614 if test -n "$ac_ct_CC"; then
3615 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3616else
3617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3618for as_dir in $PATH
3619do
3620 IFS=$as_save_IFS
3621 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003623 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 $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 +00003626 break 2
3627 fi
3628done
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003631
3632fi
3633fi
3634ac_ct_CC=$ac_cv_prog_ac_ct_CC
3635if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3637$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003638else
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3640$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003641fi
3642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643 if test "x$ac_ct_CC" = x; then
3644 CC=""
3645 else
3646 case $cross_compiling:$ac_tool_warned in
3647yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003648{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3649$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650ac_tool_warned=yes ;;
3651esac
3652 CC=$ac_ct_CC
3653 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003654else
3655 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003656fi
3657
Jack Jansendd19cf82001-12-06 22:36:17 +00003658if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 if test -n "$ac_tool_prefix"; then
3660 # 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 +00003661set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3663$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003664if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003666else
3667 if test -n "$CC"; then
3668 ac_cv_prog_CC="$CC" # Let the user override the test.
3669else
Martin v. Löwis11437992002-04-12 09:54:03 +00003670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3671for as_dir in $PATH
3672do
3673 IFS=$as_save_IFS
3674 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 $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 +00003679 break 2
3680 fi
3681done
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003684
3685fi
3686fi
3687CC=$ac_cv_prog_CC
3688if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3690$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003691else
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3693$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003694fi
3695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003698fi
3699if test -z "$CC"; then
3700 # Extract the first word of "cc", so it can be a program name with args.
3701set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3703$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003704if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003706else
3707 if test -n "$CC"; then
3708 ac_cv_prog_CC="$CC" # Let the user override the test.
3709else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003710 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3712for as_dir in $PATH
3713do
3714 IFS=$as_save_IFS
3715 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3719 ac_prog_rejected=yes
3720 continue
3721 fi
3722 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $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 +00003724 break 2
3725 fi
3726done
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003729
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730if test $ac_prog_rejected = yes; then
3731 # We found a bogon in the path, so make sure we never use it.
3732 set dummy $ac_cv_prog_CC
3733 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735 # We chose a different compiler from the bogus one.
3736 # However, it has the same basename, so the bogon will be chosen
3737 # first if we set CC to just the basename; use the full file name.
3738 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003739 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003740 fi
3741fi
3742fi
3743fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003744CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003745if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3747$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748else
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3750$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751fi
3752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
3755if test -z "$CC"; then
3756 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 do
3759 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3760set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3762$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003763if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003764 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003765else
3766 if test -n "$CC"; then
3767 ac_cv_prog_CC="$CC" # Let the user override the test.
3768else
Martin v. Löwis11437992002-04-12 09:54:03 +00003769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3770for as_dir in $PATH
3771do
3772 IFS=$as_save_IFS
3773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 $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 +00003778 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003779 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003780done
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003783
3784fi
3785fi
3786CC=$ac_cv_prog_CC
3787if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3789$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003790else
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003793fi
3794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 test -n "$CC" && break
3797 done
3798fi
3799if test -z "$CC"; then
3800 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003802do
3803 # Extract the first word of "$ac_prog", so it can be a program name with args.
3804set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3806$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003807if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003809else
3810 if test -n "$ac_ct_CC"; then
3811 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3812else
3813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3814for as_dir in $PATH
3815do
3816 IFS=$as_save_IFS
3817 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003820 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 $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 +00003822 break 2
3823 fi
3824done
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828fi
3829fi
3830ac_ct_CC=$ac_cv_prog_ac_ct_CC
3831if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3833$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003834else
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3836$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003837fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839
Martin v. Löwis11437992002-04-12 09:54:03 +00003840 test -n "$ac_ct_CC" && break
3841done
Michael W. Hudson54241132001-12-07 15:38:26 +00003842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 if test "x$ac_ct_CC" = x; then
3844 CC=""
3845 else
3846 case $cross_compiling:$ac_tool_warned in
3847yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3849$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850ac_tool_warned=yes ;;
3851esac
3852 CC=$ac_ct_CC
3853 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003854fi
3855
3856fi
3857
3858
Matthias Kloseb9621712010-04-24 17:59:49 +00003859test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003861as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003862See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003863
3864# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003865$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3866set X $ac_compile
3867ac_compiler=$2
3868for ac_option in --version -v -V -qversion; do
3869 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870case "(($ac_try" in
3871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3872 *) ac_try_echo=$ac_try;;
3873esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3875$as_echo "$ac_try_echo"; } >&5
3876 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003877 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 if test -s conftest.err; then
3879 sed '10a\
3880... rest of stderr output deleted ...
3881 10q' conftest.err >conftest.er1
3882 cat conftest.er1 >&5
3883 fi
3884 rm -f conftest.er1 conftest.err
3885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3886 test $ac_status = 0; }
3887done
Martin v. Löwis11437992002-04-12 09:54:03 +00003888
Matthias Kloseb9621712010-04-24 17:59:49 +00003889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003890/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003891
Martin v. Löwis11437992002-04-12 09:54:03 +00003892int
3893main ()
3894{
3895
3896 ;
3897 return 0;
3898}
3899_ACEOF
3900ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003901ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003902# Try to create an executable without -o first, disregard a.out.
3903# It will help us diagnose broken compilers, and finding out an intuition
3904# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3906$as_echo_n "checking whether the C compiler works... " >&6; }
3907ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3908
3909# The possible output files:
3910ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912ac_rmfiles=
3913for ac_file in $ac_files
3914do
3915 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3918 esac
3919done
3920rm -f $ac_rmfiles
3921
Matthias Kloseb9621712010-04-24 17:59:49 +00003922if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923case "(($ac_try" in
3924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3925 *) ac_try_echo=$ac_try;;
3926esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003927eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3928$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003930 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3932 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3934# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3935# in a Makefile. We should not override ac_cv_exeext if it was cached,
3936# so that the user can short-circuit this test for compilers unknown to
3937# Autoconf.
3938for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003939do
3940 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003941 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003943 ;;
3944 [ab].out )
3945 # We found the default executable, but exeext='' is most
3946 # certainly right.
3947 break;;
3948 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 then :; else
3951 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3952 fi
3953 # We set ac_cv_exeext here because the later test for it is not
3954 # safe: cross compilers may not add the suffix if given an `-o'
3955 # argument, so we may need to know it at that point already.
3956 # Even if this section looks crufty: it has the advantage of
3957 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003958 break;;
3959 * )
3960 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 esac
3962done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963test "$ac_cv_exeext" = no && ac_cv_exeext=
3964
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003965else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 ac_file=''
3967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003968if test -z "$ac_file"; then :
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3970$as_echo "no" >&6; }
3971$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003972sed 's/^/| /' conftest.$ac_ext >&5
3973
Matthias Kloseb9621712010-04-24 17:59:49 +00003974{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003976as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003977See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003978else
3979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3980$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3983$as_echo_n "checking for C compiler default output file name... " >&6; }
3984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3985$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003986ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987
Matthias Kloseb9621712010-04-24 17:59:49 +00003988rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3991$as_echo_n "checking for suffix of executables... " >&6; }
3992if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993case "(($ac_try" in
3994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3995 *) ac_try_echo=$ac_try;;
3996esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003997eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3998$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004001 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4002 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4004# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4005# work properly (i.e., refer to `conftest.exe'), while it won't with
4006# `rm'.
4007for ac_file in conftest.exe conftest conftest.*; do
4008 test -f "$ac_file" || continue
4009 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004010 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4012 break;;
4013 * ) break;;
4014 esac
4015done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004016else
Matthias Kloseb9621712010-04-24 17:59:49 +00004017 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004019as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004020See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004022rm -f conftest conftest$ac_cv_exeext
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4024$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025
4026rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004027EXEEXT=$ac_cv_exeext
4028ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4030/* end confdefs.h. */
4031#include <stdio.h>
4032int
4033main ()
4034{
4035FILE *f = fopen ("conftest.out", "w");
4036 return ferror (f) || fclose (f) != 0;
4037
4038 ;
4039 return 0;
4040}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004042ac_clean_files="$ac_clean_files conftest.out"
4043# Check that the compiler produces executables we can run. If not, either
4044# the compiler is broken, or we cross compile.
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4046$as_echo_n "checking whether we are cross compiling... " >&6; }
4047if test "$cross_compiling" != yes; then
4048 { { ac_try="$ac_link"
4049case "(($ac_try" in
4050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4051 *) ac_try_echo=$ac_try;;
4052esac
4053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4054$as_echo "$ac_try_echo"; } >&5
4055 (eval "$ac_link") 2>&5
4056 ac_status=$?
4057 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4058 test $ac_status = 0; }
4059 if { ac_try='./conftest$ac_cv_exeext'
4060 { { case "(($ac_try" in
4061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4062 *) ac_try_echo=$ac_try;;
4063esac
4064eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4065$as_echo "$ac_try_echo"; } >&5
4066 (eval "$ac_try") 2>&5
4067 ac_status=$?
4068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4069 test $ac_status = 0; }; }; then
4070 cross_compiling=no
4071 else
4072 if test "$cross_compiling" = maybe; then
4073 cross_compiling=yes
4074 else
4075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004077as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004078If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004079See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 fi
4081 fi
4082fi
4083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4084$as_echo "$cross_compiling" >&6; }
4085
4086rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4087ac_clean_files=$ac_clean_files_save
4088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4089$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004090if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 $as_echo_n "(cached) " >&6
4092else
4093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004094/* end confdefs.h. */
4095
4096int
4097main ()
4098{
4099
4100 ;
4101 return 0;
4102}
4103_ACEOF
4104rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004105if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004106case "(($ac_try" in
4107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4108 *) ac_try_echo=$ac_try;;
4109esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004110eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4111$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004112 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4115 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116 for ac_file in conftest.o conftest.obj conftest.*; do
4117 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004118 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4121 break;;
4122 esac
4123done
4124else
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004126sed 's/^/| /' conftest.$ac_ext >&5
4127
Matthias Kloseb9621712010-04-24 17:59:49 +00004128{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004130as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004131See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004132fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4136$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004137OBJEXT=$ac_cv_objext
4138ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4140$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004141if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004143else
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004146
Martin v. Löwis11437992002-04-12 09:54:03 +00004147int
4148main ()
4149{
4150#ifndef __GNUC__
4151 choke me
4152#endif
4153
4154 ;
4155 return 0;
4156}
4157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004158if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 ac_compiler_gnu=yes
4160else
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004164ac_cv_c_compiler_gnu=$ac_compiler_gnu
4165
4166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4168$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4169if test $ac_compiler_gnu = yes; then
4170 GCC=yes
4171else
4172 GCC=
4173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004174ac_test_CFLAGS=${CFLAGS+set}
4175ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4177$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004178if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004179 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004180else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004181 ac_save_c_werror_flag=$ac_c_werror_flag
4182 ac_c_werror_flag=yes
4183 ac_cv_prog_cc_g=no
4184 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004187
Martin v. Löwis11437992002-04-12 09:54:03 +00004188int
4189main ()
4190{
4191
4192 ;
4193 return 0;
4194}
4195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004196if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004197 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004198else
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 CFLAGS=""
4200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201/* end confdefs.h. */
4202
4203int
4204main ()
4205{
4206
4207 ;
4208 return 0;
4209}
4210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004211if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212
Matthias Kloseb9621712010-04-24 17:59:49 +00004213else
4214 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004217/* end confdefs.h. */
4218
4219int
4220main ()
4221{
4222
4223 ;
4224 return 0;
4225}
4226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004227if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4235 ac_c_werror_flag=$ac_save_c_werror_flag
4236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4238$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004239if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004240 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004241elif test $ac_cv_prog_cc_g = yes; then
4242 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004243 CFLAGS="-g -O2"
4244 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004245 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246 fi
4247else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004248 if test "$GCC" = yes; then
4249 CFLAGS="-O2"
4250 else
4251 CFLAGS=
4252 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4255$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004256if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004257 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004258else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004260ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004262/* end confdefs.h. */
4263#include <stdarg.h>
4264#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004265struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004266/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4267struct buf { int x; };
4268FILE * (*rcsopen) (struct buf *, struct stat *, int);
4269static char *e (p, i)
4270 char **p;
4271 int i;
4272{
4273 return p[i];
4274}
4275static char *f (char * (*g) (char **, int), char **p, ...)
4276{
4277 char *s;
4278 va_list v;
4279 va_start (v,p);
4280 s = g (p, va_arg (v,int));
4281 va_end (v);
4282 return s;
4283}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004284
4285/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4286 function prototypes and stuff, but not '\xHH' hex character constants.
4287 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004289 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4290 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004292int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4295 inside strings and character constants. */
4296#define FOO(x) 'x'
4297int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4298
Skip Montanaro6dead952003-09-25 14:50:04 +00004299int test (int i, double x);
4300struct s1 {int (*f) (int a);};
4301struct s2 {int (*f) (double a);};
4302int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4303int argc;
4304char **argv;
4305int
4306main ()
4307{
4308return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4309 ;
4310 return 0;
4311}
4312_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4314 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004315do
4316 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004317 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320rm -f core conftest.err conftest.$ac_objext
4321 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004322done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004324CC=$ac_save_CC
4325
4326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327# AC_CACHE_VAL
4328case "x$ac_cv_prog_cc_c89" in
4329 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4331$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4334$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004335 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4338$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004339esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004340if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004341
Matthias Kloseb9621712010-04-24 17:59:49 +00004342fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004343
Martin v. Löwis11437992002-04-12 09:54:03 +00004344ac_ext=c
4345ac_cpp='$CPP $CPPFLAGS'
4346ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4347ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4348ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004349
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004350
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004351
4352
Matthias Kloseb9621712010-04-24 17:59:49 +00004353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4354$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004357if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004359
4360 case $withval in
4361 no) with_cxx_main=no
4362 MAINCC='$(CC)';;
4363 yes) with_cxx_main=yes
4364 MAINCC='$(CXX)';;
4365 *) with_cxx_main=yes
4366 MAINCC=$withval
4367 if test -z "$CXX"
4368 then
4369 CXX=$withval
4370 fi;;
4371 esac
4372else
4373
4374 with_cxx_main=no
4375 MAINCC='$(CC)'
4376
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377fi
4378
Matthias Kloseb9621712010-04-24 17:59:49 +00004379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4380$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004381
4382preset_cxx="$CXX"
4383if test -z "$CXX"
4384then
4385 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004386 gcc) if test -n "$ac_tool_prefix"; then
4387 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4388set dummy ${ac_tool_prefix}g++; ac_word=$2
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4390$as_echo_n "checking for $ac_word... " >&6; }
4391if ${ac_cv_path_CXX+:} false; then :
4392 $as_echo_n "(cached) " >&6
4393else
4394 case $CXX in
4395 [\\/]* | ?:[\\/]*)
4396 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4397 ;;
4398 *)
4399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4400for as_dir in notfound
4401do
4402 IFS=$as_save_IFS
4403 test -z "$as_dir" && as_dir=.
4404 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004405 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004406 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4407 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4408 break 2
4409 fi
4410done
4411 done
4412IFS=$as_save_IFS
4413
4414 ;;
4415esac
4416fi
4417CXX=$ac_cv_path_CXX
4418if test -n "$CXX"; then
4419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4420$as_echo "$CXX" >&6; }
4421else
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4423$as_echo "no" >&6; }
4424fi
4425
4426
4427fi
4428if test -z "$ac_cv_path_CXX"; then
4429 ac_pt_CXX=$CXX
4430 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004431set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4433$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004434if ${ac_cv_path_ac_pt_CXX+:} false; then :
4435 $as_echo_n "(cached) " >&6
4436else
4437 case $ac_pt_CXX in
4438 [\\/]* | ?:[\\/]*)
4439 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4440 ;;
4441 *)
4442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4443for as_dir in notfound
4444do
4445 IFS=$as_save_IFS
4446 test -z "$as_dir" && as_dir=.
4447 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004448 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004449 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4450 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4451 break 2
4452 fi
4453done
4454 done
4455IFS=$as_save_IFS
4456
4457 ;;
4458esac
4459fi
4460ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4461if test -n "$ac_pt_CXX"; then
4462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4463$as_echo "$ac_pt_CXX" >&6; }
4464else
4465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4466$as_echo "no" >&6; }
4467fi
4468
4469 if test "x$ac_pt_CXX" = x; then
4470 CXX="g++"
4471 else
4472 case $cross_compiling:$ac_tool_warned in
4473yes:)
4474{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4475$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4476ac_tool_warned=yes ;;
4477esac
4478 CXX=$ac_pt_CXX
4479 fi
4480else
4481 CXX="$ac_cv_path_CXX"
4482fi
4483 ;;
4484 cc) if test -n "$ac_tool_prefix"; then
4485 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4486set dummy ${ac_tool_prefix}c++; ac_word=$2
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4488$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004489if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004490 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004491else
4492 case $CXX in
4493 [\\/]* | ?:[\\/]*)
4494 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4495 ;;
4496 *)
4497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4498for as_dir in notfound
4499do
4500 IFS=$as_save_IFS
4501 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004502 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004504 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004506 break 2
4507 fi
4508done
Matthias Kloseb9621712010-04-24 17:59:49 +00004509 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004510IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004511
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004512 ;;
4513esac
4514fi
4515CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004516if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4518$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004519else
Matthias Kloseb9621712010-04-24 17:59:49 +00004520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4521$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004523
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004524
4525fi
4526if test -z "$ac_cv_path_CXX"; then
4527 ac_pt_CXX=$CXX
4528 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004529set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4531$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004532if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004533 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004534else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004535 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004536 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004537 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 +00004538 ;;
4539 *)
4540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4541for as_dir in notfound
4542do
4543 IFS=$as_save_IFS
4544 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004545 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004547 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004549 break 2
4550 fi
4551done
Matthias Kloseb9621712010-04-24 17:59:49 +00004552 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004553IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004554
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004555 ;;
4556esac
4557fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004558ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4559if test -n "$ac_pt_CXX"; then
4560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4561$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004562else
Matthias Kloseb9621712010-04-24 17:59:49 +00004563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4564$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004566
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004567 if test "x$ac_pt_CXX" = x; then
4568 CXX="c++"
4569 else
4570 case $cross_compiling:$ac_tool_warned in
4571yes:)
4572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4574ac_tool_warned=yes ;;
4575esac
4576 CXX=$ac_pt_CXX
4577 fi
4578else
4579 CXX="$ac_cv_path_CXX"
4580fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004582 clang|*/clang) if test -n "$ac_tool_prefix"; then
4583 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4584set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4586$as_echo_n "checking for $ac_word... " >&6; }
4587if ${ac_cv_path_CXX+:} false; then :
4588 $as_echo_n "(cached) " >&6
4589else
4590 case $CXX in
4591 [\\/]* | ?:[\\/]*)
4592 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4593 ;;
4594 *)
4595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4596for as_dir in notfound
4597do
4598 IFS=$as_save_IFS
4599 test -z "$as_dir" && as_dir=.
4600 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004602 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4604 break 2
4605 fi
4606done
4607 done
4608IFS=$as_save_IFS
4609
Ned Deilycbfb9a52012-06-23 16:02:19 -07004610 ;;
4611esac
4612fi
4613CXX=$ac_cv_path_CXX
4614if test -n "$CXX"; then
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4616$as_echo "$CXX" >&6; }
4617else
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4619$as_echo "no" >&6; }
4620fi
4621
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004622
4623fi
4624if test -z "$ac_cv_path_CXX"; then
4625 ac_pt_CXX=$CXX
4626 # Extract the first word of "clang++", so it can be a program name with args.
4627set dummy clang++; ac_word=$2
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4629$as_echo_n "checking for $ac_word... " >&6; }
4630if ${ac_cv_path_ac_pt_CXX+:} false; then :
4631 $as_echo_n "(cached) " >&6
4632else
4633 case $ac_pt_CXX in
4634 [\\/]* | ?:[\\/]*)
4635 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4636 ;;
4637 *)
4638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4639for as_dir in notfound
4640do
4641 IFS=$as_save_IFS
4642 test -z "$as_dir" && as_dir=.
4643 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004645 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4647 break 2
4648 fi
4649done
4650 done
4651IFS=$as_save_IFS
4652
4653 ;;
4654esac
4655fi
4656ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4657if test -n "$ac_pt_CXX"; then
4658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4659$as_echo "$ac_pt_CXX" >&6; }
4660else
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4662$as_echo "no" >&6; }
4663fi
4664
4665 if test "x$ac_pt_CXX" = x; then
4666 CXX="clang++"
4667 else
4668 case $cross_compiling:$ac_tool_warned in
4669yes:)
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4672ac_tool_warned=yes ;;
4673esac
4674 CXX=$ac_pt_CXX
4675 fi
4676else
4677 CXX="$ac_cv_path_CXX"
4678fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004679 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004680 esac
4681 if test "$CXX" = "notfound"
4682 then
4683 CXX=""
4684 fi
4685fi
4686if test -z "$CXX"
4687then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004688 if test -n "$ac_tool_prefix"; then
4689 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4690 do
4691 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4692set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4694$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004695if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004696 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004697else
4698 if test -n "$CXX"; then
4699 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4700else
4701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4702for as_dir in $PATH
4703do
4704 IFS=$as_save_IFS
4705 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004706 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004708 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004710 break 2
4711 fi
4712done
Matthias Kloseb9621712010-04-24 17:59:49 +00004713 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004714IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004715
4716fi
4717fi
4718CXX=$ac_cv_prog_CXX
4719if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4721$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004722else
Matthias Kloseb9621712010-04-24 17:59:49 +00004723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4724$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004725fi
4726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004727
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004728 test -n "$CXX" && break
4729 done
4730fi
4731if test -z "$CXX"; then
4732 ac_ct_CXX=$CXX
4733 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4734do
4735 # Extract the first word of "$ac_prog", so it can be a program name with args.
4736set dummy $ac_prog; ac_word=$2
4737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4738$as_echo_n "checking for $ac_word... " >&6; }
4739if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4740 $as_echo_n "(cached) " >&6
4741else
4742 if test -n "$ac_ct_CXX"; then
4743 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4744else
4745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4746for as_dir in $PATH
4747do
4748 IFS=$as_save_IFS
4749 test -z "$as_dir" && as_dir=.
4750 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004752 ac_cv_prog_ac_ct_CXX="$ac_prog"
4753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4754 break 2
4755 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004756done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004757 done
4758IFS=$as_save_IFS
4759
4760fi
4761fi
4762ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4763if test -n "$ac_ct_CXX"; then
4764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4765$as_echo "$ac_ct_CXX" >&6; }
4766else
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4768$as_echo "no" >&6; }
4769fi
4770
4771
4772 test -n "$ac_ct_CXX" && break
4773done
4774
4775 if test "x$ac_ct_CXX" = x; then
4776 CXX="notfound"
4777 else
4778 case $cross_compiling:$ac_tool_warned in
4779yes:)
4780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4782ac_tool_warned=yes ;;
4783esac
4784 CXX=$ac_ct_CXX
4785 fi
4786fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004787
4788 if test "$CXX" = "notfound"
4789 then
4790 CXX=""
4791 fi
4792fi
4793if test "$preset_cxx" != "$CXX"
4794then
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796
4797 By default, distutils will build C++ extension modules with \"$CXX\".
4798 If this is not intended, then set CXX on the configure command line.
4799 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004800$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801
4802 By default, distutils will build C++ extension modules with \"$CXX\".
4803 If this is not intended, then set CXX on the configure command line.
4804 " >&2;}
4805fi
4806
4807
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4809$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4810save_LDFLAGS="$LDFLAGS"
4811LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004812
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4814/* end confdefs.h. */
4815
4816int
4817main ()
4818{
4819
4820 ;
4821 return 0;
4822}
4823_ACEOF
4824if ac_fn_c_try_link "$LINENO"; then :
4825 NO_AS_NEEDED="-Wl,--no-as-needed"
4826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4827$as_echo "yes" >&6; }
4828else
4829 NO_AS_NEEDED=""
4830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4831$as_echo "no" >&6; }
4832fi
4833rm -f core conftest.err conftest.$ac_objext \
4834 conftest$ac_exeext conftest.$ac_ext
4835LDFLAGS="$save_LDFLAGS"
4836
4837
4838
4839# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004840ac_ext=c
4841ac_cpp='$CPP $CPPFLAGS'
4842ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4843ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4844ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4846$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004847# On Suns, sometimes $CPP names a directory.
4848if test -n "$CPP" && test -d "$CPP"; then
4849 CPP=
4850fi
4851if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004852 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004853 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004854else
Martin v. Löwis11437992002-04-12 09:54:03 +00004855 # Double quotes because CPP needs to be expanded
4856 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4857 do
4858 ac_preproc_ok=false
4859for ac_c_preproc_warn_flag in '' yes
4860do
4861 # Use a header file that comes with gcc, so configuring glibc
4862 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004863 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4864 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004865 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004866 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004868/* end confdefs.h. */
4869#ifdef __STDC__
4870# include <limits.h>
4871#else
4872# include <assert.h>
4873#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004874 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004876if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004877
Matthias Kloseb9621712010-04-24 17:59:49 +00004878else
Martin v. Löwis11437992002-04-12 09:54:03 +00004879 # Broken: fails on valid input.
4880continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004881fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004882rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004884 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004885 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004888#include <ac_nonexistent.h>
4889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004890if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004891 # Broken: success on invalid input.
4892continue
4893else
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 # Passes both tests.
4895ac_preproc_ok=:
4896break
4897fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004898rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004899
4900done
4901# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004902rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004903if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004904 break
4905fi
4906
4907 done
4908 ac_cv_prog_CPP=$CPP
4909
4910fi
4911 CPP=$ac_cv_prog_CPP
4912else
4913 ac_cv_prog_CPP=$CPP
4914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4916$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004917ac_preproc_ok=false
4918for ac_c_preproc_warn_flag in '' yes
4919do
4920 # Use a header file that comes with gcc, so configuring glibc
4921 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004922 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4923 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004924 # On the NeXT, cc -E runs the code through the compiler's parser,
4925 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004927/* end confdefs.h. */
4928#ifdef __STDC__
4929# include <limits.h>
4930#else
4931# include <assert.h>
4932#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004933 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004935if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004936
Matthias Kloseb9621712010-04-24 17:59:49 +00004937else
Martin v. Löwis11437992002-04-12 09:54:03 +00004938 # Broken: fails on valid input.
4939continue
4940fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004941rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004943 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004944 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004947#include <ac_nonexistent.h>
4948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004949if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 # Broken: success on invalid input.
4951continue
4952else
Martin v. Löwis11437992002-04-12 09:54:03 +00004953 # Passes both tests.
4954ac_preproc_ok=:
4955break
4956fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004957rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004958
4959done
4960# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004961rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004962if $ac_preproc_ok; then :
4963
Martin v. Löwis11437992002-04-12 09:54:03 +00004964else
Matthias Kloseb9621712010-04-24 17:59:49 +00004965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004967as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004968See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004969fi
4970
4971ac_ext=c
4972ac_cpp='$CPP $CPPFLAGS'
4973ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4974ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4975ac_compiler_gnu=$ac_cv_c_compiler_gnu
4976
4977
Matthias Kloseb9621712010-04-24 17:59:49 +00004978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4979$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004980if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004982else
Matthias Kloseb9621712010-04-24 17:59:49 +00004983 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004984 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004985 # Loop through the user's path and test for each of PROGNAME-LIST
4986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004987for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4988do
4989 IFS=$as_save_IFS
4990 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 for ac_prog in grep ggrep; do
4992 for ac_exec_ext in '' $ac_executable_extensions; do
4993 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004994 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004995# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004996 # Check for GNU $ac_path_GREP
4997case `"$ac_path_GREP" --version 2>&1` in
4998*GNU*)
4999 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5000*)
5001 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005003 while :
5004 do
5005 cat "conftest.in" "conftest.in" >"conftest.tmp"
5006 mv "conftest.tmp" "conftest.in"
5007 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005008 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005009 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5010 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005012 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5013 # Best one so far, save it but keep looking for a better one
5014 ac_cv_path_GREP="$ac_path_GREP"
5015 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005016 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005017 # 10*(2^10) chars as input seems more than enough
5018 test $ac_count -gt 10 && break
5019 done
5020 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5021esac
5022
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $ac_path_GREP_found && break 3
5024 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005025 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005026 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005027IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005029 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 +00005030 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005031else
5032 ac_cv_path_GREP=$GREP
5033fi
5034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5037$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005038 GREP="$ac_cv_path_GREP"
5039
5040
Matthias Kloseb9621712010-04-24 17:59:49 +00005041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5042$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005043if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005045else
5046 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5047 then ac_cv_path_EGREP="$GREP -E"
5048 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005050 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 # Loop through the user's path and test for each of PROGNAME-LIST
5052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005053for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5054do
5055 IFS=$as_save_IFS
5056 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005057 for ac_prog in egrep; do
5058 for ac_exec_ext in '' $ac_executable_extensions; do
5059 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005060 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005061# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005062 # Check for GNU $ac_path_EGREP
5063case `"$ac_path_EGREP" --version 2>&1` in
5064*GNU*)
5065 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5066*)
5067 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069 while :
5070 do
5071 cat "conftest.in" "conftest.in" >"conftest.tmp"
5072 mv "conftest.tmp" "conftest.in"
5073 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005075 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5076 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005078 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5079 # Best one so far, save it but keep looking for a better one
5080 ac_cv_path_EGREP="$ac_path_EGREP"
5081 ac_path_EGREP_max=$ac_count
5082 fi
5083 # 10*(2^10) chars as input seems more than enough
5084 test $ac_count -gt 10 && break
5085 done
5086 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5087esac
5088
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 $ac_path_EGREP_found && break 3
5090 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005093IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005095 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 +00005096 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005097else
5098 ac_cv_path_EGREP=$EGREP
5099fi
5100
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101 fi
5102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5104$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005105 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005106
5107
Matthias Kloseb9621712010-04-24 17:59:49 +00005108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5109$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005110if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $as_echo_n "(cached) " >&6
5112else
5113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005114/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005115#include <stdlib.h>
5116#include <stdarg.h>
5117#include <string.h>
5118#include <float.h>
5119
5120int
5121main ()
5122{
5123
5124 ;
5125 return 0;
5126}
5127_ACEOF
5128if ac_fn_c_try_compile "$LINENO"; then :
5129 ac_cv_header_stdc=yes
5130else
5131 ac_cv_header_stdc=no
5132fi
5133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5134
5135if test $ac_cv_header_stdc = yes; then
5136 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5138/* end confdefs.h. */
5139#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005140
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005141_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005144
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005145else
Matthias Kloseb9621712010-04-24 17:59:49 +00005146 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005147fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005148rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005149
Matthias Kloseb9621712010-04-24 17:59:49 +00005150fi
5151
5152if test $ac_cv_header_stdc = yes; then
5153 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5155/* end confdefs.h. */
5156#include <stdlib.h>
5157
5158_ACEOF
5159if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5160 $EGREP "free" >/dev/null 2>&1; then :
5161
5162else
5163 ac_cv_header_stdc=no
5164fi
5165rm -f conftest*
5166
5167fi
5168
5169if test $ac_cv_header_stdc = yes; then
5170 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5171 if test "$cross_compiling" = yes; then :
5172 :
5173else
5174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5175/* end confdefs.h. */
5176#include <ctype.h>
5177#include <stdlib.h>
5178#if ((' ' & 0x0FF) == 0x020)
5179# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5180# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5181#else
5182# define ISLOWER(c) \
5183 (('a' <= (c) && (c) <= 'i') \
5184 || ('j' <= (c) && (c) <= 'r') \
5185 || ('s' <= (c) && (c) <= 'z'))
5186# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5187#endif
5188
5189#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5190int
5191main ()
5192{
5193 int i;
5194 for (i = 0; i < 256; i++)
5195 if (XOR (islower (i), ISLOWER (i))
5196 || toupper (i) != TOUPPER (i))
5197 return 2;
5198 return 0;
5199}
5200_ACEOF
5201if ac_fn_c_try_run "$LINENO"; then :
5202
5203else
5204 ac_cv_header_stdc=no
5205fi
5206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5207 conftest.$ac_objext conftest.beam conftest.$ac_ext
5208fi
5209
5210fi
5211fi
5212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5213$as_echo "$ac_cv_header_stdc" >&6; }
5214if test $ac_cv_header_stdc = yes; then
5215
5216$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5217
5218fi
5219
5220# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5221for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5222 inttypes.h stdint.h unistd.h
5223do :
5224 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5225ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5226"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005227if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005228 cat >>confdefs.h <<_ACEOF
5229#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5230_ACEOF
5231
5232fi
5233
5234done
5235
5236
5237
5238 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 +02005239if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005240 MINIX=yes
5241else
5242 MINIX=
5243fi
5244
5245
5246 if test "$MINIX" = yes; then
5247
5248$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5249
5250
5251$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5252
5253
5254$as_echo "#define _MINIX 1" >>confdefs.h
5255
5256 fi
5257
5258
5259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5260$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005261if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005262 $as_echo_n "(cached) " >&6
5263else
5264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5265/* end confdefs.h. */
5266
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005267# define __EXTENSIONS__ 1
5268 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005269int
5270main ()
5271{
5272
5273 ;
5274 return 0;
5275}
5276_ACEOF
5277if ac_fn_c_try_compile "$LINENO"; then :
5278 ac_cv_safe_to_define___extensions__=yes
5279else
5280 ac_cv_safe_to_define___extensions__=no
5281fi
5282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5283fi
5284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5285$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5286 test $ac_cv_safe_to_define___extensions__ = yes &&
5287 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5288
5289 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5290
5291 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5292
5293 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5294
5295 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5296
5297
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005299# Check for unsupported systems
5300case $ac_sys_system/$ac_sys_release in
5301atheos*|Linux*/1*)
5302 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5303 echo See README for details.
5304 exit 1;;
5305esac
5306
5307
Matthias Kloseb9621712010-04-24 17:59:49 +00005308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5309$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310
5311# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005312if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313 withval=$with_suffix;
5314 case $withval in
5315 no) EXEEXT=;;
5316 yes) EXEEXT=.exe;;
5317 *) EXEEXT=$withval;;
5318 esac
5319fi
5320
Matthias Kloseb9621712010-04-24 17:59:49 +00005321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5322$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323
5324# Test whether we're running on a non-case-sensitive system, in which
5325# case we give a warning if no ext is given
5326
Matthias Kloseb9621712010-04-24 17:59:49 +00005327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5328$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329if test ! -d CaseSensitiveTestDir; then
5330mkdir CaseSensitiveTestDir
5331fi
5332
5333if test -d casesensitivetestdir
5334then
Matthias Kloseb9621712010-04-24 17:59:49 +00005335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5336$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337 BUILDEXEEXT=.exe
5338else
Matthias Kloseb9621712010-04-24 17:59:49 +00005339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5340$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341 BUILDEXEEXT=$EXEEXT
5342fi
5343rmdir CaseSensitiveTestDir
5344
5345case $MACHDEP in
5346bsdos*)
5347 case $CC in
5348 gcc) CC="$CC -D_HAVE_BSDI";;
5349 esac;;
5350esac
5351
5352case $ac_sys_system in
5353hp*|HP*)
5354 case $CC in
5355 cc|*/cc) CC="$CC -Ae";;
5356 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005357esac
5358
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005359MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5360
5361
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363
Matthias Kloseb9621712010-04-24 17:59:49 +00005364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5365$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005366if test -z "$LIBRARY"
5367then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005368 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5371$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005372
5373# LDLIBRARY is the name of the library to link against (as opposed to the
5374# name of the library into which to insert object files). BLDLIBRARY is also
5375# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5376# is blank as the main program is not linked directly against LDLIBRARY.
5377# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5378# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5379# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5380# DLLLIBRARY is the shared (i.e., DLL) library.
5381#
5382# RUNSHARED is used to run shared python without installed libraries
5383#
5384# INSTSONAME is the name of the shared library that will be use to install
5385# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005386#
5387# LDVERSION is the shared library version number, normally the Python version
5388# with the ABI build flags appended.
5389
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005390
5391
5392
5393
5394
5395
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005396
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397LDLIBRARY="$LIBRARY"
5398BLDLIBRARY='$(LDLIBRARY)'
5399INSTSONAME='$(LDLIBRARY)'
5400DLLLIBRARY=''
5401LDLIBRARYDIR=''
5402RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005403LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404
5405# LINKCC is the command that links the python executable -- default is $(CC).
5406# If CXX is set, and if it is needed to link a main function that was
5407# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5408# python might then depend on the C++ runtime
5409# This is altered for AIX in order to build the export list before
5410# linking.
5411
Matthias Kloseb9621712010-04-24 17:59:49 +00005412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5413$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414if test -z "$LINKCC"
5415then
5416 LINKCC='$(PURIFY) $(MAINCC)'
5417 case $ac_sys_system in
5418 AIX*)
5419 exp_extra="\"\""
5420 if test $ac_sys_release -ge 5 -o \
5421 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5422 exp_extra="."
5423 fi
5424 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425 QNX*)
5426 # qcc must be used because the other compilers do not
5427 # support -N.
5428 LINKCC=qcc;;
5429 esac
5430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5432$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005433
5434# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5435# make sure we default having it set to "no": this is used by
5436# distutils.unixccompiler to know if it should add --enable-new-dtags
5437# to linker command lines, and failing to detect GNU ld simply results
5438# in the same bahaviour as before.
5439
Matthias Kloseb9621712010-04-24 17:59:49 +00005440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5441$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442ac_prog=ld
5443if test "$GCC" = yes; then
5444 ac_prog=`$CC -print-prog-name=ld`
5445fi
5446case `"$ac_prog" -V 2>&1 < /dev/null` in
5447 *GNU*)
5448 GNULD=yes;;
5449 *)
5450 GNULD=no;;
5451esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5453$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005454
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5456$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005457if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005458 $as_echo_n "(cached) " >&6
5459else
5460 ac_cv_c_inline=no
5461for ac_kw in inline __inline__ __inline; do
5462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5463/* end confdefs.h. */
5464#ifndef __cplusplus
5465typedef int foo_t;
5466static $ac_kw foo_t static_foo () {return 0; }
5467$ac_kw foo_t foo () {return 0; }
5468#endif
5469
5470_ACEOF
5471if ac_fn_c_try_compile "$LINENO"; then :
5472 ac_cv_c_inline=$ac_kw
5473fi
5474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5475 test "$ac_cv_c_inline" != no && break
5476done
5477
5478fi
5479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5480$as_echo "$ac_cv_c_inline" >&6; }
5481
5482case $ac_cv_c_inline in
5483 inline | yes) ;;
5484 *)
5485 case $ac_cv_c_inline in
5486 no) ac_val=;;
5487 *) ac_val=$ac_cv_c_inline;;
5488 esac
5489 cat >>confdefs.h <<_ACEOF
5490#ifndef __cplusplus
5491#define inline $ac_val
5492#endif
5493_ACEOF
5494 ;;
5495esac
5496
5497if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005498
5499$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005500
5501
5502fi
5503
5504
Matthias Kloseb9621712010-04-24 17:59:49 +00005505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5506$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005508if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509 enableval=$enable_shared;
5510fi
5511
5512
5513if test -z "$enable_shared"
5514then
5515 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005516 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517 enable_shared="yes";;
5518 *)
5519 enable_shared="no";;
5520 esac
5521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5523$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524
Matthias Kloseb9621712010-04-24 17:59:49 +00005525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5526$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005527# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005528if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005529 enableval=$enable_profiling;
5530fi
5531
5532if test "x$enable_profiling" = xyes; then
5533 ac_save_cc="$CC"
5534 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536/* end confdefs.h. */
5537int main() { return 0; }
5538_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005539if ac_fn_c_try_link "$LINENO"; then :
5540
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005542 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005544rm -f core conftest.err conftest.$ac_objext \
5545 conftest$ac_exeext conftest.$ac_ext
5546 CC="$ac_save_cc"
5547else
5548 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5551$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552
doko@ubuntu.comba015832012-06-30 16:52:05 +02005553if test "x$enable_profiling" = xyes; then
5554 BASECFLAGS="-pg $BASECFLAGS"
5555 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556fi
5557
Matthias Kloseb9621712010-04-24 17:59:49 +00005558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5559$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560
5561# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5562# library that we build, but we do not want to link against it (we
5563# will find it with a -framework option). For this reason there is an
5564# extra variable BLDLIBRARY against which Python and the extension
5565# modules are linked, BLDLIBRARY. This is normally the same as
5566# LDLIBRARY, but empty for MacOSX framework builds.
5567if test "$enable_framework"
5568then
5569 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5570 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5571 BLDLIBRARY=''
5572else
5573 BLDLIBRARY='$(LDLIBRARY)'
5574fi
5575
5576# Other platforms follow
5577if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005578 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579
Matthias Kloseb9621712010-04-24 17:59:49 +00005580$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581
5582 case $ac_sys_system in
5583 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005584 LDLIBRARY='libpython$(LDVERSION).dll.a'
5585 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005586 ;;
5587 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005588 LDLIBRARY='libpython$(LDVERSION).so'
5589 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5591 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005592 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005593 then
5594 PY3LIBRARY=libpython3.so
5595 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005597 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005598 LDLIBRARY='libpython$(LDVERSION).so'
5599 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005600 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5601 case $ac_sys_system in
5602 FreeBSD*)
5603 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5604 ;;
5605 esac
5606 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005607 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005608 then
5609 PY3LIBRARY=libpython3.so
5610 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 ;;
5612 hp*|HP*)
5613 case `uname -m` in
5614 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005615 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616 ;;
5617 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005618 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619 ;;
5620 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005621 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5623 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005625 LDLIBRARY='libpython$(LDVERSION).dylib'
5626 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5628 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005629 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005631 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5632 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633
5634 esac
5635else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005636 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637 case $ac_sys_system in
5638 CYGWIN*)
5639 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005640 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641 ;;
5642 esac
5643fi
5644
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005645if test "$cross_compiling" = yes; then
5646 RUNSHARED=
5647fi
5648
Matthias Kloseb9621712010-04-24 17:59:49 +00005649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5650$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651
5652if test -n "$ac_tool_prefix"; then
5653 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5654set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5656$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005657if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005658 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659else
5660 if test -n "$RANLIB"; then
5661 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5662else
5663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5664for as_dir in $PATH
5665do
5666 IFS=$as_save_IFS
5667 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005668 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672 break 2
5673 fi
5674done
Matthias Kloseb9621712010-04-24 17:59:49 +00005675 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676IFS=$as_save_IFS
5677
5678fi
5679fi
5680RANLIB=$ac_cv_prog_RANLIB
5681if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5683$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684else
Matthias Kloseb9621712010-04-24 17:59:49 +00005685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5686$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687fi
5688
5689
5690fi
5691if test -z "$ac_cv_prog_RANLIB"; then
5692 ac_ct_RANLIB=$RANLIB
5693 # Extract the first word of "ranlib", so it can be a program name with args.
5694set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5696$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005697if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005698 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699else
5700 if test -n "$ac_ct_RANLIB"; then
5701 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5702else
5703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5704for as_dir in $PATH
5705do
5706 IFS=$as_save_IFS
5707 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005708 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005709 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005711 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 break 2
5713 fi
5714done
Matthias Kloseb9621712010-04-24 17:59:49 +00005715 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716IFS=$as_save_IFS
5717
5718fi
5719fi
5720ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5721if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5723$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724else
Matthias Kloseb9621712010-04-24 17:59:49 +00005725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5726$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727fi
5728
5729 if test "x$ac_ct_RANLIB" = x; then
5730 RANLIB=":"
5731 else
5732 case $cross_compiling:$ac_tool_warned in
5733yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005734{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5735$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736ac_tool_warned=yes ;;
5737esac
5738 RANLIB=$ac_ct_RANLIB
5739 fi
5740else
5741 RANLIB="$ac_cv_prog_RANLIB"
5742fi
5743
5744
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005745if test -n "$ac_tool_prefix"; then
5746 for ac_prog in ar aal
5747 do
5748 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5749set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5751$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005752if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754else
5755 if test -n "$AR"; then
5756 ac_cv_prog_AR="$AR" # Let the user override the test.
5757else
5758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5759for as_dir in $PATH
5760do
5761 IFS=$as_save_IFS
5762 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005763 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005765 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767 break 2
5768 fi
5769done
Matthias Kloseb9621712010-04-24 17:59:49 +00005770 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771IFS=$as_save_IFS
5772
5773fi
5774fi
5775AR=$ac_cv_prog_AR
5776if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5778$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779else
Matthias Kloseb9621712010-04-24 17:59:49 +00005780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5781$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782fi
5783
5784
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005785 test -n "$AR" && break
5786 done
5787fi
5788if test -z "$AR"; then
5789 ac_ct_AR=$AR
5790 for ac_prog in ar aal
5791do
5792 # Extract the first word of "$ac_prog", so it can be a program name with args.
5793set dummy $ac_prog; ac_word=$2
5794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5795$as_echo_n "checking for $ac_word... " >&6; }
5796if ${ac_cv_prog_ac_ct_AR+:} false; then :
5797 $as_echo_n "(cached) " >&6
5798else
5799 if test -n "$ac_ct_AR"; then
5800 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5801else
5802as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5803for as_dir in $PATH
5804do
5805 IFS=$as_save_IFS
5806 test -z "$as_dir" && as_dir=.
5807 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005808 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005809 ac_cv_prog_ac_ct_AR="$ac_prog"
5810 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5811 break 2
5812 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005814 done
5815IFS=$as_save_IFS
5816
5817fi
5818fi
5819ac_ct_AR=$ac_cv_prog_ac_ct_AR
5820if test -n "$ac_ct_AR"; then
5821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5822$as_echo "$ac_ct_AR" >&6; }
5823else
5824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5825$as_echo "no" >&6; }
5826fi
5827
5828
5829 test -n "$ac_ct_AR" && break
5830done
5831
5832 if test "x$ac_ct_AR" = x; then
5833 AR="ar"
5834 else
5835 case $cross_compiling:$ac_tool_warned in
5836yes:)
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5838$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5839ac_tool_warned=yes ;;
5840esac
5841 AR=$ac_ct_AR
5842 fi
5843fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844
5845
5846# tweak ARFLAGS only if the user didn't set it on the command line
5847
5848if test -z "$ARFLAGS"
5849then
5850 ARFLAGS="rc"
5851fi
5852
doko@ubuntu.com58844492012-06-30 18:25:32 +02005853if test -n "$ac_tool_prefix"; then
5854 for ac_prog in readelf
5855 do
5856 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5857set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5859$as_echo_n "checking for $ac_word... " >&6; }
5860if ${ac_cv_prog_READELF+:} false; then :
5861 $as_echo_n "(cached) " >&6
5862else
5863 if test -n "$READELF"; then
5864 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5865else
5866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5867for as_dir in $PATH
5868do
5869 IFS=$as_save_IFS
5870 test -z "$as_dir" && as_dir=.
5871 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005872 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005873 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5874 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5875 break 2
5876 fi
5877done
5878 done
5879IFS=$as_save_IFS
5880
5881fi
5882fi
5883READELF=$ac_cv_prog_READELF
5884if test -n "$READELF"; then
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5886$as_echo "$READELF" >&6; }
5887else
5888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889$as_echo "no" >&6; }
5890fi
5891
5892
5893 test -n "$READELF" && break
5894 done
5895fi
5896if test -z "$READELF"; then
5897 ac_ct_READELF=$READELF
5898 for ac_prog in readelf
5899do
5900 # Extract the first word of "$ac_prog", so it can be a program name with args.
5901set dummy $ac_prog; ac_word=$2
5902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5903$as_echo_n "checking for $ac_word... " >&6; }
5904if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5905 $as_echo_n "(cached) " >&6
5906else
5907 if test -n "$ac_ct_READELF"; then
5908 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5909else
5910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5911for as_dir in $PATH
5912do
5913 IFS=$as_save_IFS
5914 test -z "$as_dir" && as_dir=.
5915 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005916 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005917 ac_cv_prog_ac_ct_READELF="$ac_prog"
5918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5919 break 2
5920 fi
5921done
5922 done
5923IFS=$as_save_IFS
5924
5925fi
5926fi
5927ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5928if test -n "$ac_ct_READELF"; then
5929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5930$as_echo "$ac_ct_READELF" >&6; }
5931else
5932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5933$as_echo "no" >&6; }
5934fi
5935
5936
5937 test -n "$ac_ct_READELF" && break
5938done
5939
5940 if test "x$ac_ct_READELF" = x; then
5941 READELF=":"
5942 else
5943 case $cross_compiling:$ac_tool_warned in
5944yes:)
5945{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5946$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5947ac_tool_warned=yes ;;
5948esac
5949 READELF=$ac_ct_READELF
5950 fi
5951fi
5952
5953if test "$cross_compiling" = yes; then
5954 case "$READELF" in
5955 readelf|:)
5956 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5957 ;;
5958 esac
5959fi
5960
5961
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962
Matthias Klosec4c48422012-10-21 23:05:35 +02005963for ac_prog in python$PACKAGE_VERSION python3 python
5964do
5965 # Extract the first word of "$ac_prog", so it can be a program name with args.
5966set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5968$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005969if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005970 $as_echo_n "(cached) " >&6
5971else
Matthias Klosec4c48422012-10-21 23:05:35 +02005972 if test -n "$PYTHON"; then
5973 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005974else
5975as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5976for as_dir in $PATH
5977do
5978 IFS=$as_save_IFS
5979 test -z "$as_dir" && as_dir=.
5980 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005982 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5984 break 2
5985 fi
5986done
5987 done
5988IFS=$as_save_IFS
5989
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005990fi
5991fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005992PYTHON=$ac_cv_prog_PYTHON
5993if test -n "$PYTHON"; then
5994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5995$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005996else
5997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5998$as_echo "no" >&6; }
5999fi
6000
6001
Matthias Klosec4c48422012-10-21 23:05:35 +02006002 test -n "$PYTHON" && break
6003done
6004test -n "$PYTHON" || PYTHON="not-found"
6005
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006006if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006007 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6008else
6009 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006010fi
6011
6012
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006013case $MACHDEP in
6014bsdos*|hp*|HP*)
6015 # install -d does not work on BSDI or HP-UX
6016 if test -z "$INSTALL"
6017 then
6018 INSTALL="${srcdir}/install-sh -c"
6019 fi
6020esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021# Find a good install program. We prefer a C program (faster),
6022# so one script is as good as another. But avoid the broken or
6023# incompatible versions:
6024# SysV /etc/install, /usr/sbin/install
6025# SunOS /usr/etc/install
6026# IRIX /sbin/install
6027# AIX /bin/install
6028# AmigaOS /C/install, which installs bootblocks on floppy discs
6029# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6030# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6031# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6032# OS/2's system install, which has a completely different semantic
6033# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006034# Reject install programs that cannot install multiple files.
6035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6036$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006038if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040else
6041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042for as_dir in $PATH
6043do
6044 IFS=$as_save_IFS
6045 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 # Account for people who put trailing slashes in PATH elements.
6047case $as_dir/ in #((
6048 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006050 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051 /usr/ucb/* ) ;;
6052 *)
6053 # OSF1 and SCO ODT 3.0 have their own names for install.
6054 # Don't use installbsd from OSF since it installs stuff as root
6055 # by default.
6056 for ac_prog in ginstall scoinst install; do
6057 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006058 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059 if test $ac_prog = install &&
6060 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6061 # AIX install. It has an incompatible calling convention.
6062 :
6063 elif test $ac_prog = install &&
6064 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6065 # program-specific install script used by HP pwplus--don't use.
6066 :
6067 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 rm -rf conftest.one conftest.two conftest.dir
6069 echo one > conftest.one
6070 echo two > conftest.two
6071 mkdir conftest.dir
6072 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6073 test -s conftest.one && test -s conftest.two &&
6074 test -s conftest.dir/conftest.one &&
6075 test -s conftest.dir/conftest.two
6076 then
6077 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6078 break 3
6079 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080 fi
6081 fi
6082 done
6083 done
6084 ;;
6085esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006086
6087 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088IFS=$as_save_IFS
6089
Matthias Kloseb9621712010-04-24 17:59:49 +00006090rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091
6092fi
6093 if test "${ac_cv_path_install+set}" = set; then
6094 INSTALL=$ac_cv_path_install
6095 else
6096 # As a last resort, use the slow shell script. Don't cache a
6097 # value for INSTALL within a source directory, because that will
6098 # break other packages using the cache if that directory is
6099 # removed, or if the value is a relative name.
6100 INSTALL=$ac_install_sh
6101 fi
6102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6104$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006105
6106# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6107# It thinks the first close brace ends the variable substitution.
6108test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6109
6110test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6111
6112test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6113
Matthias Klose93a0ef12012-03-15 18:08:34 +01006114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6115$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6116if test -z "$MKDIR_P"; then
6117 if ${ac_cv_path_mkdir+:} false; then :
6118 $as_echo_n "(cached) " >&6
6119else
6120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6121for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6122do
6123 IFS=$as_save_IFS
6124 test -z "$as_dir" && as_dir=.
6125 for ac_prog in mkdir gmkdir; do
6126 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006127 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006128 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6129 'mkdir (GNU coreutils) '* | \
6130 'mkdir (coreutils) '* | \
6131 'mkdir (fileutils) '4.1*)
6132 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6133 break 3;;
6134 esac
6135 done
6136 done
6137 done
6138IFS=$as_save_IFS
6139
6140fi
6141
6142 test -d ./--version && rmdir ./--version
6143 if test "${ac_cv_path_mkdir+set}" = set; then
6144 MKDIR_P="$ac_cv_path_mkdir -p"
6145 else
6146 # As a last resort, use the slow shell script. Don't cache a
6147 # value for MKDIR_P within a source directory, because that will
6148 # break other packages using the cache if that directory is
6149 # removed, or if the value is a relative name.
6150 MKDIR_P="$ac_install_sh -d"
6151 fi
6152fi
6153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6154$as_echo "$MKDIR_P" >&6; }
6155
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156
6157# Not every filesystem supports hard links
6158
6159if test -z "$LN" ; then
6160 case $ac_sys_system in
6161 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162 *) LN=ln;;
6163 esac
6164fi
6165
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006166# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006167
6168ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006169
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6172$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173
6174# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006175if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176 withval=$with_pydebug;
6177if test "$withval" != no
6178then
6179
Matthias Kloseb9621712010-04-24 17:59:49 +00006180$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6183$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006185 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006186else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6187$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188fi
6189else
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6191$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192fi
6193
6194
6195# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6196# merged with this chunk of code?
6197
6198# Optimizer/debugger flags
6199# ------------------------
6200# (The following bit of code is complicated enough - please keep things
6201# indented properly. Just pretend you're editing Python code. ;-)
6202
6203# There are two parallel sets of case statements below, one that checks to
6204# see if OPT was set and one that does BASECFLAGS setting based upon
6205# compiler and platform. BASECFLAGS tweaks need to be made even if the
6206# user set OPT.
6207
6208# tweak OPT based on compiler and platform, only if the user didn't set
6209# it on the command line
6210
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006211if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212then
6213 case $GCC in
6214 yes)
6215 if test "$CC" != 'g++' ; then
6216 STRICT_PROTO="-Wstrict-prototypes"
6217 fi
6218 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6219 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6220 WRAP="-fwrapv"
6221 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006222
6223 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006224 case $CC in
6225 *clang*) WRAP="-fwrapv"
6226 ;;
6227 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006228
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229 case $ac_cv_prog_cc_g in
6230 yes)
6231 if test "$Py_DEBUG" = 'true' ; then
6232 # Optimization messes up debuggers, so turn it off for
6233 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006234 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235 else
6236 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6237 fi
6238 ;;
6239 *)
6240 OPT="-O3 -Wall $STRICT_PROTO"
6241 ;;
6242 esac
6243 case $ac_sys_system in
6244 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6245 ;;
6246 esac
6247 ;;
6248
6249 *)
6250 OPT="-O"
6251 ;;
6252 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006253fi
6254
6255
6256
6257# The -arch flags for universal builds on OSX
6258UNIVERSAL_ARCH_FLAGS=
6259
6260
6261# tweak BASECFLAGS based on compiler and platform
6262case $GCC in
6263yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006264 # Python doesn't violate C99 aliasing rules, but older versions of
6265 # GCC produce warnings for legal Python code. Enable
6266 # -fno-strict-aliasing on versions of GCC that support but produce
6267 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6269$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006270 ac_save_cc="$CC"
6271 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006272 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006273 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006274 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006275else
Matthias Kloseb9621712010-04-24 17:59:49 +00006276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006277/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006278
Matthias Kloseb159a552010-04-25 21:00:44 +00006279
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006280int
6281main ()
6282{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006283
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006284 ;
6285 return 0;
6286}
Matthias Kloseb159a552010-04-25 21:00:44 +00006287
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006289if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006290
6291 CC="$ac_save_cc -fstrict-aliasing"
6292 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006294/* end confdefs.h. */
6295
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006296 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006297int
6298main ()
6299{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006300double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006301 ;
6302 return 0;
6303}
Matthias Kloseb159a552010-04-25 21:00:44 +00006304
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006306if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006307
6308 ac_cv_no_strict_aliasing=no
6309
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310else
Matthias Kloseb159a552010-04-25 21:00:44 +00006311
6312 ac_cv_no_strict_aliasing=yes
6313
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006314fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006316
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006317else
Matthias Kloseb159a552010-04-25 21:00:44 +00006318
6319 ac_cv_no_strict_aliasing=no
6320
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006323fi
6324
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006325 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6328$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006329 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330 then
6331 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6332 fi
6333
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6335$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6336 ac_save_cc="$CC"
6337 CC="$CC -Wunused-result -Werror"
6338 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006339 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006340 $as_echo_n "(cached) " >&6
6341else
6342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6343/* end confdefs.h. */
6344
6345
6346int
6347main ()
6348{
6349
6350 ;
6351 return 0;
6352}
6353
6354_ACEOF
6355if ac_fn_c_try_compile "$LINENO"; then :
6356
6357 ac_cv_disable_unused_result_warning=yes
6358
6359else
6360
6361 ac_cv_disable_unused_result_warning=no
6362
6363fi
6364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6365fi
6366
6367 CFLAGS="$save_CFLAGS"
6368 CC="$ac_save_cc"
6369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6370$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6371
6372 if test $ac_cv_disable_unused_result_warning = yes
6373 then
6374 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6375 fi
6376
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006377 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6378 # support. Without this, treatment of subnormals doesn't follow
6379 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006380 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381 alpha*)
6382 BASECFLAGS="$BASECFLAGS -mieee"
6383 ;;
6384 esac
6385
6386 case $ac_sys_system in
6387 SCO_SV*)
6388 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6389 ;;
6390 # is there any other compiler on Darwin besides gcc?
6391 Darwin*)
6392 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6393 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006394 if test "${CC}" = gcc
6395 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6397$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006398 case "${UNIVERSALSDK}" in
6399 */MacOSX10.4u.sdk)
6400 # Build using 10.4 SDK, force usage of gcc when the
6401 # compiler is gcc, otherwise the user will get very
6402 # confusing error messages when building on OSX 10.6
6403 CC=gcc-4.0
6404 CPP=cpp-4.0
6405 ;;
6406 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6408$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006409 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006410
6411
6412 if test "${enable_universalsdk}"; then
6413 UNIVERSAL_ARCH_FLAGS=""
6414 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6415 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6416 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006417 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006418 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6419 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006420 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006421 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006422
6423 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6424 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006425 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006426 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006428 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6429 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006430 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006431 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006432
6433 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6434 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006435 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006436 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006437
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006439 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 +00006440
6441 fi
6442
6443
Ronald Oussoren666028b2010-04-18 19:07:43 +00006444 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6445 if test "${UNIVERSALSDK}" != "/"
6446 then
6447 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6448 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006449 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450 fi
6451 fi
6452
6453 # Calculate the right deployment target for this build.
6454 #
6455 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006456 if test ${cur_target} '>' 10.2 && \
6457 test ${cur_target} '<' 10.6
6458 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006459 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006460 if test ${enable_universalsdk}; then
6461 if test "${UNIVERSAL_ARCHS}" = "all"; then
6462 # Ensure that the default platform for a
6463 # 4-way universal build is OSX 10.5,
6464 # that's the first OS release where
6465 # 4-way builds make sense.
6466 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006467
6468 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6469 cur_target='10.5'
6470
6471 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6472 cur_target='10.5'
6473
6474 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6475 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006476 fi
6477 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006478 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006479 # On Intel macs default to a deployment
6480 # target of 10.4, that's the first OSX
6481 # release with Intel support.
6482 cur_target="10.4"
6483 fi
6484 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006485 fi
6486 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6487
6488 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6489 # environment with a value that is the same as what we'll use
6490 # in the Makefile to ensure that we'll get the same compiler
6491 # environment during configure and build time.
6492 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6493 export MACOSX_DEPLOYMENT_TARGET
6494 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6495
6496 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006497 esac
6498 ;;
6499
6500*)
6501 case $ac_sys_system in
6502 OpenUNIX*|UnixWare*)
6503 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6504 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006505 SCO_SV*)
6506 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6507 ;;
6508 esac
6509 ;;
6510esac
6511
6512if test "$Py_DEBUG" = 'true'; then
6513 :
6514else
6515 OPT="-DNDEBUG $OPT"
6516fi
6517
6518if test "$ac_arch_flags"
6519then
6520 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6521fi
6522
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006523# Check whether GCC supports PyArg_ParseTuple format
6524if test "$GCC" = "yes"
6525then
Matthias Kloseb9621712010-04-24 17:59:49 +00006526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6527$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006528 save_CFLAGS=$CFLAGS
6529 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006531/* end confdefs.h. */
6532
6533 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006534int
6535main ()
6536{
6537
6538 ;
6539 return 0;
6540}
Matthias Kloseb159a552010-04-25 21:00:44 +00006541
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006543if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006544
Matthias Kloseb159a552010-04-25 21:00:44 +00006545
Matthias Kloseb9621712010-04-24 17:59:49 +00006546$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006547
Matthias Kloseb159a552010-04-25 21:00:44 +00006548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006549$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006550
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006551else
Matthias Kloseb159a552010-04-25 21:00:44 +00006552
6553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006554$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006555
6556fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6558 CFLAGS=$save_CFLAGS
6559fi
6560
6561# On some compilers, pthreads are available without further options
6562# (e.g. MacOS X). On some of these systems, the compiler will not
6563# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6564# So we have to see first whether pthreads are available without
6565# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6567$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006568if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006569 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006570else
Matthias Kloseb9621712010-04-24 17:59:49 +00006571 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006572 ac_cv_pthread_is_default=no
6573else
Matthias Kloseb9621712010-04-24 17:59:49 +00006574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006575/* end confdefs.h. */
6576
Stefan Krah7dba5942012-11-22 22:49:11 +01006577#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006578#include <pthread.h>
6579
6580void* routine(void* p){return NULL;}
6581
6582int main(){
6583 pthread_t p;
6584 if(pthread_create(&p,NULL,routine,NULL)!=0)
6585 return 1;
6586 (void)pthread_detach(p);
6587 return 0;
6588}
6589
6590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006591if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006592
6593 ac_cv_pthread_is_default=yes
6594 ac_cv_kthread=no
6595 ac_cv_pthread=no
6596
6597else
Matthias Kloseb9621712010-04-24 17:59:49 +00006598 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006600rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6601 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006602fi
6603
6604
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006605fi
6606
Matthias Kloseb9621712010-04-24 17:59:49 +00006607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6608$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006609
6610
6611if test $ac_cv_pthread_is_default = yes
6612then
6613 ac_cv_kpthread=no
6614else
6615# -Kpthread, if available, provides the right #defines
6616# and linker options to make pthread_create available
6617# Some compilers won't report that they do not support -Kpthread,
6618# so we need to run a program to see whether it really made the
6619# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6621$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006622if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006623 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006624else
6625 ac_save_cc="$CC"
6626CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006627if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006628 ac_cv_kpthread=no
6629else
Matthias Kloseb9621712010-04-24 17:59:49 +00006630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006631/* end confdefs.h. */
6632
Stefan Krah7dba5942012-11-22 22:49:11 +01006633#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006634#include <pthread.h>
6635
6636void* routine(void* p){return NULL;}
6637
6638int main(){
6639 pthread_t p;
6640 if(pthread_create(&p,NULL,routine,NULL)!=0)
6641 return 1;
6642 (void)pthread_detach(p);
6643 return 0;
6644}
6645
6646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006647if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006648 ac_cv_kpthread=yes
6649else
Matthias Kloseb9621712010-04-24 17:59:49 +00006650 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6653 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006654fi
6655
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006656CC="$ac_save_cc"
6657fi
6658
Matthias Kloseb9621712010-04-24 17:59:49 +00006659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6660$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006661fi
6662
6663if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6664then
6665# -Kthread, if available, provides the right #defines
6666# and linker options to make pthread_create available
6667# Some compilers won't report that they do not support -Kthread,
6668# so we need to run a program to see whether it really made the
6669# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6671$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006672if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006673 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006674else
6675 ac_save_cc="$CC"
6676CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006677if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678 ac_cv_kthread=no
6679else
Matthias Kloseb9621712010-04-24 17:59:49 +00006680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681/* end confdefs.h. */
6682
Stefan Krah7dba5942012-11-22 22:49:11 +01006683#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684#include <pthread.h>
6685
6686void* routine(void* p){return NULL;}
6687
6688int main(){
6689 pthread_t p;
6690 if(pthread_create(&p,NULL,routine,NULL)!=0)
6691 return 1;
6692 (void)pthread_detach(p);
6693 return 0;
6694}
6695
6696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006697if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006698 ac_cv_kthread=yes
6699else
Matthias Kloseb9621712010-04-24 17:59:49 +00006700 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6703 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006704fi
6705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006706CC="$ac_save_cc"
6707fi
6708
Matthias Kloseb9621712010-04-24 17:59:49 +00006709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6710$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711fi
6712
6713if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6714then
6715# -pthread, if available, provides the right #defines
6716# and linker options to make pthread_create available
6717# Some compilers won't report that they do not support -pthread,
6718# so we need to run a program to see whether it really made the
6719# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6721$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006722if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006723 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006724else
6725 ac_save_cc="$CC"
6726CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006727if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006728 ac_cv_pthread=no
6729else
Matthias Kloseb9621712010-04-24 17:59:49 +00006730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006731/* end confdefs.h. */
6732
Stefan Krah7dba5942012-11-22 22:49:11 +01006733#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734#include <pthread.h>
6735
6736void* routine(void* p){return NULL;}
6737
6738int main(){
6739 pthread_t p;
6740 if(pthread_create(&p,NULL,routine,NULL)!=0)
6741 return 1;
6742 (void)pthread_detach(p);
6743 return 0;
6744}
6745
6746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006747if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006748 ac_cv_pthread=yes
6749else
Matthias Kloseb9621712010-04-24 17:59:49 +00006750 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006754fi
6755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756CC="$ac_save_cc"
6757fi
6758
Matthias Kloseb9621712010-04-24 17:59:49 +00006759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6760$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761fi
6762
6763# If we have set a CC compiler flag for thread support then
6764# check if it works for CXX, too.
6765ac_cv_cxx_thread=no
6766if test ! -z "$CXX"
6767then
Matthias Kloseb9621712010-04-24 17:59:49 +00006768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6769$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006770ac_save_cxx="$CXX"
6771
6772if test "$ac_cv_kpthread" = "yes"
6773then
6774 CXX="$CXX -Kpthread"
6775 ac_cv_cxx_thread=yes
6776elif test "$ac_cv_kthread" = "yes"
6777then
6778 CXX="$CXX -Kthread"
6779 ac_cv_cxx_thread=yes
6780elif test "$ac_cv_pthread" = "yes"
6781then
6782 CXX="$CXX -pthread"
6783 ac_cv_cxx_thread=yes
6784fi
6785
6786if test $ac_cv_cxx_thread = yes
6787then
6788 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6789 $CXX -c conftest.$ac_ext 2>&5
6790 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6791 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6792 then
6793 ac_cv_cxx_thread=yes
6794 else
6795 ac_cv_cxx_thread=no
6796 fi
6797 rm -fr conftest*
6798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6800$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006801fi
6802CXX="$ac_save_cxx"
6803
6804
6805# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6807$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006808if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810else
Matthias Kloseb9621712010-04-24 17:59:49 +00006811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812/* end confdefs.h. */
6813#include <stdlib.h>
6814#include <stdarg.h>
6815#include <string.h>
6816#include <float.h>
6817
6818int
6819main ()
6820{
6821
6822 ;
6823 return 0;
6824}
6825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006826if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827 ac_cv_header_stdc=yes
6828else
Matthias Kloseb9621712010-04-24 17:59:49 +00006829 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6832
6833if test $ac_cv_header_stdc = yes; then
6834 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836/* end confdefs.h. */
6837#include <string.h>
6838
6839_ACEOF
6840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006841 $EGREP "memchr" >/dev/null 2>&1; then :
6842
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843else
6844 ac_cv_header_stdc=no
6845fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006846rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006847
6848fi
6849
6850if test $ac_cv_header_stdc = yes; then
6851 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853/* end confdefs.h. */
6854#include <stdlib.h>
6855
6856_ACEOF
6857if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006858 $EGREP "free" >/dev/null 2>&1; then :
6859
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860else
6861 ac_cv_header_stdc=no
6862fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006863rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864
6865fi
6866
6867if test $ac_cv_header_stdc = yes; then
6868 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870 :
6871else
Matthias Kloseb9621712010-04-24 17:59:49 +00006872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006873/* end confdefs.h. */
6874#include <ctype.h>
6875#include <stdlib.h>
6876#if ((' ' & 0x0FF) == 0x020)
6877# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6878# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6879#else
6880# define ISLOWER(c) \
6881 (('a' <= (c) && (c) <= 'i') \
6882 || ('j' <= (c) && (c) <= 'r') \
6883 || ('s' <= (c) && (c) <= 'z'))
6884# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6885#endif
6886
6887#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6888int
6889main ()
6890{
6891 int i;
6892 for (i = 0; i < 256; i++)
6893 if (XOR (islower (i), ISLOWER (i))
6894 || toupper (i) != TOUPPER (i))
6895 return 2;
6896 return 0;
6897}
6898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006899if ac_fn_c_try_run "$LINENO"; then :
6900
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006901else
Matthias Kloseb9621712010-04-24 17:59:49 +00006902 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6905 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906fi
6907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908fi
6909fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6911$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912if test $ac_cv_header_stdc = yes; then
6913
Matthias Kloseb9621712010-04-24 17:59:49 +00006914$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915
6916fi
6917
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006918ac_save_cppflags="$CPPFLAGS"
6919CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006920for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006921fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006922ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006923sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006924unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006925poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006926sys/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 +01006927sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006928sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006929sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006930sys/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 -07006931libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006932bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006933do :
6934 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6935ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006936if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006937 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006938#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006939_ACEOF
6940
6941fi
6942
Guido van Rossum627b2d71993-12-24 10:39:16 +00006943done
6944
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006945CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006946ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006947for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6950$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006951if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006952 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006953else
Matthias Kloseb9621712010-04-24 17:59:49 +00006954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006955/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006956#include <sys/types.h>
6957#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006958
Martin v. Löwis11437992002-04-12 09:54:03 +00006959int
6960main ()
6961{
6962if ((DIR *) 0)
6963return 0;
6964 ;
6965 return 0;
6966}
6967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006968if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006969 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006970else
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006975eval ac_res=\$$as_ac_Header
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6977$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006978if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006979 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006980#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006981_ACEOF
6982
6983ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006984fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006985
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006986done
6987# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6988if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6990$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006991if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993else
Martin v. Löwis11437992002-04-12 09:54:03 +00006994 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006998/* Override any GCC internal prototype to avoid an error.
6999 Use char because int might match the return type of a GCC
7000 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007001#ifdef __cplusplus
7002extern "C"
7003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007004char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007005int
7006main ()
7007{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007008return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007009 ;
7010 return 0;
7011}
7012_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007013for ac_lib in '' dir; do
7014 if test -z "$ac_lib"; then
7015 ac_res="none required"
7016 else
7017 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007018 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007020 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007021 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007023rm -f core conftest.err conftest.$ac_objext \
7024 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007025 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007026 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007028done
Victor Stinnere0be4232011-10-25 13:06:09 +02007029if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007031else
7032 ac_cv_search_opendir=no
7033fi
7034rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007035LIBS=$ac_func_search_save_LIBS
7036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7038$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007039ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007040if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007041 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007042
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007043fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007044
Michael W. Hudson54241132001-12-07 15:38:26 +00007045else
Matthias Kloseb9621712010-04-24 17:59:49 +00007046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7047$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007048if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007050else
7051 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007055/* Override any GCC internal prototype to avoid an error.
7056 Use char because int might match the return type of a GCC
7057 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007058#ifdef __cplusplus
7059extern "C"
7060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007061char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007062int
7063main ()
7064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007065return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007066 ;
7067 return 0;
7068}
7069_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007070for ac_lib in '' x; do
7071 if test -z "$ac_lib"; then
7072 ac_res="none required"
7073 else
7074 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007075 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007076 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007077 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007078 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007080rm -f core conftest.err conftest.$ac_objext \
7081 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007082 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007083 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007085done
Victor Stinnere0be4232011-10-25 13:06:09 +02007086if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007087
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007088else
7089 ac_cv_search_opendir=no
7090fi
7091rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007092LIBS=$ac_func_search_save_LIBS
7093fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7095$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007096ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007097if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007098 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007099
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007100fi
7101
7102fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007103
Matthias Kloseb9621712010-04-24 17:59:49 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7105$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007106if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007107 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007108else
Matthias Kloseb9621712010-04-24 17:59:49 +00007109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007110/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007111#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007112int
7113main ()
7114{
7115return makedev(0, 0);
7116 ;
7117 return 0;
7118}
7119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007120if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007121 ac_cv_header_sys_types_h_makedev=yes
7122else
Matthias Kloseb9621712010-04-24 17:59:49 +00007123 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007125rm -f core conftest.err conftest.$ac_objext \
7126 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007127
7128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7130$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007131
7132if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007133ac_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 +02007134if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007135
Matthias Kloseb9621712010-04-24 17:59:49 +00007136$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007137
7138fi
7139
7140
7141
7142 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007143 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 +02007144if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007145
Matthias Kloseb9621712010-04-24 17:59:49 +00007146$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007147
7148fi
7149
7150
7151 fi
7152fi
7153
Michael W. Hudson54241132001-12-07 15:38:26 +00007154
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007155# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7156for ac_header in net/if.h
7157do :
7158 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7159#ifdef STDC_HEADERS
7160# include <stdlib.h>
7161# include <stddef.h>
7162#else
7163# ifdef HAVE_STDLIB_H
7164# include <stdlib.h>
7165# endif
7166#endif
7167#ifdef HAVE_SYS_SOCKET_H
7168# include <sys/socket.h>
7169#endif
7170
7171"
Victor Stinnere0be4232011-10-25 13:06:09 +02007172if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007173 cat >>confdefs.h <<_ACEOF
7174#define HAVE_NET_IF_H 1
7175_ACEOF
7176
7177fi
7178
7179done
7180
7181
7182
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007183# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007184for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007185do :
7186 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007187#ifdef HAVE_CURSES_H
7188#include <curses.h>
7189#endif
7190
Matthias Kloseb9621712010-04-24 17:59:49 +00007191"
Victor Stinnere0be4232011-10-25 13:06:09 +02007192if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007193 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007194#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007195_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007196
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007197fi
7198
7199done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007200
7201
Martin v. Löwis11017b12006-01-14 18:12:57 +00007202# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007203for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007204do :
7205 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 +00007206#ifdef HAVE_ASM_TYPES_H
7207#include <asm/types.h>
7208#endif
7209#ifdef HAVE_SYS_SOCKET_H
7210#include <sys/socket.h>
7211#endif
7212
Matthias Kloseb9621712010-04-24 17:59:49 +00007213"
Victor Stinnere0be4232011-10-25 13:06:09 +02007214if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007215 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007216#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007217_ACEOF
7218
7219fi
7220
7221done
7222
7223
Charles-François Natali47413c12011-10-06 19:47:44 +02007224# On Linux, can.h and can/raw.h require sys/socket.h
7225for ac_header in linux/can.h linux/can/raw.h
7226do :
7227 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7228ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7229#ifdef HAVE_SYS_SOCKET_H
7230#include <sys/socket.h>
7231#endif
7232
7233"
7234if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7235 cat >>confdefs.h <<_ACEOF
7236#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7237_ACEOF
7238
7239fi
7240
7241done
7242
7243
Guido van Rossum627b2d71993-12-24 10:39:16 +00007244# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007245was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7247$as_echo_n "checking for clock_t in time.h... " >&6; }
7248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007249/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007250#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007251
7252_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007254 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007255 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007256else
Martin v. Löwis11437992002-04-12 09:54:03 +00007257
7258
Matthias Kloseb9621712010-04-24 17:59:49 +00007259$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007260
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007261
Guido van Rossum627b2d71993-12-24 10:39:16 +00007262fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007263rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007264
Matthias Kloseb9621712010-04-24 17:59:49 +00007265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7266$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007267
Matthias Kloseb9621712010-04-24 17:59:49 +00007268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7269$as_echo_n "checking for makedev... " >&6; }
7270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007271/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007272
Jesus Cea740f53a2010-04-28 11:35:30 +00007273#if defined(MAJOR_IN_MKDEV)
7274#include <sys/mkdev.h>
7275#elif defined(MAJOR_IN_SYSMACROS)
7276#include <sys/sysmacros.h>
7277#else
7278#include <sys/types.h>
7279#endif
7280
Neal Norwitz11690112002-07-30 01:08:28 +00007281int
7282main ()
7283{
Jesus Cea740f53a2010-04-28 11:35:30 +00007284
7285 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007286 ;
7287 return 0;
7288}
Matthias Kloseb159a552010-04-25 21:00:44 +00007289
Neal Norwitz11690112002-07-30 01:08:28 +00007290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007291if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007292 ac_cv_has_makedev=yes
7293else
Matthias Kloseb9621712010-04-24 17:59:49 +00007294 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007296rm -f core conftest.err conftest.$ac_objext \
7297 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7299$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007300if test "$ac_cv_has_makedev" = "yes"; then
7301
Matthias Kloseb9621712010-04-24 17:59:49 +00007302$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007303
7304fi
7305
Martin v. Löwis399a6892002-10-04 10:22:02 +00007306# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7307# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7308# defined, but the compiler does not support pragma redefine_extname,
7309# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7310# structures (such as rlimit64) without declaring them. As a
7311# work-around, disable LFS on such configurations
7312
7313use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7315$as_echo_n "checking Solaris LFS bug... " >&6; }
7316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007317/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007318
7319#define _LARGEFILE_SOURCE 1
7320#define _FILE_OFFSET_BITS 64
7321#include <sys/resource.h>
7322
Martin v. Löwis399a6892002-10-04 10:22:02 +00007323int
7324main ()
7325{
7326struct rlimit foo;
7327 ;
7328 return 0;
7329}
7330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007332 sol_lfs_bug=no
7333else
Matthias Kloseb9621712010-04-24 17:59:49 +00007334 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7338$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007339if test "$sol_lfs_bug" = "yes"; then
7340 use_lfs=no
7341fi
7342
7343if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007344# Two defines needed to enable largefile support on various platforms
7345# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007346case $ac_sys_system/$ac_sys_release in
7347AIX*)
7348
7349$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7350
7351 ;;
7352esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007353
Matthias Kloseb9621712010-04-24 17:59:49 +00007354$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007355
7356
Matthias Kloseb9621712010-04-24 17:59:49 +00007357$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007358
Martin v. Löwis399a6892002-10-04 10:22:02 +00007359fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007360
Guido van Rossum84e7b241996-08-19 21:59:00 +00007361# Add some code to confdefs.h so that the test for off_t works on SCO
7362cat >> confdefs.h <<\EOF
7363#if defined(SCO_DS)
7364#undef _OFF_T
7365#endif
7366EOF
7367
Guido van Rossumef2255b2000-03-10 22:30:29 +00007368# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007369ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007370if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007371
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007372else
Martin v. Löwis11437992002-04-12 09:54:03 +00007373
7374cat >>confdefs.h <<_ACEOF
7375#define mode_t int
7376_ACEOF
7377
7378fi
7379
Matthias Kloseb9621712010-04-24 17:59:49 +00007380ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007381if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007382
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007383else
Martin v. Löwis11437992002-04-12 09:54:03 +00007384
7385cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007386#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007387_ACEOF
7388
7389fi
7390
Matthias Kloseb9621712010-04-24 17:59:49 +00007391ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007392if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007393
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007394else
Martin v. Löwis11437992002-04-12 09:54:03 +00007395
7396cat >>confdefs.h <<_ACEOF
7397#define pid_t int
7398_ACEOF
7399
7400fi
7401
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007402
Martin v. Löwis11437992002-04-12 09:54:03 +00007403cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007404#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007405_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007406
Matthias Kloseb9621712010-04-24 17:59:49 +00007407ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007408if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007409
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007410else
Martin v. Löwis11437992002-04-12 09:54:03 +00007411
7412cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007413#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007414_ACEOF
7415
7416fi
7417
Matthias Kloseb9621712010-04-24 17:59:49 +00007418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7419$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007420if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007421 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007422else
Matthias Kloseb9621712010-04-24 17:59:49 +00007423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007424/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007425#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007426
7427_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007428if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007429 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007430 ac_cv_type_uid_t=yes
7431else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007432 ac_cv_type_uid_t=no
7433fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007434rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007435
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7438$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007439if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007440
Matthias Kloseb9621712010-04-24 17:59:49 +00007441$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007442
7443
Matthias Kloseb9621712010-04-24 17:59:49 +00007444$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007445
7446fi
7447
Mark Dickinson983bc162012-12-02 12:11:38 +00007448
7449# There are two separate checks for each of the exact-width integer types we
7450# need. First we check whether the type is available using the usual
7451# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7452# and <stdint.h> where available). We then also use the special type checks of
7453# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7454# directly, #define's uint32_t to be a suitable type.
7455
7456ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7457if test "x$ac_cv_type_uint32_t" = xyes; then :
7458
7459$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7460
7461fi
7462
Matthias Kloseb9621712010-04-24 17:59:49 +00007463ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7464case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007465 no|yes) ;; #(
7466 *)
7467
Matthias Kloseb9621712010-04-24 17:59:49 +00007468$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007469
7470
7471cat >>confdefs.h <<_ACEOF
7472#define uint32_t $ac_cv_c_uint32_t
7473_ACEOF
7474;;
7475 esac
7476
Mark Dickinson983bc162012-12-02 12:11:38 +00007477
7478ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7479if test "x$ac_cv_type_uint64_t" = xyes; then :
7480
7481$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7482
7483fi
7484
Matthias Kloseb9621712010-04-24 17:59:49 +00007485ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7486case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007487 no|yes) ;; #(
7488 *)
7489
Matthias Kloseb9621712010-04-24 17:59:49 +00007490$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007491
7492
7493cat >>confdefs.h <<_ACEOF
7494#define uint64_t $ac_cv_c_uint64_t
7495_ACEOF
7496;;
7497 esac
7498
Mark Dickinson983bc162012-12-02 12:11:38 +00007499
7500ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7501if test "x$ac_cv_type_int32_t" = xyes; then :
7502
7503$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7504
7505fi
7506
Matthias Kloseb9621712010-04-24 17:59:49 +00007507ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7508case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007509 no|yes) ;; #(
7510 *)
7511
7512cat >>confdefs.h <<_ACEOF
7513#define int32_t $ac_cv_c_int32_t
7514_ACEOF
7515;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007516esac
7517
Mark Dickinson983bc162012-12-02 12:11:38 +00007518
7519ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7520if test "x$ac_cv_type_int64_t" = xyes; then :
7521
7522$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7523
7524fi
7525
Matthias Kloseb9621712010-04-24 17:59:49 +00007526ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7527case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007528 no|yes) ;; #(
7529 *)
7530
7531cat >>confdefs.h <<_ACEOF
7532#define int64_t $ac_cv_c_int64_t
7533_ACEOF
7534;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007535esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007536
Mark Dickinson983bc162012-12-02 12:11:38 +00007537
Matthias Kloseb9621712010-04-24 17:59:49 +00007538ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007539if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007540
Matthias Kloseb9621712010-04-24 17:59:49 +00007541$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007542
7543fi
7544
Stefan Krah1919b7e2012-03-21 18:25:23 +01007545ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7546if test "x$ac_cv_type___uint128_t" = xyes; then :
7547
7548$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7549
7550fi
7551
Jack Jansendd19cf82001-12-06 22:36:17 +00007552
Michael W. Hudson54241132001-12-07 15:38:26 +00007553# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007554# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007555# The cast to long int works around a bug in the HP C Compiler
7556# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7557# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7558# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7560$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007561if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007562 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007563else
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 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 +00007565
Martin v. Löwis11437992002-04-12 09:54:03 +00007566else
Matthias Kloseb9621712010-04-24 17:59:49 +00007567 if test "$ac_cv_type_int" = yes; then
7568 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7569$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007570as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007571See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007572 else
7573 ac_cv_sizeof_int=0
7574 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007576
Martin v. Löwis11437992002-04-12 09:54:03 +00007577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7579$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007580
7581
7582
Martin v. Löwis11437992002-04-12 09:54:03 +00007583cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007584#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007585_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007586
7587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007588# The cast to long int works around a bug in the HP C Compiler
7589# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7590# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7591# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7593$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007594if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007595 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007596else
Matthias Kloseb9621712010-04-24 17:59:49 +00007597 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 +00007598
Martin v. Löwis11437992002-04-12 09:54:03 +00007599else
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 if test "$ac_cv_type_long" = yes; then
7601 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007603as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007604See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007605 else
7606 ac_cv_sizeof_long=0
7607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007609
Martin v. Löwis11437992002-04-12 09:54:03 +00007610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7612$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007613
7614
7615
Martin v. Löwis11437992002-04-12 09:54:03 +00007616cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007617#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007618_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007619
7620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007621# The cast to long int works around a bug in the HP C Compiler
7622# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7623# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7624# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7626$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007627if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007628 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007629else
Matthias Kloseb9621712010-04-24 17:59:49 +00007630 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 +00007631
Martin v. Löwis11437992002-04-12 09:54:03 +00007632else
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 if test "$ac_cv_type_void_p" = yes; then
7634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007636as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007637See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007638 else
7639 ac_cv_sizeof_void_p=0
7640 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007642
Martin v. Löwis11437992002-04-12 09:54:03 +00007643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7645$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007646
7647
7648
Martin v. Löwis11437992002-04-12 09:54:03 +00007649cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007650#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007651_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007652
7653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007654# The cast to long int works around a bug in the HP C Compiler
7655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7657# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7659$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007660if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007661 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007662else
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 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 +00007664
Martin v. Löwis11437992002-04-12 09:54:03 +00007665else
Matthias Kloseb9621712010-04-24 17:59:49 +00007666 if test "$ac_cv_type_short" = yes; then
7667 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007669as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007670See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007671 else
7672 ac_cv_sizeof_short=0
7673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007675
Martin v. Löwis11437992002-04-12 09:54:03 +00007676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7678$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679
7680
7681
Martin v. Löwis11437992002-04-12 09:54:03 +00007682cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007683#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007684_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007685
7686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007687# The cast to long int works around a bug in the HP C Compiler
7688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7690# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7692$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007693if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007694 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007695else
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 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 +00007697
Martin v. Löwis11437992002-04-12 09:54:03 +00007698else
Matthias Kloseb9621712010-04-24 17:59:49 +00007699 if test "$ac_cv_type_float" = yes; then
7700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007702as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007703See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704 else
7705 ac_cv_sizeof_float=0
7706 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007708
Martin v. Löwis11437992002-04-12 09:54:03 +00007709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7711$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007712
7713
7714
Martin v. Löwis11437992002-04-12 09:54:03 +00007715cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007716#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007717_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007718
7719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007720# The cast to long int works around a bug in the HP C Compiler
7721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7723# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7725$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007726if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007728else
Matthias Kloseb9621712010-04-24 17:59:49 +00007729 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 +00007730
Martin v. Löwis11437992002-04-12 09:54:03 +00007731else
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 if test "$ac_cv_type_double" = yes; then
7733 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007735as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007736See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007737 else
7738 ac_cv_sizeof_double=0
7739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007741
Martin v. Löwis11437992002-04-12 09:54:03 +00007742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7744$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007745
7746
7747
Martin v. Löwis11437992002-04-12 09:54:03 +00007748cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007749#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007750_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007751
7752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007753# The cast to long int works around a bug in the HP C Compiler
7754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7756# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7758$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007759if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007761else
Matthias Kloseb9621712010-04-24 17:59:49 +00007762 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 +00007763
Martin v. Löwis11437992002-04-12 09:54:03 +00007764else
Matthias Kloseb9621712010-04-24 17:59:49 +00007765 if test "$ac_cv_type_fpos_t" = yes; then
7766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007768as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007769See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007770 else
7771 ac_cv_sizeof_fpos_t=0
7772 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007774
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7777$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007778
7779
7780
Martin v. Löwis11437992002-04-12 09:54:03 +00007781cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007782#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007783_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007784
Michael W. Hudson54241132001-12-07 15:38:26 +00007785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007786# The cast to long int works around a bug in the HP C Compiler
7787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7789# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7791$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007792if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007794else
Matthias Kloseb9621712010-04-24 17:59:49 +00007795 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 +00007796
Martin v. Löwis18e16552006-02-15 17:27:45 +00007797else
Matthias Kloseb9621712010-04-24 17:59:49 +00007798 if test "$ac_cv_type_size_t" = yes; then
7799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007801as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007802See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803 else
7804 ac_cv_sizeof_size_t=0
7805 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007807
Martin v. Löwis18e16552006-02-15 17:27:45 +00007808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7810$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811
7812
7813
Martin v. Löwis18e16552006-02-15 17:27:45 +00007814cat >>confdefs.h <<_ACEOF
7815#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7816_ACEOF
7817
7818
Christian Heimes400adb02008-02-01 08:12:03 +00007819# The cast to long int works around a bug in the HP C Compiler
7820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7822# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7824$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007825if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007826 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007827else
Matthias Kloseb9621712010-04-24 17:59:49 +00007828 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 +00007829
Christian Heimes400adb02008-02-01 08:12:03 +00007830else
Matthias Kloseb9621712010-04-24 17:59:49 +00007831 if test "$ac_cv_type_pid_t" = yes; then
7832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007834as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007835See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007836 else
7837 ac_cv_sizeof_pid_t=0
7838 fi
7839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007840
Christian Heimes400adb02008-02-01 08:12:03 +00007841fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7843$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007844
7845
7846
7847cat >>confdefs.h <<_ACEOF
7848#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7849_ACEOF
7850
7851
Michael W. Hudson54241132001-12-07 15:38:26 +00007852
Matthias Kloseb9621712010-04-24 17:59:49 +00007853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7854$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007855have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007857/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007858
Martin v. Löwis11437992002-04-12 09:54:03 +00007859int
7860main ()
7861{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007862long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007863 ;
7864 return 0;
7865}
7866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007867if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007868
7869
Matthias Kloseb9621712010-04-24 17:59:49 +00007870$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007871
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007872 have_long_long=yes
7873
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7877$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007878if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879# The cast to long int works around a bug in the HP C Compiler
7880# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7881# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7882# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7884$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007885if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007887else
Matthias Kloseb9621712010-04-24 17:59:49 +00007888 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 +00007889
Martin v. Löwis11437992002-04-12 09:54:03 +00007890else
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 if test "$ac_cv_type_long_long" = yes; then
7892 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7893$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007894as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007895See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007896 else
7897 ac_cv_sizeof_long_long=0
7898 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900
Martin v. Löwis11437992002-04-12 09:54:03 +00007901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7903$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007904
7905
7906
Martin v. Löwis11437992002-04-12 09:54:03 +00007907cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007908#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007909_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007910
Michael W. Hudson54241132001-12-07 15:38:26 +00007911
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007912fi
7913
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7915$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007916have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007918/* end confdefs.h. */
7919
7920int
7921main ()
7922{
7923long double x; x = (long double)0;
7924 ;
7925 return 0;
7926}
7927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007928if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007929
7930
Matthias Kloseb9621712010-04-24 17:59:49 +00007931$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007932
7933 have_long_double=yes
7934
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007935fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7938$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007939if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007940# The cast to long int works around a bug in the HP C Compiler
7941# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7942# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7943# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7945$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007946if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007948else
Matthias Kloseb9621712010-04-24 17:59:49 +00007949 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 +00007950
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007951else
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 if test "$ac_cv_type_long_double" = yes; then
7953 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007955as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007956See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007957 else
7958 ac_cv_sizeof_long_double=0
7959 fi
7960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007961
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7964$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007965
7966
7967
7968cat >>confdefs.h <<_ACEOF
7969#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7970_ACEOF
7971
7972
7973fi
7974
7975
Matthias Kloseb9621712010-04-24 17:59:49 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7977$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007978have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007980/* end confdefs.h. */
7981
7982int
7983main ()
7984{
7985_Bool x; x = (_Bool)0;
7986 ;
7987 return 0;
7988}
7989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007990if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007991
7992
Matthias Kloseb9621712010-04-24 17:59:49 +00007993$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007994
7995 have_c99_bool=yes
7996
Thomas Woutersb2137042007-02-01 18:02:27 +00007997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8000$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008001if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002# The cast to long int works around a bug in the HP C Compiler
8003# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8004# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8005# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8007$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008008if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008009 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008010else
Matthias Kloseb9621712010-04-24 17:59:49 +00008011 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 +00008012
Thomas Woutersb2137042007-02-01 18:02:27 +00008013else
Matthias Kloseb9621712010-04-24 17:59:49 +00008014 if test "$ac_cv_type__Bool" = yes; then
8015 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8016$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008017as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008018See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019 else
8020 ac_cv_sizeof__Bool=0
8021 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008023
Thomas Woutersb2137042007-02-01 18:02:27 +00008024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8026$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027
8028
8029
Thomas Woutersb2137042007-02-01 18:02:27 +00008030cat >>confdefs.h <<_ACEOF
8031#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8032_ACEOF
8033
8034
8035fi
8036
Matthias Kloseb9621712010-04-24 17:59:49 +00008037ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008038 #include <stdint.h>
8039 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008040 #ifdef HAVE_INTTYPES_H
8041 #include <inttypes.h>
8042 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008043"
Victor Stinnere0be4232011-10-25 13:06:09 +02008044if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008045
8046cat >>confdefs.h <<_ACEOF
8047#define HAVE_UINTPTR_T 1
8048_ACEOF
8049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008050# The cast to long int works around a bug in the HP C Compiler
8051# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8052# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8053# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8055$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008056if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008058else
Matthias Kloseb9621712010-04-24 17:59:49 +00008059 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 +00008060
Martin v. Löwis11437992002-04-12 09:54:03 +00008061else
Matthias Kloseb9621712010-04-24 17:59:49 +00008062 if test "$ac_cv_type_uintptr_t" = yes; then
8063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008065as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008066See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008067 else
8068 ac_cv_sizeof_uintptr_t=0
8069 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008071
Martin v. Löwis11437992002-04-12 09:54:03 +00008072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8074$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075
8076
8077
Martin v. Löwis11437992002-04-12 09:54:03 +00008078cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008079#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008080_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008081
Michael W. Hudson54241132001-12-07 15:38:26 +00008082
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008083fi
8084
Thomas Wouters89f507f2006-12-13 04:49:30 +00008085
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008086# The cast to long int works around a bug in the HP C Compiler
8087# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8088# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8089# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8091$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008092if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008094else
Matthias Kloseb9621712010-04-24 17:59:49 +00008095 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008096#ifdef HAVE_SYS_TYPES_H
8097#include <sys/types.h>
8098#endif
8099
Matthias Kloseb9621712010-04-24 17:59:49 +00008100"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008102else
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 if test "$ac_cv_type_off_t" = yes; then
8104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8105$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008106as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008107See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008108 else
8109 ac_cv_sizeof_off_t=0
8110 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008112
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8115$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008116
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008117
8118
Martin v. Löwis11437992002-04-12 09:54:03 +00008119cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008120#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008121_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008122
Michael W. Hudson54241132001-12-07 15:38:26 +00008123
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008124
Matthias Kloseb9621712010-04-24 17:59:49 +00008125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8126$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008127if test "$have_long_long" = yes
8128then
8129if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008130 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008131
Matthias Kloseb9621712010-04-24 17:59:49 +00008132$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008133
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8135$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008136else
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8138$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008139fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008140else
Matthias Kloseb9621712010-04-24 17:59:49 +00008141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8142$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008143fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008144
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008145# The cast to long int works around a bug in the HP C Compiler
8146# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8147# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8148# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8150$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008151if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008152 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008153else
Matthias Kloseb9621712010-04-24 17:59:49 +00008154 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008155#ifdef HAVE_SYS_TYPES_H
8156#include <sys/types.h>
8157#endif
8158#ifdef HAVE_TIME_H
8159#include <time.h>
8160#endif
8161
Matthias Kloseb9621712010-04-24 17:59:49 +00008162"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008163
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008164else
Matthias Kloseb9621712010-04-24 17:59:49 +00008165 if test "$ac_cv_type_time_t" = yes; then
8166 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8167$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008168as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008169See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008170 else
8171 ac_cv_sizeof_time_t=0
8172 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008174
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8177$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008178
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008179
8180
Martin v. Löwis11437992002-04-12 09:54:03 +00008181cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008182#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008183_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008184
Michael W. Hudson54241132001-12-07 15:38:26 +00008185
8186
Trent Mick635f6fb2000-08-23 21:33:05 +00008187# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008188ac_save_cc="$CC"
8189if test "$ac_cv_kpthread" = "yes"
8190then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008191elif test "$ac_cv_kthread" = "yes"
8192then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008193elif test "$ac_cv_pthread" = "yes"
8194then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008195fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008196
Matthias Kloseb9621712010-04-24 17:59:49 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8198$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008199have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008201/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008202
8203 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008204int
8205main ()
8206{
Guido van Rossum12580492000-09-24 16:47:19 +00008207pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008208 ;
8209 return 0;
8210}
Matthias Kloseb159a552010-04-25 21:00:44 +00008211
Martin v. Löwis11437992002-04-12 09:54:03 +00008212_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008213if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008214 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8218$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008219if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008220 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008221# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8222# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8223# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8225$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008226if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008228else
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008230#ifdef HAVE_PTHREAD_H
8231#include <pthread.h>
8232#endif
8233
Matthias Kloseb9621712010-04-24 17:59:49 +00008234"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008235
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 if test "$ac_cv_type_pthread_t" = yes; then
8238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008240as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008241See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008242 else
8243 ac_cv_sizeof_pthread_t=0
8244 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008246
Trent Mick635f6fb2000-08-23 21:33:05 +00008247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8249$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008250
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008251
8252
Martin v. Löwis11437992002-04-12 09:54:03 +00008253cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008254#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008255_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008256
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008257
Trent Mick635f6fb2000-08-23 21:33:05 +00008258fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008259CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008260
Michael W. Hudson54241132001-12-07 15:38:26 +00008261
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008262case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008263 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008264 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8265 ;;
8266 Darwin/*)
8267 OTHER_LIBTOOL_OPT=""
8268 ;;
8269esac
8270
8271
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008272ARCH_RUN_32BIT=""
8273
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008274case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008275 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008276 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8277 if test "${enable_universalsdk}"; then
8278 :
8279 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008280 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008281 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008282 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008283 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008284 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008285 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008286 if test ${gcc_version} '<' 4.0
8287 then
8288 LIBTOOL_CRUFT="-lcc_dynamic"
8289 else
8290 LIBTOOL_CRUFT=""
8291 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008292 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008293 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008294else
Matthias Kloseb9621712010-04-24 17:59:49 +00008295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008296/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008297
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008298 #include <unistd.h>
8299 int main(int argc, char*argv[])
8300 {
8301 if (sizeof(long) == 4) {
8302 return 0;
8303 } else {
8304 return 1;
8305 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008306 }
8307
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008309if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008310 ac_osx_32bit=yes
8311else
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8315 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008316fi
8317
8318
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008319 if test "${ac_osx_32bit}" = "yes"; then
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="i386"
8323 ;;
8324 ppc)
8325 MACOSX_DEFAULT_ARCH="ppc"
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 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008332 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008333 i386)
8334 MACOSX_DEFAULT_ARCH="x86_64"
8335 ;;
8336 ppc)
8337 MACOSX_DEFAULT_ARCH="ppc64"
8338 ;;
8339 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008340 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008341 ;;
8342 esac
8343
8344 #ARCH_RUN_32BIT="true"
8345 fi
8346
8347 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008348 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008349 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008350esac
8351
Matthias Kloseb9621712010-04-24 17:59:49 +00008352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8353$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008354if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008355then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008356 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008357 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008358 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008361
Matthias Kloseb9621712010-04-24 17:59:49 +00008362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8363$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008364 if test $enable_shared = "yes"
8365 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008366 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 +00008367 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008368else
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8370$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008371fi
8372
Matthias Kloseb9621712010-04-24 17:59:49 +00008373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8374$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008375case $ac_sys_system/$ac_sys_release in
8376 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008379
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8381$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008382 ;;
8383 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8385$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008386 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008387esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008388
Guido van Rossum0a516c91994-09-12 10:58:40 +00008389# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008390
Michael W. Hudson54241132001-12-07 15:38:26 +00008391
8392
8393
8394
Benjamin Peterson99f03762010-04-11 22:15:28 +00008395
Thomas Wouters477c8d52006-05-27 19:21:47 +00008396
Guido van Rossum0a516c91994-09-12 10:58:40 +00008397# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008398# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008399# (Shared libraries in this instance are shared modules to be loaded into
8400# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8402$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008403if test -z "$LDSHARED"
8404then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008405 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008406 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008407 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008408 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008409 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008410 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008411 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008412 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008413 if test "$GCC" = "yes" ; then
8414 LDSHARED='$(CC) -shared'
8415 LDCXXSHARED='$(CXX) -shared'
8416 else
8417 LDSHARED='$(CC) -G'
8418 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008419 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008420 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008421 if test "$GCC" = "yes" ; then
8422 LDSHARED='$(CC) -shared'
8423 LDCXXSHARED='$(CXX) -shared'
8424 else
8425 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008426 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008427 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008428 LDSHARED='$(CC) -bundle'
8429 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008430 if test "$enable_framework" ; then
8431 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008432 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8433 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008434 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008435 else
8436 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008437 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008438 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008439 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008440 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008441 LDSHARED='$(CC) -bundle'
8442 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008443 if test "$enable_framework" ; then
8444 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008445 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8446 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008447 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008448 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008449 # No framework, use the Python app as bundle-loader
8450 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008451 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008452 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008453 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008454 Darwin/*)
8455 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8456 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008457
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008458 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008459 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008460 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008461 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008462 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008463 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8464 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008465 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008466 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008467 LDSHARED='$(CC) -bundle'
8468 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008469 if test "$enable_framework" ; then
8470 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008471 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8472 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008473 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008474 else
8475 # No framework, use the Python app as bundle-loader
8476 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8477 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008478 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008479 fi
8480 fi
8481 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008482 Linux*|GNU*|QNX*)
8483 LDSHARED='$(CC) -shared'
8484 LDCXXSHARED='$(CXX) -shared';;
8485 BSD/OS*/4*)
8486 LDSHARED="gcc -shared"
8487 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008488 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008489 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008490 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008491 LDSHARED='$(CC) -shared'
8492 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008493 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008494 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008495 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008496 OpenBSD*)
8497 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8498 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008499 LDSHARED='$(CC) -shared $(CCSHARED)'
8500 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008501 else
8502 case `uname -r` in
8503 [01].* | 2.[0-7] | 2.[0-7].*)
8504 LDSHARED="ld -Bshareable ${LDFLAGS}"
8505 ;;
8506 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008507 LDSHARED='$(CC) -shared $(CCSHARED)'
8508 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008509 ;;
8510 esac
8511 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008512 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008513 LDSHARED='$(CC) -shared'
8514 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008515 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008516 if test "$GCC" = "yes" ; then
8517 LDSHARED='$(CC) -shared'
8518 LDCXXSHARED='$(CXX) -shared'
8519 else
8520 LDSHARED='$(CC) -G'
8521 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008522 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008523 SCO_SV*)
8524 LDSHARED='$(CC) -Wl,-G,-Bexport'
8525 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8526 CYGWIN*)
8527 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8528 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008529 *) LDSHARED="ld";;
8530 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8533$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008534LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008535BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008536# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008537# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8539$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008540if test -z "$CCSHARED"
8541then
Guido van Rossum07397971997-04-29 21:49:50 +00008542 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008543 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008544 then CCSHARED="-fPIC";
8545 elif test `uname -p` = sparc;
8546 then CCSHARED="-xcode=pic32";
8547 else CCSHARED="-Kpic";
8548 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008549 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008550 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008551 else CCSHARED="+z";
8552 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008553 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008554 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008555 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008556 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008557 if test "$GCC" = "yes"
8558 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008559 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008560 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008561 SCO_SV*)
8562 if test "$GCC" = "yes"
8563 then CCSHARED="-fPIC"
8564 else CCSHARED="-Kpic -belf"
8565 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008566 IRIX*/6*) case $CC in
8567 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008568 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008569 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008570 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8573$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008574# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008575# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8577$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008578if test -z "$LINKFORSHARED"
8579then
Guido van Rossum07397971997-04-29 21:49:50 +00008580 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008581 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008582 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008583 LINKFORSHARED="-Wl,-E -Wl,+s";;
8584# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008585 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008586 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008587 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008589 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008590 if test "$enable_framework"
8591 then
Jack Jansenda49e192005-01-07 13:08:22 +00008592 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008593 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008594 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008595 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008596 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008597 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008598 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008599 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8600 then
8601 LINKFORSHARED="-Wl,--export-dynamic"
8602 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008603 SunOS/5*) case $CC in
8604 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008605 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008606 then
8607 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008608 fi;;
8609 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008610 CYGWIN*)
8611 if test $enable_shared = "no"
8612 then
8613 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8614 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008615 QNX*)
8616 # -Wl,-E causes the symbols to be added to the dynamic
8617 # symbol table so that they can be found when a module
8618 # is loaded. -N 2048K causes the stack size to be set
8619 # to 2048 kilobytes so that the stack doesn't overflow
8620 # when running test_compile.py.
8621 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008622 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8625$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008626
Michael W. Hudson54241132001-12-07 15:38:26 +00008627
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008628
Matthias Kloseb9621712010-04-24 17:59:49 +00008629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8630$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008631if test ! "$LIBRARY" = "$LDLIBRARY"
8632then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008633 case $ac_sys_system in
8634 CYGWIN*)
8635 # Cygwin needs CCSHARED when building extension DLLs
8636 # but not when building the interpreter DLL.
8637 CFLAGSFORSHARED='';;
8638 *)
8639 CFLAGSFORSHARED='$(CCSHARED)'
8640 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8643$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008644
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008645# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8646# library (with --enable-shared).
8647# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008648# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8649# if it is not required, since it creates a dependency of the shared library
8650# to LIBS. This, in turn, means that applications linking the shared libpython
8651# don't need to link LIBS explicitly. The default should be only changed
8652# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008653
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8655$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008656case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008657 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008658 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008659esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8661$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008662
8663
Guido van Rossum627b2d71993-12-24 10:39:16 +00008664# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8666$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008667if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008668 $as_echo_n "(cached) " >&6
8669else
8670 ac_check_lib_save_LIBS=$LIBS
8671LIBS="-lsendfile $LIBS"
8672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8673/* end confdefs.h. */
8674
8675/* Override any GCC internal prototype to avoid an error.
8676 Use char because int might match the return type of a GCC
8677 builtin and then its argument prototype would still apply. */
8678#ifdef __cplusplus
8679extern "C"
8680#endif
8681char sendfile ();
8682int
8683main ()
8684{
8685return sendfile ();
8686 ;
8687 return 0;
8688}
8689_ACEOF
8690if ac_fn_c_try_link "$LINENO"; then :
8691 ac_cv_lib_sendfile_sendfile=yes
8692else
8693 ac_cv_lib_sendfile_sendfile=no
8694fi
8695rm -f core conftest.err conftest.$ac_objext \
8696 conftest$ac_exeext conftest.$ac_ext
8697LIBS=$ac_check_lib_save_LIBS
8698fi
8699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8700$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008701if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008702 cat >>confdefs.h <<_ACEOF
8703#define HAVE_LIBSENDFILE 1
8704_ACEOF
8705
8706 LIBS="-lsendfile $LIBS"
8707
8708fi
8709
Matthias Kloseb9621712010-04-24 17:59:49 +00008710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8711$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008712if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008714else
Martin v. Löwis11437992002-04-12 09:54:03 +00008715 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008716LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720/* Override any GCC internal prototype to avoid an error.
8721 Use char because int might match the return type of a GCC
8722 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008723#ifdef __cplusplus
8724extern "C"
8725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008726char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008727int
8728main ()
8729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008730return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 ;
8732 return 0;
8733}
8734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008735if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008737else
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740rm -f core conftest.err conftest.$ac_objext \
8741 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008742LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8745$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008746if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 cat >>confdefs.h <<_ACEOF
8748#define HAVE_LIBDL 1
8749_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008750
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008751 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008752
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008753fi
8754 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8756$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008757if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008759else
Martin v. Löwis11437992002-04-12 09:54:03 +00008760 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008761LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765/* Override any GCC internal prototype to avoid an error.
8766 Use char because int might match the return type of a GCC
8767 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008768#ifdef __cplusplus
8769extern "C"
8770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008771char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008772int
8773main ()
8774{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008775return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 ;
8777 return 0;
8778}
8779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008780if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008781 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008782else
Matthias Kloseb9621712010-04-24 17:59:49 +00008783 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785rm -f core conftest.err conftest.$ac_objext \
8786 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008787LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8790$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008791if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008792 cat >>confdefs.h <<_ACEOF
8793#define HAVE_LIBDLD 1
8794_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008795
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008796 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008797
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008798fi
8799 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008800
Georg Brandlb1441c72009-01-03 22:33:39 +00008801# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008802if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8804$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008805if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008806 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008807else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008808 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008811
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008812/* Override any GCC internal prototype to avoid an error.
8813 Use char because int might match the return type of a GCC
8814 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008815#ifdef __cplusplus
8816extern "C"
8817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008818char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008819int
8820main ()
8821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008823 ;
8824 return 0;
8825}
8826_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008827for ac_lib in '' pthread rt posix4; do
8828 if test -z "$ac_lib"; then
8829 ac_res="none required"
8830 else
8831 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008832 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008837rm -f core conftest.err conftest.$ac_objext \
8838 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008839 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008840 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842done
Victor Stinnere0be4232011-10-25 13:06:09 +02008843if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845else
8846 ac_cv_search_sem_init=no
8847fi
8848rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008849LIBS=$ac_func_search_save_LIBS
8850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8852$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008854if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008855 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008856
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008857fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008858 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008859 # posix4 on Solaris 2.6
8860 # pthread (first!) on Linux
8861fi
8862
Martin v. Löwis19d17342003-06-14 21:03:05 +00008863# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8865$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008866if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008867 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008868else
8869 ac_check_lib_save_LIBS=$LIBS
8870LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008872/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008874/* Override any GCC internal prototype to avoid an error.
8875 Use char because int might match the return type of a GCC
8876 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008877#ifdef __cplusplus
8878extern "C"
8879#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008880char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008881int
8882main ()
8883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008885 ;
8886 return 0;
8887}
8888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008890 ac_cv_lib_intl_textdomain=yes
8891else
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008894rm -f core conftest.err conftest.$ac_objext \
8895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008896LIBS=$ac_check_lib_save_LIBS
8897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8899$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008900if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008901
Matthias Kloseb9621712010-04-24 17:59:49 +00008902$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008903
Brett Cannonc6d936e2009-06-07 20:09:53 +00008904 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008905fi
8906
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008907
8908# checks for system dependent C++ extensions support
8909case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8911$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008913/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008914
Georg Brandl59e87bd2011-02-15 19:48:59 +00008915 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008916int
8917main ()
8918{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008919loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 ;
8921 return 0;
8922}
Matthias Kloseb159a552010-04-25 21:00:44 +00008923
Martin v. Löwis11437992002-04-12 09:54:03 +00008924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008925if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008926
Matthias Kloseb159a552010-04-25 21:00:44 +00008927
Matthias Kloseb9621712010-04-24 17:59:49 +00008928$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008929
Matthias Kloseb159a552010-04-25 21:00:44 +00008930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008931$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008932
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008933else
Matthias Kloseb159a552010-04-25 21:00:44 +00008934
8935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008936$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008937
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008939rm -f core conftest.err conftest.$ac_objext \
8940 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008941 *) ;;
8942esac
8943
Guido van Rossum70c7f481998-03-26 18:44:10 +00008944# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8946$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008947if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008948 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008949else
Martin v. Löwis11437992002-04-12 09:54:03 +00008950 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008951LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955/* Override any GCC internal prototype to avoid an error.
8956 Use char because int might match the return type of a GCC
8957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008958#ifdef __cplusplus
8959extern "C"
8960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008961char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008962int
8963main ()
8964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008966 ;
8967 return 0;
8968}
8969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008970if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008972else
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008975rm -f core conftest.err conftest.$ac_objext \
8976 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008977LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8980$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008981if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008982 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008983fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008984 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8986$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008987if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008988 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008989else
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008991LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008995/* Override any GCC internal prototype to avoid an error.
8996 Use char because int might match the return type of a GCC
8997 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008998#ifdef __cplusplus
8999extern "C"
9000#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009001char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009002int
9003main ()
9004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009005return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009006 ;
9007 return 0;
9008}
9009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009010if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009012else
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009015rm -f core conftest.err conftest.$ac_objext \
9016 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009017LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9020$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009021if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009022 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009023fi
9024 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009025
Matthias Kloseb9621712010-04-24 17:59:49 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9027$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009029# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009030if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009031 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9033$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009034LIBS="$withval $LIBS"
9035
9036else
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9038$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009039fi
9040
Guido van Rossum7f43da71994-08-01 12:15:30 +00009041
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009042if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009043 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9044set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9046$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009047if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009048 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009049else
9050 case $PKG_CONFIG in
9051 [\\/]* | ?:[\\/]*)
9052 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9053 ;;
9054 *)
9055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9056for as_dir in $PATH
9057do
9058 IFS=$as_save_IFS
9059 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009060 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009062 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009064 break 2
9065 fi
9066done
Matthias Kloseb9621712010-04-24 17:59:49 +00009067 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009068IFS=$as_save_IFS
9069
9070 ;;
9071esac
9072fi
9073PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9074if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9076$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009077else
Matthias Kloseb9621712010-04-24 17:59:49 +00009078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9079$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009080fi
9081
9082
9083fi
9084if test -z "$ac_cv_path_PKG_CONFIG"; then
9085 ac_pt_PKG_CONFIG=$PKG_CONFIG
9086 # Extract the first word of "pkg-config", so it can be a program name with args.
9087set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9089$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009090if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009092else
9093 case $ac_pt_PKG_CONFIG in
9094 [\\/]* | ?:[\\/]*)
9095 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9096 ;;
9097 *)
9098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9099for as_dir in $PATH
9100do
9101 IFS=$as_save_IFS
9102 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009103 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009105 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009107 break 2
9108 fi
9109done
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009111IFS=$as_save_IFS
9112
9113 ;;
9114esac
9115fi
9116ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9117if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9119$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009120else
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9122$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009123fi
9124
9125 if test "x$ac_pt_PKG_CONFIG" = x; then
9126 PKG_CONFIG=""
9127 else
9128 case $cross_compiling:$ac_tool_warned in
9129yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009130{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9131$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009132ac_tool_warned=yes ;;
9133esac
9134 PKG_CONFIG=$ac_pt_PKG_CONFIG
9135 fi
9136else
9137 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9138fi
9139
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009140
9141# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9143$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009144
9145# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009146if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009147 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009148else
9149 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009150fi
9151
9152
Matthias Kloseb9621712010-04-24 17:59:49 +00009153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9154$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009155
9156# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9158$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009159
9160# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009161if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009162 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009163else
9164 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009165fi
9166
9167
9168if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009169 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9170else
9171 LIBFFI_INCLUDEDIR=""
9172fi
9173
9174
Matthias Kloseb9621712010-04-24 17:59:49 +00009175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9176$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009177
Stefan Krah60187b52012-03-23 19:06:27 +01009178# Check for use of the system libmpdec library
9179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9180$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9181
9182# Check whether --with-system_libmpdec was given.
9183if test "${with_system_libmpdec+set}" = set; then :
9184 withval=$with_system_libmpdec;
9185else
9186 with_system_libmpdec="no"
9187fi
9188
9189
9190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9191$as_echo "$with_system_libmpdec" >&6; }
9192
Benjamin Peterson076ed002010-10-31 17:11:02 +00009193# Check for support for loadable sqlite extensions
9194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9195$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9196# Check whether --enable-loadable-sqlite-extensions was given.
9197if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9198 enableval=$enable_loadable_sqlite_extensions;
9199else
9200 enable_loadable_sqlite_extensions="no"
9201fi
9202
9203
9204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9205$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9206
Matthias Klose55708cc2009-04-30 08:06:49 +00009207# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9209$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009210
9211# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009212if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009213 withval=$with_dbmliborder;
9214if test x$with_dbmliborder = xyes
9215then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009216as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009217else
9218 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9219 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9220 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009221 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009222 fi
9223 done
9224fi
9225fi
9226
Matthias Kloseb9621712010-04-24 17:59:49 +00009227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9228$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009229
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009230# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009231
9232
Matthias Kloseb9621712010-04-24 17:59:49 +00009233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9234$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009235
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009236# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009237if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009238 withval=$with_signal_module;
9239fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009240
9241
9242if test -z "$with_signal_module"
9243then with_signal_module="yes"
9244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9246$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009247
9248if test "${with_signal_module}" = "yes"; then
9249 USE_SIGNAL_MODULE=""
9250 SIGNAL_OBJS=""
9251else
9252 USE_SIGNAL_MODULE="#"
9253 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9254fi
9255
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009256# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009257
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009258USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009259
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009260
Martin v. Löwis11437992002-04-12 09:54:03 +00009261
9262# Templates for things AC_DEFINEd more than once.
9263# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009264
9265
Martin v. Löwis11437992002-04-12 09:54:03 +00009266
Matthias Kloseb9621712010-04-24 17:59:49 +00009267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9268$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009271if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009272 withval=$with_threads;
9273fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009274
9275
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009276# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009278# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009279if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009280 withval=$with_thread; with_threads=$with_thread
9281fi
9282
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009283
9284if test -z "$with_threads"
9285then with_threads="yes"
9286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9288$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009289
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009290
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009291if test "$with_threads" = "no"
9292then
9293 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009294elif test "$ac_cv_pthread_is_default" = yes
9295then
Matthias Kloseb9621712010-04-24 17:59:49 +00009296 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009297
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009298 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009299 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009300
9301 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009302 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009303elif test "$ac_cv_kpthread" = "yes"
9304then
9305 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009306 if test "$ac_cv_cxx_thread" = "yes"; then
9307 CXX="$CXX -Kpthread"
9308 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009309 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009310
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009311 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009312 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009313elif test "$ac_cv_kthread" = "yes"
9314then
9315 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009316 if test "$ac_cv_cxx_thread" = "yes"; then
9317 CXX="$CXX -Kthread"
9318 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009319 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009320
9321 posix_threads=yes
9322 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009323elif test "$ac_cv_pthread" = "yes"
9324then
9325 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009326 if test "$ac_cv_cxx_thread" = "yes"; then
9327 CXX="$CXX -pthread"
9328 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009329 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009330
9331 posix_threads=yes
9332 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009333else
9334 if test ! -z "$with_threads" -a -d "$with_threads"
9335 then LDFLAGS="$LDFLAGS -L$with_threads"
9336 fi
9337 if test ! -z "$withval" -a -d "$withval"
9338 then LDFLAGS="$LDFLAGS -L$withval"
9339 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009340
9341 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009342 # define _POSIX_THREADS in unistd.h. Some apparently don't
9343 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9345$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009347/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009348
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009349#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009350#ifdef _POSIX_THREADS
9351yes
9352#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009353
9354_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009355if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009356 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009357 unistd_defines_pthreads=yes
9358else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009359 unistd_defines_pthreads=no
9360fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009361rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009362
Matthias Kloseb9621712010-04-24 17:59:49 +00009363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9364$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009365
Matthias Kloseb9621712010-04-24 17:59:49 +00009366 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009367
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009368 # Just looking for pthread_create in libpthread is not enough:
9369 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9370 # So we really have to include pthread.h, and then link.
9371 _libs=$LIBS
9372 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9374$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009376/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009377
9378#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009379#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009380
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009381void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009382int
9383main ()
9384{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009385
9386pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 ;
9388 return 0;
9389}
9390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009391if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009392
Matthias Kloseb9621712010-04-24 17:59:49 +00009393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9394$as_echo "yes" >&6; }
9395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009396
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009397 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009398 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009399else
Martin v. Löwis11437992002-04-12 09:54:03 +00009400
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009401 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009403if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009404 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009405
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009406 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009407 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009408else
Guido van Rossumad678af1998-10-02 14:42:15 +00009409
Matthias Kloseb9621712010-04-24 17:59:49 +00009410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9411$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009412if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009413 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009414else
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009416LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420/* Override any GCC internal prototype to avoid an error.
9421 Use char because int might match the return type of a GCC
9422 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009423#ifdef __cplusplus
9424extern "C"
9425#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009426char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009427int
9428main ()
9429{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009430return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 ;
9432 return 0;
9433}
9434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009435if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009436 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009437else
Matthias Kloseb9621712010-04-24 17:59:49 +00009438 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009440rm -f core conftest.err conftest.$ac_objext \
9441 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009442LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9445$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009446if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009447 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009448
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009449 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009450 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009451 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009452else
Greg Steinadf63d62000-07-05 10:38:09 +00009453
Matthias Kloseb9621712010-04-24 17:59:49 +00009454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9455$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009456if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009457 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009458else
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009460LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464/* Override any GCC internal prototype to avoid an error.
9465 Use char because int might match the return type of a GCC
9466 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009467#ifdef __cplusplus
9468extern "C"
9469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009470char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009471int
9472main ()
9473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009474return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009475 ;
9476 return 0;
9477}
9478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009479if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009481else
Matthias Kloseb9621712010-04-24 17:59:49 +00009482 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009484rm -f core conftest.err conftest.$ac_objext \
9485 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009486LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9489$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009490if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009492
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009493 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009494 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009495 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009496else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009497
Matthias Kloseb9621712010-04-24 17:59:49 +00009498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9499$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009500if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009501 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009502else
Martin v. Löwis11437992002-04-12 09:54:03 +00009503 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009504LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009506/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009508/* Override any GCC internal prototype to avoid an error.
9509 Use char because int might match the return type of a GCC
9510 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009511#ifdef __cplusplus
9512extern "C"
9513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009514char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009515int
9516main ()
9517{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ;
9520 return 0;
9521}
9522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009523if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009525else
Matthias Kloseb9621712010-04-24 17:59:49 +00009526 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009528rm -f core conftest.err conftest.$ac_objext \
9529 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009530LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9533$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009534if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009536
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009537 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009538 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009539 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009540else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009541
Matthias Kloseb9621712010-04-24 17:59:49 +00009542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9543$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009544if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009545 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009546else
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009548LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009551
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009552/* Override any GCC internal prototype to avoid an error.
9553 Use char because int might match the return type of a GCC
9554 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009555#ifdef __cplusplus
9556extern "C"
9557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009558char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009559int
9560main ()
9561{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009562return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009563 ;
9564 return 0;
9565}
9566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009567if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009569else
Matthias Kloseb9621712010-04-24 17:59:49 +00009570 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009572rm -f core conftest.err conftest.$ac_objext \
9573 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009574LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9577$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009578if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009579 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009580
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009581 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009582 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009583 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009584else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009585
Martin v. Löwis130fb172001-07-19 11:00:41 +00009586 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009587fi
9588
Guido van Rossum627b2d71993-12-24 10:39:16 +00009589
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009590fi
9591
Guido van Rossum0be3e491997-05-22 20:33:33 +00009592fi
9593
Guido van Rossum49545951997-12-02 19:28:29 +00009594fi
9595
Guido van Rossumb93a8621998-05-07 13:27:32 +00009596fi
9597
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009599rm -f core conftest.err conftest.$ac_objext \
9600 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009601
Matthias Kloseb9621712010-04-24 17:59:49 +00009602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9603$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009604if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009605 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009606else
Martin v. Löwis11437992002-04-12 09:54:03 +00009607 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009608LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009610/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009612/* Override any GCC internal prototype to avoid an error.
9613 Use char because int might match the return type of a GCC
9614 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009615#ifdef __cplusplus
9616extern "C"
9617#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009618char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009619int
9620main ()
9621{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009622return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009623 ;
9624 return 0;
9625}
9626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009627if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009629else
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009632rm -f core conftest.err conftest.$ac_objext \
9633 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009634LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9637$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009638if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009639 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009640
Martin v. Löwis130fb172001-07-19 11:00:41 +00009641 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009642 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009643 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009644fi
9645
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009646
Neal Norwitza978ab02002-11-02 16:58:05 +00009647 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9649$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009650if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009651 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009652else
Martin v. Löwis11437992002-04-12 09:54:03 +00009653 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009654LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658/* Override any GCC internal prototype to avoid an error.
9659 Use char because int might match the return type of a GCC
9660 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009661#ifdef __cplusplus
9662extern "C"
9663#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009664char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009665int
9666main ()
9667{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009668return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009669 ;
9670 return 0;
9671}
9672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009673if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009675else
Matthias Kloseb9621712010-04-24 17:59:49 +00009676 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009678rm -f core conftest.err conftest.$ac_objext \
9679 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009680LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9683$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009684if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009685 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009686
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009687 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009688 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009689 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009690fi
9691
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009692 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009693fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009694
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009695if test "$posix_threads" = "yes"; then
9696 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009697
Matthias Kloseb9621712010-04-24 17:59:49 +00009698$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009699
9700 fi
9701
9702 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9703 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009704 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009705$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009706
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009707 ;;
9708 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009709$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009710
9711 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009712 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009713$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009714
9715 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009716 esac
9717
Matthias Kloseb9621712010-04-24 17:59:49 +00009718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9719$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009720 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009722else
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009724 ac_cv_pthread_system_supported=no
9725else
Matthias Kloseb9621712010-04-24 17:59:49 +00009726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009727/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009728
9729 #include <stdio.h>
9730 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009731 void *foo(void *parm) {
9732 return NULL;
9733 }
9734 main() {
9735 pthread_attr_t attr;
9736 pthread_t id;
9737 if (pthread_attr_init(&attr)) exit(-1);
9738 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9739 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9740 exit(0);
9741 }
9742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009743if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009744 ac_cv_pthread_system_supported=yes
9745else
Matthias Kloseb9621712010-04-24 17:59:49 +00009746 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009750fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752
Guido van Rossum627b2d71993-12-24 10:39:16 +00009753fi
9754
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9756$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009757 if test "$ac_cv_pthread_system_supported" = "yes"; then
9758
Matthias Kloseb9621712010-04-24 17:59:49 +00009759$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009760
9761 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009762 for ac_func in pthread_sigmask
9763do :
9764 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009765if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009766 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009767#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009768_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009769 case $ac_sys_system in
9770 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009771
Matthias Kloseb9621712010-04-24 17:59:49 +00009772$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009773
9774 ;;
9775 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009776fi
9777done
9778
9779fi
9780
9781
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009782# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009783
Matthias Kloseb9621712010-04-24 17:59:49 +00009784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9785$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009787if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009788 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009789 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9791$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009792 ipv6=no
9793 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009794 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9795$as_echo "yes" >&6; }
9796 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009797
9798 ipv6=yes
9799 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009801else
Martin v. Löwis11437992002-04-12 09:54:03 +00009802
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>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009808int
9809main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009810{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009811int domain = AF_INET6;
9812 ;
9813 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009814}
Martin v. Löwis11437992002-04-12 09:54:03 +00009815_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009816if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009817
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9819$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009820 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009821
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009822else
Matthias Kloseb159a552010-04-25 21:00:44 +00009823
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9825$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009826 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009827
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009828fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009830
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009831if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9833$as_echo_n "checking if RFC2553 API is available... " >&6; }
9834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009835/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009836
9837 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009838#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009839int
9840main ()
9841{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009842struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009843 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ;
9845 return 0;
9846}
Matthias Kloseb159a552010-04-25 21:00:44 +00009847
Martin v. Löwis11437992002-04-12 09:54:03 +00009848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009849if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009850
9851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009852$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009853 ipv6=yes
9854
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009855else
Matthias Kloseb159a552010-04-25 21:00:44 +00009856
9857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009858$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009859 ipv6=no
9860
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009863fi
9864
9865if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009866 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009867
9868fi
9869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009870fi
9871
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009872
9873ipv6type=unknown
9874ipv6lib=none
9875ipv6trylibc=no
9876
9877if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9879$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009880 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9881 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009882 case $i in
9883 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009885/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009886
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009887#include <netinet/in.h>
9888#ifdef IPV6_INRIA_VERSION
9889yes
9890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009891_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009892if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009893 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009894 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009895fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009896rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009897
9898 ;;
9899 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009901/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009902
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009903#include <netinet/in.h>
9904#ifdef __KAME__
9905yes
9906#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009907_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009908if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009909 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009910 ipv6type=$i;
9911 ipv6lib=inet6
9912 ipv6libdir=/usr/local/v6/lib
9913 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009914fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009915rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009916
9917 ;;
9918 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009920/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009921
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009922#include <features.h>
9923#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9924yes
9925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009926_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009929 ipv6type=$i;
9930 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009931fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009932rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009933
9934 ;;
9935 linux-inet6)
9936 if test -d /usr/inet6; then
9937 ipv6type=$i
9938 ipv6lib=inet6
9939 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009940 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009941 fi
9942 ;;
9943 solaris)
9944 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009945 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009946 ipv6type=$i
9947 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009948 fi
9949 fi
9950 ;;
9951 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009953/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009954
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009955#include <sys/param.h>
9956#ifdef _TOSHIBA_INET6
9957yes
9958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009959_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009961 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009962 ipv6type=$i;
9963 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009964 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009965fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009966rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009967
9968 ;;
9969 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009971/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009972
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009973#include </usr/local/v6/include/sys/v6config.h>
9974#ifdef __V6D__
9975yes
9976#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009977_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009980 ipv6type=$i;
9981 ipv6lib=v6;
9982 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009983 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009984fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009985rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009986
9987 ;;
9988 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009990/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009991
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009992#include <sys/param.h>
9993#ifdef _ZETA_MINAMI_INET6
9994yes
9995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009996_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009999 ipv6type=$i;
10000 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010001 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010002fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010003rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010004
10005 ;;
10006 esac
10007 if test "$ipv6type" != "unknown"; then
10008 break
10009 fi
10010 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10012$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010013fi
10014
10015if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10016 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10017 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10018 echo "using lib$ipv6lib"
10019 else
10020 if test $ipv6trylibc = "yes"; then
10021 echo "using libc"
10022 else
10023 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10024 echo "You need to fetch lib$ipv6lib.a from appropriate"
10025 echo 'ipv6 kit and compile beforehand.'
10026 exit 1
10027 fi
10028 fi
10029fi
10030
Matthias Kloseb9621712010-04-24 17:59:49 +000010031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10032$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010034/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010035
10036 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010037int
10038main ()
10039{
10040FSIORefNum fRef = 0
10041 ;
10042 return 0;
10043}
Matthias Kloseb159a552010-04-25 21:00:44 +000010044
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010046if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010047
Matthias Kloseb159a552010-04-25 21:00:44 +000010048
Matthias Kloseb9621712010-04-24 17:59:49 +000010049$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010050
Matthias Kloseb9621712010-04-24 17:59:49 +000010051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10052$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010053
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010054else
Matthias Kloseb159a552010-04-25 21:00:44 +000010055
Matthias Kloseb9621712010-04-24 17:59:49 +000010056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10057$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010058
10059fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10061
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010062# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10064$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010067if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068 withval=$with_doc_strings;
10069fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010070
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010071
10072if test -z "$with_doc_strings"
10073then with_doc_strings="yes"
10074fi
10075if test "$with_doc_strings" != "no"
10076then
10077
Matthias Kloseb9621712010-04-24 17:59:49 +000010078$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010079
10080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10082$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010083
Antoine Pitrou042b1282010-08-13 21:15:58 +000010084# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10086$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010087
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010088# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010089if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010090 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010091if test "$withval" != no
10092then
10093
Matthias Kloseb9621712010-04-24 17:59:49 +000010094$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010095
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10097$as_echo "yes" >&6; }
10098else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10099$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010100fi
10101else
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10103$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010104fi
10105
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010106
10107# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10109$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010111# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010112if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010113 withval=$with_pymalloc;
10114fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010115
Neil Schemenauera35c6882001-02-27 04:45:05 +000010116
Neil Schemenauer16c22972002-03-22 15:34:49 +000010117if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010118then
10119 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010120fi
10121if test "$with_pymalloc" != "no"
10122then
Martin v. Löwis11437992002-04-12 09:54:03 +000010123
Matthias Kloseb9621712010-04-24 17:59:49 +000010124$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010125
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010126 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10129$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010130
Benjamin Peterson05159c42009-12-03 03:01:27 +000010131# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10133$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010134
10135# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010136if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010137 withval=$with_valgrind;
10138else
10139 with_valgrind=no
10140fi
10141
Matthias Kloseb9621712010-04-24 17:59:49 +000010142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10143$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010144if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010145 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 +020010146if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010147
Matthias Kloseb9621712010-04-24 17:59:49 +000010148$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010149
10150else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010151 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010152
10153fi
10154
10155
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010156 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010157fi
10158
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010159# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010160
Guido van Rossum98935bf2001-09-05 19:13:16 +000010161DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010162
Guido van Rossume97ee181999-12-20 21:27:22 +000010163# the dlopen() function means we might want to use dynload_shlib.o. some
10164# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010165for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010166do :
10167 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010168if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010169 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010170#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010171_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010172
Guido van Rossume97ee181999-12-20 21:27:22 +000010173fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010174done
Guido van Rossume97ee181999-12-20 21:27:22 +000010175
Michael W. Hudson54241132001-12-07 15:38:26 +000010176
Guido van Rossume97ee181999-12-20 21:27:22 +000010177# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10178# loading of modules.
10179
Matthias Kloseb9621712010-04-24 17:59:49 +000010180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10181$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010182if test -z "$DYNLOADFILE"
10183then
10184 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010185 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10186 if test "$ac_cv_func_dlopen" = yes
10187 then DYNLOADFILE="dynload_shlib.o"
10188 else DYNLOADFILE="dynload_aix.o"
10189 fi
10190 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010191 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010192 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10193 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010194 *)
10195 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10196 # out any dynamic loading
10197 if test "$ac_cv_func_dlopen" = yes
10198 then DYNLOADFILE="dynload_shlib.o"
10199 else DYNLOADFILE="dynload_stub.o"
10200 fi
10201 ;;
10202 esac
10203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10205$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010206if test "$DYNLOADFILE" != "dynload_stub.o"
10207then
Martin v. Löwis11437992002-04-12 09:54:03 +000010208
Matthias Kloseb9621712010-04-24 17:59:49 +000010209$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010210
10211fi
10212
Neil Schemenauer4e425612001-06-19 15:44:15 +000010213# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10214
Michael W. Hudson54241132001-12-07 15:38:26 +000010215
Matthias Kloseb9621712010-04-24 17:59:49 +000010216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10217$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010218if test -z "$MACHDEP_OBJS"
10219then
Jack Jansene578a632001-08-15 01:27:14 +000010220 MACHDEP_OBJS=$extra_machdep_objs
10221else
10222 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010223fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010224if test -z "$MACHDEP_OBJS"; then
10225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10226$as_echo "none" >&6; }
10227else
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10229$as_echo "$MACHDEP_OBJS" >&6; }
10230fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010231
Guido van Rossum627b2d71993-12-24 10:39:16 +000010232# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010233for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010234 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010235 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010236 futimens futimes gai_strerror \
10237 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010238 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010239 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010240 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10241 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010242 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010243 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010244 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010245 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010246 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010247 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010248 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10249 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010250 sigaction sigaltstack siginterrupt sigpending sigrelse \
10251 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010252 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010253 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10254 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010255do :
10256 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10257ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010258if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010260#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010261_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010262
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010263fi
10264done
10265
Michael W. Hudson54241132001-12-07 15:38:26 +000010266
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010267ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10268 #include <dirent.h>
10269"
10270if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10271
10272$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10273
10274fi
10275
10276
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010277# For some functions, having a definition is not sufficient, since
10278# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10280$as_echo_n "checking for chroot... " >&6; }
10281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010282/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010283#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010284int
10285main ()
10286{
10287void *x=chroot
10288 ;
10289 return 0;
10290}
10291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010292if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010293
Matthias Kloseb9621712010-04-24 17:59:49 +000010294$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010295
Matthias Kloseb159a552010-04-25 21:00:44 +000010296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010297$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010298else
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10300$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010301
10302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10305$as_echo_n "checking for link... " >&6; }
10306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010307/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010308#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010309int
10310main ()
10311{
10312void *x=link
10313 ;
10314 return 0;
10315}
10316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010317if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010318
Matthias Kloseb9621712010-04-24 17:59:49 +000010319$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010320
Matthias Kloseb159a552010-04-25 21:00:44 +000010321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010322$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010323else
Matthias Kloseb9621712010-04-24 17:59:49 +000010324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10325$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010326
10327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10330$as_echo_n "checking for symlink... " >&6; }
10331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010332/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010333#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010334int
10335main ()
10336{
10337void *x=symlink
10338 ;
10339 return 0;
10340}
10341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010342if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010343
Matthias Kloseb9621712010-04-24 17:59:49 +000010344$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010345
Matthias Kloseb159a552010-04-25 21:00:44 +000010346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010347$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010348else
Matthias Kloseb9621712010-04-24 17:59:49 +000010349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10350$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010351
10352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10355$as_echo_n "checking for fchdir... " >&6; }
10356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010357/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010358#include <unistd.h>
10359int
10360main ()
10361{
10362void *x=fchdir
10363 ;
10364 return 0;
10365}
10366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010368
Matthias Kloseb9621712010-04-24 17:59:49 +000010369$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010370
Matthias Kloseb159a552010-04-25 21:00:44 +000010371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010372$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010373else
Matthias Kloseb9621712010-04-24 17:59:49 +000010374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10375$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010376
10377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10380$as_echo_n "checking for fsync... " >&6; }
10381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010382/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010383#include <unistd.h>
10384int
10385main ()
10386{
10387void *x=fsync
10388 ;
10389 return 0;
10390}
10391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010392if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010393
Matthias Kloseb9621712010-04-24 17:59:49 +000010394$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010395
Matthias Kloseb159a552010-04-25 21:00:44 +000010396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010397$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010398else
Matthias Kloseb9621712010-04-24 17:59:49 +000010399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10400$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010401
10402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10405$as_echo_n "checking for fdatasync... " >&6; }
10406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010407/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010408#include <unistd.h>
10409int
10410main ()
10411{
10412void *x=fdatasync
10413 ;
10414 return 0;
10415}
10416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010417if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010418
Matthias Kloseb9621712010-04-24 17:59:49 +000010419$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010420
Matthias Kloseb159a552010-04-25 21:00:44 +000010421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010422$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010423else
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10425$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010426
10427fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10430$as_echo_n "checking for epoll... " >&6; }
10431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010432/* end confdefs.h. */
10433#include <sys/epoll.h>
10434int
10435main ()
10436{
10437void *x=epoll_create
10438 ;
10439 return 0;
10440}
10441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010443
Matthias Kloseb9621712010-04-24 17:59:49 +000010444$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010445
Matthias Kloseb159a552010-04-25 21:00:44 +000010446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010447$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010448else
Matthias Kloseb9621712010-04-24 17:59:49 +000010449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10450$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010451
10452fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10455$as_echo_n "checking for epoll_create1... " >&6; }
10456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10457/* end confdefs.h. */
10458#include <sys/epoll.h>
10459int
10460main ()
10461{
10462void *x=epoll_create1
10463 ;
10464 return 0;
10465}
10466_ACEOF
10467if ac_fn_c_try_compile "$LINENO"; then :
10468
10469$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10470
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10472$as_echo "yes" >&6; }
10473else
10474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10475$as_echo "no" >&6; }
10476
10477fi
10478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10480$as_echo_n "checking for kqueue... " >&6; }
10481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010482/* end confdefs.h. */
10483
10484#include <sys/types.h>
10485#include <sys/event.h>
10486
10487int
10488main ()
10489{
10490int x=kqueue()
10491 ;
10492 return 0;
10493}
10494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010495if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010496
Matthias Kloseb9621712010-04-24 17:59:49 +000010497$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010498
Matthias Kloseb159a552010-04-25 21:00:44 +000010499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010500$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010501else
Matthias Kloseb9621712010-04-24 17:59:49 +000010502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10503$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010504
10505fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010507# On some systems (eg. FreeBSD 5), we would find a definition of the
10508# functions ctermid_r, setgroups in the library, but no prototype
10509# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10510# address to avoid compiler warnings and potential miscompilations
10511# because of the missing prototypes.
10512
Matthias Kloseb9621712010-04-24 17:59:49 +000010513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10514$as_echo_n "checking for ctermid_r... " >&6; }
10515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010516/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010517
Martin v. Löwisd5843682002-11-21 20:41:28 +000010518#include <stdio.h>
10519
Martin v. Löwisd5843682002-11-21 20:41:28 +000010520int
10521main ()
10522{
10523void* p = ctermid_r
10524 ;
10525 return 0;
10526}
10527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010528if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010529
Matthias Kloseb9621712010-04-24 17:59:49 +000010530$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010531
Matthias Kloseb159a552010-04-25 21:00:44 +000010532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010533$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010534else
Matthias Kloseb9621712010-04-24 17:59:49 +000010535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10536$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010537
10538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10540
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10542$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010543if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010544 $as_echo_n "(cached) " >&6
10545else
10546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010547/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010548#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010549int
10550main ()
10551{
10552void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010553
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010554 ;
10555 return 0;
10556}
10557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010558if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010559 ac_cv_flock_decl=yes
10560else
10561 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010562
10563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010565
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010566fi
10567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10568$as_echo "$ac_cv_flock_decl" >&6; }
10569if test "x${ac_cv_flock_decl}" = xyes; then
10570 for ac_func in flock
10571do :
10572 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010573if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010574 cat >>confdefs.h <<_ACEOF
10575#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010576_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010577
Antoine Pitroua3000072010-09-07 14:52:42 +000010578else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010580$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010581if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010582 $as_echo_n "(cached) " >&6
10583else
10584 ac_check_lib_save_LIBS=$LIBS
10585LIBS="-lbsd $LIBS"
10586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10587/* end confdefs.h. */
10588
10589/* Override any GCC internal prototype to avoid an error.
10590 Use char because int might match the return type of a GCC
10591 builtin and then its argument prototype would still apply. */
10592#ifdef __cplusplus
10593extern "C"
10594#endif
10595char flock ();
10596int
10597main ()
10598{
10599return flock ();
10600 ;
10601 return 0;
10602}
10603_ACEOF
10604if ac_fn_c_try_link "$LINENO"; then :
10605 ac_cv_lib_bsd_flock=yes
10606else
10607 ac_cv_lib_bsd_flock=no
10608fi
10609rm -f core conftest.err conftest.$ac_objext \
10610 conftest$ac_exeext conftest.$ac_ext
10611LIBS=$ac_check_lib_save_LIBS
10612fi
10613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10614$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010615if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010616 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010617
10618
10619$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10620
10621
10622fi
10623
10624
10625fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010626done
10627
Antoine Pitroua3000072010-09-07 14:52:42 +000010628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629
Matthias Kloseb9621712010-04-24 17:59:49 +000010630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10631$as_echo_n "checking for getpagesize... " >&6; }
10632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010633/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010634
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010635#include <unistd.h>
10636
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010637int
10638main ()
10639{
10640void* p = getpagesize
10641 ;
10642 return 0;
10643}
10644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010645if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010646
Matthias Kloseb9621712010-04-24 17:59:49 +000010647$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010648
Matthias Kloseb159a552010-04-25 21:00:44 +000010649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010650$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010651else
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10653$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010654
10655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010657
Victor Stinner984890f2011-11-24 13:53:38 +010010658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10659$as_echo_n "checking for broken unsetenv... " >&6; }
10660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10661/* end confdefs.h. */
10662
10663#include <stdlib.h>
10664
10665int
10666main ()
10667{
10668int res = unsetenv("DUMMY")
10669 ;
10670 return 0;
10671}
10672_ACEOF
10673if ac_fn_c_try_compile "$LINENO"; then :
10674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10675$as_echo "no" >&6; }
10676else
10677
10678$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10679
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10681$as_echo "yes" >&6; }
10682
10683fi
10684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10685
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010686for ac_prog in true
10687do
10688 # Extract the first word of "$ac_prog", so it can be a program name with args.
10689set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10691$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010692if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010694else
10695 if test -n "$TRUE"; then
10696 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10697else
10698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10699for as_dir in $PATH
10700do
10701 IFS=$as_save_IFS
10702 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010705 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 $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 +000010707 break 2
10708 fi
10709done
Matthias Kloseb9621712010-04-24 17:59:49 +000010710 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010711IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010712
10713fi
10714fi
10715TRUE=$ac_cv_prog_TRUE
10716if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10718$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010719else
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10721$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010722fi
10723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010724
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010725 test -n "$TRUE" && break
10726done
10727test -n "$TRUE" || TRUE="/bin/true"
10728
10729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10731$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010732if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010734else
10735 ac_check_lib_save_LIBS=$LIBS
10736LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010738/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740/* Override any GCC internal prototype to avoid an error.
10741 Use char because int might match the return type of a GCC
10742 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010743#ifdef __cplusplus
10744extern "C"
10745#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010746char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010747int
10748main ()
10749{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010750return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010751 ;
10752 return 0;
10753}
10754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010755if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010756 ac_cv_lib_c_inet_aton=yes
10757else
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010760rm -f core conftest.err conftest.$ac_objext \
10761 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010762LIBS=$ac_check_lib_save_LIBS
10763fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10765$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010766if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010767 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010768else
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10770$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010771if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010773else
10774 ac_check_lib_save_LIBS=$LIBS
10775LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010777/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010779/* Override any GCC internal prototype to avoid an error.
10780 Use char because int might match the return type of a GCC
10781 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010782#ifdef __cplusplus
10783extern "C"
10784#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010785char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010786int
10787main ()
10788{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010789return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010790 ;
10791 return 0;
10792}
10793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010794if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010795 ac_cv_lib_resolv_inet_aton=yes
10796else
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010799rm -f core conftest.err conftest.$ac_objext \
10800 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010801LIBS=$ac_check_lib_save_LIBS
10802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10804$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010805if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010806 cat >>confdefs.h <<_ACEOF
10807#define HAVE_LIBRESOLV 1
10808_ACEOF
10809
10810 LIBS="-lresolv $LIBS"
10811
10812fi
10813
10814
10815fi
10816
10817
Christian Heimesd0764e22007-12-04 15:00:33 +000010818# On Tru64, chflags seems to be present, but calling it will
10819# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10821$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010822if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010824else
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010826 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010827else
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010829/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010830
Christian Heimesd0764e22007-12-04 15:00:33 +000010831#include <sys/stat.h>
10832#include <unistd.h>
10833int main(int argc, char*argv[])
10834{
10835 if(chflags(argv[0], 0) != 0)
10836 return 1;
10837 return 0;
10838}
Ned Deily3eb67d52011-06-28 00:00:28 -070010839
Christian Heimesd0764e22007-12-04 15:00:33 +000010840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010841if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010842 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010843else
Matthias Kloseb9621712010-04-24 17:59:49 +000010844 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010848fi
10849
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010850
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10853$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010854if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010856if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010857 ac_cv_have_chflags="yes"
10858else
10859 ac_cv_have_chflags="no"
10860fi
10861
10862fi
10863if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010864
Matthias Kloseb9621712010-04-24 17:59:49 +000010865$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010866
10867fi
10868
Matthias Kloseb9621712010-04-24 17:59:49 +000010869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10870$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010871if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010872 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010873else
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010875 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010876else
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010878/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010879
Christian Heimesd0764e22007-12-04 15:00:33 +000010880#include <sys/stat.h>
10881#include <unistd.h>
10882int main(int argc, char*argv[])
10883{
10884 if(lchflags(argv[0], 0) != 0)
10885 return 1;
10886 return 0;
10887}
Ned Deily3eb67d52011-06-28 00:00:28 -070010888
Christian Heimesd0764e22007-12-04 15:00:33 +000010889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010890if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010891 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010892else
Matthias Kloseb9621712010-04-24 17:59:49 +000010893 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010895rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10896 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010897fi
10898
10899
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10902$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010903if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010904 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010905if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010906 ac_cv_have_lchflags="yes"
10907else
10908 ac_cv_have_lchflags="no"
10909fi
10910
10911fi
10912if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010913
Matthias Kloseb9621712010-04-24 17:59:49 +000010914$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010915
10916fi
10917
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010918case $ac_sys_system/$ac_sys_release in
10919Darwin/*)
10920 _CUR_CFLAGS="${CFLAGS}"
10921 _CUR_LDFLAGS="${LDFLAGS}"
10922 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10923 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10924 ;;
10925esac
10926
Matthias Kloseb9621712010-04-24 17:59:49 +000010927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10928$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010929if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010930 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010931else
10932 ac_check_lib_save_LIBS=$LIBS
10933LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010935/* end confdefs.h. */
10936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010937/* Override any GCC internal prototype to avoid an error.
10938 Use char because int might match the return type of a GCC
10939 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010940#ifdef __cplusplus
10941extern "C"
10942#endif
10943char inflateCopy ();
10944int
10945main ()
10946{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010947return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010948 ;
10949 return 0;
10950}
10951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010952if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010953 ac_cv_lib_z_inflateCopy=yes
10954else
Matthias Kloseb9621712010-04-24 17:59:49 +000010955 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010957rm -f core conftest.err conftest.$ac_objext \
10958 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010959LIBS=$ac_check_lib_save_LIBS
10960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10962$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010963if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010966
10967fi
10968
10969
10970case $ac_sys_system/$ac_sys_release in
10971Darwin/*)
10972 CFLAGS="${_CUR_CFLAGS}"
10973 LDFLAGS="${_CUR_LDFLAGS}"
10974 ;;
10975esac
10976
Matthias Kloseb9621712010-04-24 17:59:49 +000010977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10978$as_echo_n "checking for hstrerror... " >&6; }
10979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010980/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010981
Martin v. Löwise9416172003-05-03 10:12:45 +000010982#include <netdb.h>
10983
Martin v. Löwise9416172003-05-03 10:12:45 +000010984int
10985main ()
10986{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010987void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010988 ;
10989 return 0;
10990}
10991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010992if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010993
Matthias Kloseb9621712010-04-24 17:59:49 +000010994$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010995
Matthias Kloseb159a552010-04-25 21:00:44 +000010996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010997$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010998else
Matthias Kloseb9621712010-04-24 17:59:49 +000010999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11000$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011001
11002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011003rm -f core conftest.err conftest.$ac_objext \
11004 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005
Matthias Kloseb9621712010-04-24 17:59:49 +000011006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11007$as_echo_n "checking for inet_aton... " >&6; }
11008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011009/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011010
Martin v. Löwis86d66262006-02-17 08:40:11 +000011011#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011012#include <sys/socket.h>
11013#include <netinet/in.h>
11014#include <arpa/inet.h>
11015
Martin v. Löwise9416172003-05-03 10:12:45 +000011016int
11017main ()
11018{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011019void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011020 ;
11021 return 0;
11022}
11023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011024if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011027
Matthias Kloseb159a552010-04-25 21:00:44 +000011028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011029$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011030else
Matthias Kloseb9621712010-04-24 17:59:49 +000011031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11032$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011033
11034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011035rm -f core conftest.err conftest.$ac_objext \
11036 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037
Matthias Kloseb9621712010-04-24 17:59:49 +000011038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11039$as_echo_n "checking for inet_pton... " >&6; }
11040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011041/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011042
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011043#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011044#include <sys/socket.h>
11045#include <netinet/in.h>
11046#include <arpa/inet.h>
11047
Martin v. Löwise9416172003-05-03 10:12:45 +000011048int
11049main ()
11050{
11051void* p = inet_pton
11052 ;
11053 return 0;
11054}
11055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011056if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011057
Matthias Kloseb9621712010-04-24 17:59:49 +000011058$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011059
Matthias Kloseb159a552010-04-25 21:00:44 +000011060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011061$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011062else
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11064$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011065
11066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011068
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011069# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11071$as_echo_n "checking for setgroups... " >&6; }
11072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011073/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011074
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011075#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011076#ifdef HAVE_GRP_H
11077#include <grp.h>
11078#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011079
Martin v. Löwisd5843682002-11-21 20:41:28 +000011080int
11081main ()
11082{
11083void* p = setgroups
11084 ;
11085 return 0;
11086}
11087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011088if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011089
Matthias Kloseb9621712010-04-24 17:59:49 +000011090$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011091
Matthias Kloseb159a552010-04-25 21:00:44 +000011092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011093$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011094else
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11096$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011097
11098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011100
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011101# check for openpty and forkpty
11102
11103for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011104do :
11105 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011106if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011107 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011108#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011109_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011110
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011111else
Matthias Kloseb9621712010-04-24 17:59:49 +000011112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11113$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011114if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011116else
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011118LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011122/* Override any GCC internal prototype to avoid an error.
11123 Use char because int might match the return type of a GCC
11124 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011125#ifdef __cplusplus
11126extern "C"
11127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011128char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011129int
11130main ()
11131{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011132return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011133 ;
11134 return 0;
11135}
11136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011137if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011138 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011139else
Matthias Kloseb9621712010-04-24 17:59:49 +000011140 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011142rm -f core conftest.err conftest.$ac_objext \
11143 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011144LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11147$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011148if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011149 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011150 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011151else
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11153$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011154if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011155 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011156else
11157 ac_check_lib_save_LIBS=$LIBS
11158LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011160/* end confdefs.h. */
11161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011162/* Override any GCC internal prototype to avoid an error.
11163 Use char because int might match the return type of a GCC
11164 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011165#ifdef __cplusplus
11166extern "C"
11167#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011168char openpty ();
11169int
11170main ()
11171{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011172return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011173 ;
11174 return 0;
11175}
11176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011177if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011178 ac_cv_lib_bsd_openpty=yes
11179else
Matthias Kloseb9621712010-04-24 17:59:49 +000011180 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011182rm -f core conftest.err conftest.$ac_objext \
11183 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011184LIBS=$ac_check_lib_save_LIBS
11185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11187$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011188if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011189 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011190 LIBS="$LIBS -lbsd"
11191fi
11192
11193
11194fi
11195
Fred Drake8cef4cf2000-06-28 16:40:38 +000011196
11197fi
11198done
11199
11200for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011201do :
11202 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011203if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011204 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011205#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011206_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011207
Fred Drake8cef4cf2000-06-28 16:40:38 +000011208else
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11210$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011211if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011213else
Martin v. Löwis11437992002-04-12 09:54:03 +000011214 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011215LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011219/* Override any GCC internal prototype to avoid an error.
11220 Use char because int might match the return type of a GCC
11221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011222#ifdef __cplusplus
11223extern "C"
11224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011225char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011226int
11227main ()
11228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011229return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011230 ;
11231 return 0;
11232}
11233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011235 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011236else
Matthias Kloseb9621712010-04-24 17:59:49 +000011237 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011239rm -f core conftest.err conftest.$ac_objext \
11240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011241LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11244$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011245if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011246 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011247 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011248else
Matthias Kloseb9621712010-04-24 17:59:49 +000011249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11250$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011251if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011252 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011253else
11254 ac_check_lib_save_LIBS=$LIBS
11255LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011257/* end confdefs.h. */
11258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011259/* Override any GCC internal prototype to avoid an error.
11260 Use char because int might match the return type of a GCC
11261 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011262#ifdef __cplusplus
11263extern "C"
11264#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011265char forkpty ();
11266int
11267main ()
11268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011269return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011270 ;
11271 return 0;
11272}
11273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011274if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011275 ac_cv_lib_bsd_forkpty=yes
11276else
Matthias Kloseb9621712010-04-24 17:59:49 +000011277 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011279rm -f core conftest.err conftest.$ac_objext \
11280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011281LIBS=$ac_check_lib_save_LIBS
11282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11284$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011285if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011286 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011287 LIBS="$LIBS -lbsd"
11288fi
11289
11290
11291fi
11292
Fred Drake8cef4cf2000-06-28 16:40:38 +000011293
11294fi
11295done
11296
Jack Jansendd19cf82001-12-06 22:36:17 +000011297
Christian Heimesb186d002008-03-18 15:15:01 +000011298# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011299for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011300do :
11301 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011302if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011303 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011304#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011305_ACEOF
11306
11307fi
11308done
11309
11310
Michael W. Hudson54241132001-12-07 15:38:26 +000011311# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011312for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011313do :
11314 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11315ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011316if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011317 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011318#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011319_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011320
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011321fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011322done
11323
Michael W. Hudson54241132001-12-07 15:38:26 +000011324
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011325ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011326if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011327 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011328
Martin v. Löwis1142de32002-03-29 16:28:31 +000011329else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011330 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011331 *" dup2.$ac_objext "* ) ;;
11332 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011333 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011334esac
11335
Martin v. Löwis1142de32002-03-29 16:28:31 +000011336fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011337
11338ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011339if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011340 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11341
11342else
11343 case " $LIBOBJS " in
11344 *" getcwd.$ac_objext "* ) ;;
11345 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11346 ;;
11347esac
11348
11349fi
11350
11351ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011352if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011353 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11354
11355else
11356 case " $LIBOBJS " in
11357 *" strdup.$ac_objext "* ) ;;
11358 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11359 ;;
11360esac
11361
11362fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011363
11364
11365for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011366do :
11367 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011368if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011369 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011370#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011373/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011374#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011375int
11376main ()
11377{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011378getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011379 ;
11380 return 0;
11381}
11382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011384
Matthias Kloseb9621712010-04-24 17:59:49 +000011385$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011386
Guido van Rossum627b2d71993-12-24 10:39:16 +000011387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011389
Guido van Rossum627b2d71993-12-24 10:39:16 +000011390fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011391done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011392
Jack Jansen150753c2003-03-29 22:07:47 +000011393for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011394do :
11395 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011396if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011397 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011398#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011401/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011402#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011403int
11404main ()
11405{
11406setpgrp(0,0);
11407 ;
11408 return 0;
11409}
11410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011412
Matthias Kloseb9621712010-04-24 17:59:49 +000011413$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011414
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011417
11418fi
11419done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011420
Thomas Wouters3a584202000-08-05 23:28:51 +000011421for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011422do :
11423 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011424if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011425 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011426#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011429/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011430#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011431int
11432main ()
11433{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 ;
11436 return 0;
11437}
11438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011439if ac_fn_c_try_compile "$LINENO"; then :
11440
Guido van Rossum627b2d71993-12-24 10:39:16 +000011441else
Skip Montanaro6dead952003-09-25 14:50:04 +000011442
Matthias Kloseb9621712010-04-24 17:59:49 +000011443$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011444
Martin v. Löwis11437992002-04-12 09:54:03 +000011445
Guido van Rossum627b2d71993-12-24 10:39:16 +000011446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011448
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011449fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011450done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011451
Michael W. Hudson54241132001-12-07 15:38:26 +000011452
Victor Stinnere0be4232011-10-25 13:06:09 +020011453for ac_func in clock_gettime
11454do :
11455 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11456if test "x$ac_cv_func_clock_gettime" = xyes; then :
11457 cat >>confdefs.h <<_ACEOF
11458#define HAVE_CLOCK_GETTIME 1
11459_ACEOF
11460
11461else
11462
11463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11464$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11465if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11466 $as_echo_n "(cached) " >&6
11467else
11468 ac_check_lib_save_LIBS=$LIBS
11469LIBS="-lrt $LIBS"
11470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11471/* end confdefs.h. */
11472
11473/* Override any GCC internal prototype to avoid an error.
11474 Use char because int might match the return type of a GCC
11475 builtin and then its argument prototype would still apply. */
11476#ifdef __cplusplus
11477extern "C"
11478#endif
11479char clock_gettime ();
11480int
11481main ()
11482{
11483return clock_gettime ();
11484 ;
11485 return 0;
11486}
11487_ACEOF
11488if ac_fn_c_try_link "$LINENO"; then :
11489 ac_cv_lib_rt_clock_gettime=yes
11490else
11491 ac_cv_lib_rt_clock_gettime=no
11492fi
11493rm -f core conftest.err conftest.$ac_objext \
11494 conftest$ac_exeext conftest.$ac_ext
11495LIBS=$ac_check_lib_save_LIBS
11496fi
11497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11498$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11499if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11500
11501 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11502
11503
11504$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11505
11506
11507fi
11508
11509
11510fi
11511done
11512
11513
11514for ac_func in clock_getres
11515do :
11516 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11517if test "x$ac_cv_func_clock_getres" = xyes; then :
11518 cat >>confdefs.h <<_ACEOF
11519#define HAVE_CLOCK_GETRES 1
11520_ACEOF
11521
11522else
11523
11524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11525$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11526if ${ac_cv_lib_rt_clock_getres+:} false; then :
11527 $as_echo_n "(cached) " >&6
11528else
11529 ac_check_lib_save_LIBS=$LIBS
11530LIBS="-lrt $LIBS"
11531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11532/* end confdefs.h. */
11533
11534/* Override any GCC internal prototype to avoid an error.
11535 Use char because int might match the return type of a GCC
11536 builtin and then its argument prototype would still apply. */
11537#ifdef __cplusplus
11538extern "C"
11539#endif
11540char clock_getres ();
11541int
11542main ()
11543{
11544return clock_getres ();
11545 ;
11546 return 0;
11547}
11548_ACEOF
11549if ac_fn_c_try_link "$LINENO"; then :
11550 ac_cv_lib_rt_clock_getres=yes
11551else
11552 ac_cv_lib_rt_clock_getres=no
11553fi
11554rm -f core conftest.err conftest.$ac_objext \
11555 conftest$ac_exeext conftest.$ac_ext
11556LIBS=$ac_check_lib_save_LIBS
11557fi
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11559$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11560if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11561
11562 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11563
11564
11565fi
11566
11567
11568fi
11569done
11570
11571
Matthias Kloseb9621712010-04-24 17:59:49 +000011572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11573$as_echo_n "checking for major... " >&6; }
11574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011575/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011576
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011577#if defined(MAJOR_IN_MKDEV)
11578#include <sys/mkdev.h>
11579#elif defined(MAJOR_IN_SYSMACROS)
11580#include <sys/sysmacros.h>
11581#else
11582#include <sys/types.h>
11583#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011584
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011585int
11586main ()
11587{
11588
11589 makedev(major(0),minor(0));
11590
11591 ;
11592 return 0;
11593}
11594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011595if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011596
11597
Matthias Kloseb9621712010-04-24 17:59:49 +000011598$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011599
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11601$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011602
11603else
Skip Montanaro6dead952003-09-25 14:50:04 +000011604
Matthias Kloseb9621712010-04-24 17:59:49 +000011605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11606$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011607
11608fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011609rm -f core conftest.err conftest.$ac_objext \
11610 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011611
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011612# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011613# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11615$as_echo_n "checking for getaddrinfo... " >&6; }
11616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011617/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011618
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011619#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011620#include <sys/socket.h>
11621#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011622#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011623
Martin v. Löwis11437992002-04-12 09:54:03 +000011624int
11625main ()
11626{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011627getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 ;
11629 return 0;
11630}
11631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011632if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011633 have_getaddrinfo=yes
11634else
Matthias Kloseb9621712010-04-24 17:59:49 +000011635 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011636fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011637rm -f core conftest.err conftest.$ac_objext \
11638 conftest$ac_exeext conftest.$ac_ext
11639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11640$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011641if test $have_getaddrinfo = yes
11642then
Matthias Kloseb9621712010-04-24 17:59:49 +000011643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11644$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011645 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011647else
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011649
11650if test "${enable_ipv6+set}" = set; then
11651 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11652else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011653 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011654fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011655else
Matthias Kloseb9621712010-04-24 17:59:49 +000011656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011657/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011658
Stefan Krah19c21392012-11-22 23:47:32 +010011659#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011660#include <sys/types.h>
11661#include <netdb.h>
11662#include <string.h>
11663#include <sys/socket.h>
11664#include <netinet/in.h>
11665
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011666int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011667{
11668 int passive, gaierr, inet4 = 0, inet6 = 0;
11669 struct addrinfo hints, *ai, *aitop;
11670 char straddr[INET6_ADDRSTRLEN], strport[16];
11671
11672 for (passive = 0; passive <= 1; passive++) {
11673 memset(&hints, 0, sizeof(hints));
11674 hints.ai_family = AF_UNSPEC;
11675 hints.ai_flags = passive ? AI_PASSIVE : 0;
11676 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011677 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011678 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11679 (void)gai_strerror(gaierr);
11680 goto bad;
11681 }
11682 for (ai = aitop; ai; ai = ai->ai_next) {
11683 if (ai->ai_addr == NULL ||
11684 ai->ai_addrlen == 0 ||
11685 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11686 straddr, sizeof(straddr), strport, sizeof(strport),
11687 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11688 goto bad;
11689 }
11690 switch (ai->ai_family) {
11691 case AF_INET:
11692 if (strcmp(strport, "54321") != 0) {
11693 goto bad;
11694 }
11695 if (passive) {
11696 if (strcmp(straddr, "0.0.0.0") != 0) {
11697 goto bad;
11698 }
11699 } else {
11700 if (strcmp(straddr, "127.0.0.1") != 0) {
11701 goto bad;
11702 }
11703 }
11704 inet4++;
11705 break;
11706 case AF_INET6:
11707 if (strcmp(strport, "54321") != 0) {
11708 goto bad;
11709 }
11710 if (passive) {
11711 if (strcmp(straddr, "::") != 0) {
11712 goto bad;
11713 }
11714 } else {
11715 if (strcmp(straddr, "::1") != 0) {
11716 goto bad;
11717 }
11718 }
11719 inet6++;
11720 break;
11721 case AF_UNSPEC:
11722 goto bad;
11723 break;
11724 default:
11725 /* another family support? */
11726 break;
11727 }
11728 }
11729 }
11730
11731 if (!(inet4 == 0 || inet4 == 2))
11732 goto bad;
11733 if (!(inet6 == 0 || inet6 == 2))
11734 goto bad;
11735
11736 if (aitop)
11737 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011738 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011739
11740 bad:
11741 if (aitop)
11742 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011743 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011744}
11745
Martin v. Löwis11437992002-04-12 09:54:03 +000011746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011747if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011748 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011749else
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011755
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011756fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011757
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011759
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11761$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11762
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011763if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011764then
11765 if test $ipv6 = yes
11766 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011767 echo 'Fatal: You must get working getaddrinfo() function.'
11768 echo ' or you can specify "--disable-ipv6"'.
11769 exit 1
11770 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011771else
Martin v. Löwis11437992002-04-12 09:54:03 +000011772
Matthias Kloseb9621712010-04-24 17:59:49 +000011773$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011774
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011775fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011776
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011777for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011778do :
11779 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011780if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011781 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011782#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011783_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011784
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011785fi
11786done
11787
Michael W. Hudson54241132001-12-07 15:38:26 +000011788
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011789# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11791$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011792if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011794else
Matthias Kloseb9621712010-04-24 17:59:49 +000011795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011796/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011797#include <sys/types.h>
11798#include <sys/time.h>
11799#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011800
Martin v. Löwis11437992002-04-12 09:54:03 +000011801int
11802main ()
11803{
11804if ((struct tm *) 0)
11805return 0;
11806 ;
11807 return 0;
11808}
11809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011810if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011811 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011812else
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11818$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011819if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011820
Matthias Kloseb9621712010-04-24 17:59:49 +000011821$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011822
11823fi
11824
Matthias Kloseb9621712010-04-24 17:59:49 +000011825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11826$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011827if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011829else
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011831/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011832#include <sys/types.h>
11833#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011834
Martin v. Löwis11437992002-04-12 09:54:03 +000011835int
11836main ()
11837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011838struct tm tm;
11839 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011840 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011841 ;
11842 return 0;
11843}
11844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011845if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011846 ac_cv_struct_tm=time.h
11847else
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11853$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011854if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011855
Matthias Kloseb9621712010-04-24 17:59:49 +000011856$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011857
11858fi
11859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860ac_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 +000011861#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011862
Matthias Kloseb9621712010-04-24 17:59:49 +000011863"
Victor Stinnere0be4232011-10-25 13:06:09 +020011864if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011865
11866cat >>confdefs.h <<_ACEOF
11867#define HAVE_STRUCT_TM_TM_ZONE 1
11868_ACEOF
11869
11870
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011871fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011872
Martin v. Löwis11437992002-04-12 09:54:03 +000011873if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11874
Matthias Kloseb9621712010-04-24 17:59:49 +000011875$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011876
11877else
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11879"
Victor Stinnere0be4232011-10-25 13:06:09 +020011880if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011881 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011884fi
11885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011886cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011887#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011888_ACEOF
11889
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11891$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011892if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011893 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011894else
Matthias Kloseb9621712010-04-24 17:59:49 +000011895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011896/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011897#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011898#if !HAVE_DECL_TZNAME
11899extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011900#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011901
Martin v. Löwis11437992002-04-12 09:54:03 +000011902int
11903main ()
11904{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011905return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011906 ;
11907 return 0;
11908}
11909_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011910if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011911 ac_cv_var_tzname=yes
11912else
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011914fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011915rm -f core conftest.err conftest.$ac_objext \
11916 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11919$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011920 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011921
Matthias Kloseb9621712010-04-24 17:59:49 +000011922$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011923
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011924 fi
11925fi
11926
Matthias Kloseb9621712010-04-24 17:59:49 +000011927ac_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 +020011928if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011929
11930cat >>confdefs.h <<_ACEOF
11931#define HAVE_STRUCT_STAT_ST_RDEV 1
11932_ACEOF
11933
11934
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011935fi
11936
Matthias Kloseb9621712010-04-24 17:59:49 +000011937ac_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 +020011938if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011939
Martin v. Löwis11437992002-04-12 09:54:03 +000011940cat >>confdefs.h <<_ACEOF
11941#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11942_ACEOF
11943
11944
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011945fi
11946
Matthias Kloseb9621712010-04-24 17:59:49 +000011947ac_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 +020011948if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011949
11950cat >>confdefs.h <<_ACEOF
11951#define HAVE_STRUCT_STAT_ST_FLAGS 1
11952_ACEOF
11953
11954
11955fi
11956
Matthias Kloseb9621712010-04-24 17:59:49 +000011957ac_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 +020011958if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011959
11960cat >>confdefs.h <<_ACEOF
11961#define HAVE_STRUCT_STAT_ST_GEN 1
11962_ACEOF
11963
11964
11965fi
11966
Matthias Kloseb9621712010-04-24 17:59:49 +000011967ac_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 +020011968if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011969
11970cat >>confdefs.h <<_ACEOF
11971#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11972_ACEOF
11973
11974
11975fi
11976
Matthias Kloseb9621712010-04-24 17:59:49 +000011977ac_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 +020011978if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011979
Martin v. Löwis11437992002-04-12 09:54:03 +000011980cat >>confdefs.h <<_ACEOF
11981#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11982_ACEOF
11983
11984
Matthias Kloseb9621712010-04-24 17:59:49 +000011985$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011986
11987else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011988 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011989 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011990 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11991 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011992esac
11993
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011994fi
11995
Michael W. Hudson54241132001-12-07 15:38:26 +000011996
Martin v. Löwis11437992002-04-12 09:54:03 +000011997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11999$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012000if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012002else
Matthias Kloseb159a552010-04-25 21:00:44 +000012003
Matthias Kloseb9621712010-04-24 17:59:49 +000012004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012005/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012006#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012007int
12008main ()
12009{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012010return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012011 ;
12012 return 0;
12013}
12014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012015if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012016 ac_cv_header_time_altzone=yes
12017else
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012022fi
12023
Matthias Kloseb9621712010-04-24 17:59:49 +000012024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12025$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012026if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012027
Matthias Kloseb9621712010-04-24 17:59:49 +000012028$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012029
12030fi
12031
Guido van Rossumda88dad1995-01-26 00:46:29 +000012032was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12034$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012036/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012037
12038#include <sys/types.h>
12039#include <sys/select.h>
12040#include <sys/time.h>
12041
Martin v. Löwis11437992002-04-12 09:54:03 +000012042int
12043main ()
12044{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012045;
Martin v. Löwis11437992002-04-12 09:54:03 +000012046 ;
12047 return 0;
12048}
12049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012050if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012051
12052
Matthias Kloseb9621712010-04-24 17:59:49 +000012053$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012054
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012055 was_it_defined=yes
12056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12060$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012061
Matthias Kloseb9621712010-04-24 17:59:49 +000012062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12063$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012064if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012066else
Matthias Kloseb9621712010-04-24 17:59:49 +000012067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012068/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012069#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012070int
12071main ()
12072{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012073struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012074 ;
12075 return 0;
12076}
12077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012078if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012079 ac_cv_struct_addrinfo=yes
12080else
Matthias Kloseb9621712010-04-24 17:59:49 +000012081 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12084fi
12085
Matthias Kloseb9621712010-04-24 17:59:49 +000012086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12087$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012088if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012091
12092fi
12093
Matthias Kloseb9621712010-04-24 17:59:49 +000012094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12095$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012096if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012098else
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012100/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012101
12102# include <sys/types.h>
12103# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012104int
12105main ()
12106{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012107struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012108 ;
12109 return 0;
12110}
12111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012112if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012113 ac_cv_struct_sockaddr_storage=yes
12114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12118fi
12119
Matthias Kloseb9621712010-04-24 17:59:49 +000012120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12121$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012122if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012123
Matthias Kloseb9621712010-04-24 17:59:49 +000012124$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012125
12126fi
12127
Guido van Rossum627b2d71993-12-24 10:39:16 +000012128# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012129
Matthias Kloseb9621712010-04-24 17:59:49 +000012130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12131$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012132if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012134else
Matthias Kloseb9621712010-04-24 17:59:49 +000012135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012137$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012138int
12139main ()
12140{
12141static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012142test_array [0] = 0;
12143return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012144
12145 ;
12146 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012147}
Martin v. Löwis11437992002-04-12 09:54:03 +000012148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012149if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012150 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012151else
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12157$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012158if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012160
12161fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012162
Matthias Kloseb9621712010-04-24 17:59:49 +000012163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12164$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012165if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012167else
Matthias Kloseb9621712010-04-24 17:59:49 +000012168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012169/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012170
Martin v. Löwis11437992002-04-12 09:54:03 +000012171int
12172main ()
12173{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012174
Martin v. Löwis11437992002-04-12 09:54:03 +000012175#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012176 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012178 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012180 char const *const *pcpcc;
12181 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012182 /* NEC SVR4.0.2 mips cc rejects this. */
12183 struct point {int x, y;};
12184 static struct point const zero = {0,0};
12185 /* AIX XL C 1.02.0.0 rejects this.
12186 It does not let you subtract one const X* pointer from another in
12187 an arm of an if-expression whose if-part is not a constant
12188 expression */
12189 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012190 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012191 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012192 ++pcpcc;
12193 ppc = (char**) pcpcc;
12194 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012195 { /* SCO 3.2v4 cc rejects this sort of thing. */
12196 char tx;
12197 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012198 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012199
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012201 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 }
12203 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12204 int x[] = {25, 17};
12205 const int *foo = &x[0];
12206 ++foo;
12207 }
12208 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12209 typedef const int *iptr;
12210 iptr p = 0;
12211 ++p;
12212 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012213 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012214 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012215 struct s { int j; const int *ap[3]; } bx;
12216 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 }
12218 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12219 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012221 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012222 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012223#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012224
Martin v. Löwis11437992002-04-12 09:54:03 +000012225 ;
12226 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012227}
Martin v. Löwis11437992002-04-12 09:54:03 +000012228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012229if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012230 ac_cv_c_const=yes
12231else
Matthias Kloseb9621712010-04-24 17:59:49 +000012232 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12237$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012238if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012239
Matthias Kloseb9621712010-04-24 17:59:49 +000012240$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012241
12242fi
12243
Michael W. Hudson54241132001-12-07 15:38:26 +000012244
Guido van Rossumda88dad1995-01-26 00:46:29 +000012245works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12247$as_echo_n "checking for working volatile... " >&6; }
12248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012249/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012250
Martin v. Löwis11437992002-04-12 09:54:03 +000012251int
12252main ()
12253{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012254volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012255 ;
12256 return 0;
12257}
12258_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012259if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012260 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012261else
Skip Montanaro6dead952003-09-25 14:50:04 +000012262
Matthias Kloseb9621712010-04-24 17:59:49 +000012263$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012264
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012265
Guido van Rossum627b2d71993-12-24 10:39:16 +000012266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12269$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012270
Guido van Rossumda88dad1995-01-26 00:46:29 +000012271works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12273$as_echo_n "checking for working signed char... " >&6; }
12274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012275/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012276
Martin v. Löwis11437992002-04-12 09:54:03 +000012277int
12278main ()
12279{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012280signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012281 ;
12282 return 0;
12283}
12284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012285if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012286 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012287else
Skip Montanaro6dead952003-09-25 14:50:04 +000012288
Matthias Kloseb9621712010-04-24 17:59:49 +000012289$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012290
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012291
Guido van Rossum7f43da71994-08-01 12:15:30 +000012292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12295$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012296
Guido van Rossumda88dad1995-01-26 00:46:29 +000012297have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12299$as_echo_n "checking for prototypes... " >&6; }
12300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012301/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012302int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012303int
12304main ()
12305{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012306return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012307 ;
12308 return 0;
12309}
12310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012311if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012312
Matthias Kloseb9621712010-04-24 17:59:49 +000012313$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012314
Matthias Kloseb159a552010-04-25 21:00:44 +000012315 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12319$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012320
Guido van Rossumda88dad1995-01-26 00:46:29 +000012321works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12323$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012325/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012326
12327#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012328int foo(int x, ...) {
12329 va_list va;
12330 va_start(va, x);
12331 va_arg(va, int);
12332 va_arg(va, char *);
12333 va_arg(va, double);
12334 return 0;
12335}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012336
Martin v. Löwis11437992002-04-12 09:54:03 +000012337int
12338main ()
12339{
Guido van Rossum90eea071996-08-30 20:58:57 +000012340return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012341 ;
12342 return 0;
12343}
12344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012346
12347
Matthias Kloseb9621712010-04-24 17:59:49 +000012348$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012349
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012350 works=yes
12351
Guido van Rossum627b2d71993-12-24 10:39:16 +000012352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12355$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012356
Martin v. Löwisd6320502004-08-12 13:45:08 +000012357# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12359$as_echo_n "checking for socketpair... " >&6; }
12360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012361/* end confdefs.h. */
12362
12363#include <sys/types.h>
12364#include <sys/socket.h>
12365
12366int
12367main ()
12368{
12369void *x=socketpair
12370 ;
12371 return 0;
12372}
12373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012375
Matthias Kloseb9621712010-04-24 17:59:49 +000012376$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012377
Matthias Kloseb159a552010-04-25 21:00:44 +000012378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012379$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012380else
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12382$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012383
12384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012386
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012387# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12389$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012391/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012392#include <sys/types.h>
12393#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012394int
12395main ()
12396{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012397struct sockaddr x;
12398x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012399 ;
12400 return 0;
12401}
12402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012403if ac_fn_c_try_compile "$LINENO"; then :
12404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12405$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012406
Matthias Kloseb9621712010-04-24 17:59:49 +000012407$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012408
12409else
Matthias Kloseb9621712010-04-24 17:59:49 +000012410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12411$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012412
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012415
Guido van Rossumda88dad1995-01-26 00:46:29 +000012416va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12418$as_echo_n "checking whether va_list is an array... " >&6; }
12419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012420/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012421
12422#ifdef HAVE_STDARG_PROTOTYPES
12423#include <stdarg.h>
12424#else
12425#include <varargs.h>
12426#endif
12427
Martin v. Löwis11437992002-04-12 09:54:03 +000012428int
12429main ()
12430{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012431va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 ;
12433 return 0;
12434}
12435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012436if ac_fn_c_try_compile "$LINENO"; then :
12437
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012438else
Skip Montanaro6dead952003-09-25 14:50:04 +000012439
Martin v. Löwis11437992002-04-12 09:54:03 +000012440
Matthias Kloseb9621712010-04-24 17:59:49 +000012441$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012442
Guido van Rossumda88dad1995-01-26 00:46:29 +000012443 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012444
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12448$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012449
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012450# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012451
12452
Matthias Kloseb9621712010-04-24 17:59:49 +000012453ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012454if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012455
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012457
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12459$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012460 OLD_CFLAGS=$CFLAGS
12461 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012463/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012464
12465# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012466
Martin v. Löwis11437992002-04-12 09:54:03 +000012467int
12468main ()
12469{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012470
12471 char *name;
12472 struct hostent *he, *res;
12473 char buffer[2048];
12474 int buflen = 2048;
12475 int h_errnop;
12476
12477 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
12479 ;
12480 return 0;
12481}
12482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012483if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012486
Martin v. Löwis11437992002-04-12 09:54:03 +000012487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012489
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12491$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012492
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012493else
Skip Montanaro6dead952003-09-25 14:50:04 +000012494
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12496$as_echo "no" >&6; }
12497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12498$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012500/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012501
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012502# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012503
Martin v. Löwis11437992002-04-12 09:54:03 +000012504int
12505main ()
12506{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012507
12508 char *name;
12509 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012510 char buffer[2048];
12511 int buflen = 2048;
12512 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012513
Matthias Kloseb159a552010-04-25 21:00:44 +000012514 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012515
12516 ;
12517 return 0;
12518}
12519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012520if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
Matthias Kloseb9621712010-04-24 17:59:49 +000012522 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012523
Martin v. Löwis11437992002-04-12 09:54:03 +000012524
Matthias Kloseb159a552010-04-25 21:00:44 +000012525$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012526
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12528$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012529
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012530else
Skip Montanaro6dead952003-09-25 14:50:04 +000012531
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12533$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12535$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12537/* end confdefs.h. */
12538
12539# include <netdb.h>
12540
12541int
12542main ()
12543{
12544
12545 char *name;
12546 struct hostent *he;
12547 struct hostent_data data;
12548
12549 (void) gethostbyname_r(name, he, &data);
12550
12551 ;
12552 return 0;
12553}
12554_ACEOF
12555if ac_fn_c_try_compile "$LINENO"; then :
12556
12557 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12558
12559
12560$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12561
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12563$as_echo "yes" >&6; }
12564
12565else
12566
12567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12568$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012569
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012572
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012575
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012578 CFLAGS=$OLD_CFLAGS
12579
12580else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012581
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 for ac_func in gethostbyname
12583do :
12584 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012585if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012587#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012588_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012589
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012590fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012591done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012592
Michael W. Hudson54241132001-12-07 15:38:26 +000012593
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012594fi
12595
Michael W. Hudson54241132001-12-07 15:38:26 +000012596
12597
12598
12599
12600
12601
Guido van Rossum627b2d71993-12-24 10:39:16 +000012602# checks for system services
12603# (none yet)
12604
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012606ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012607if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012608
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012609else
Matthias Kloseb9621712010-04-24 17:59:49 +000012610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12611$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012612if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012613 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012614else
Martin v. Löwis11437992002-04-12 09:54:03 +000012615 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012616LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012619
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620/* Override any GCC internal prototype to avoid an error.
12621 Use char because int might match the return type of a GCC
12622 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012623#ifdef __cplusplus
12624extern "C"
12625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012626char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012627int
12628main ()
12629{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012630return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012631 ;
12632 return 0;
12633}
12634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012635if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012637else
Matthias Kloseb9621712010-04-24 17:59:49 +000012638 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012640rm -f core conftest.err conftest.$ac_objext \
12641 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012642LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12645$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012646if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 cat >>confdefs.h <<_ACEOF
12648#define HAVE_LIBIEEE 1
12649_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012650
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012651 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012652
Guido van Rossum627b2d71993-12-24 10:39:16 +000012653fi
12654
Michael W. Hudson54241132001-12-07 15:38:26 +000012655
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012656fi
12657
Michael W. Hudson54241132001-12-07 15:38:26 +000012658
Guido van Rossum7f253911997-05-09 02:42:48 +000012659# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12661$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012663# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012664if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012666if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012667then
12668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12672$as_echo "yes" >&6; }
12673else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12674$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012675fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012676else
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12678$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012679fi
12680
Guido van Rossum7f253911997-05-09 02:42:48 +000012681
Guido van Rossum7f43da71994-08-01 12:15:30 +000012682# check for --with-libm=...
12683
Guido van Rossum563e7081996-09-10 18:20:48 +000012684case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012685Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012686*) LIBM=-lm
12687esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12689$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012690
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012691# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012692if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012694if test "$withval" = no
12695then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12697$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012698elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012699then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12701$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012702else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012703fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012704else
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12706$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012707fi
12708
Guido van Rossum7f43da71994-08-01 12:15:30 +000012709
12710# check for --with-libc=...
12711
Matthias Kloseb9621712010-04-24 17:59:49 +000012712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12713$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012716if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012717 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012718if test "$withval" = no
12719then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12721$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012722elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012723then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12725$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012726else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012727fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012728else
Matthias Kloseb9621712010-04-24 17:59:49 +000012729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12730$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012731fi
12732
Guido van Rossum7f43da71994-08-01 12:15:30 +000012733
Stefan Krah1919b7e2012-03-21 18:25:23 +010012734# **************************************
12735# * Check for gcc x64 inline assembler *
12736# **************************************
12737
12738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12739$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12741/* end confdefs.h. */
12742
12743int
12744main ()
12745{
12746
12747 __asm__ __volatile__ ("movq %rcx, %rax");
12748
12749 ;
12750 return 0;
12751}
12752_ACEOF
12753if ac_fn_c_try_compile "$LINENO"; then :
12754 have_gcc_asm_for_x64=yes
12755else
12756 have_gcc_asm_for_x64=no
12757fi
12758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12760$as_echo "$have_gcc_asm_for_x64" >&6; }
12761if test "$have_gcc_asm_for_x64" = yes
12762then
12763
12764$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12765
12766fi
12767
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012768# **************************************************
12769# * Check for various properties of floating point *
12770# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012771
Matthias Kloseb9621712010-04-24 17:59:49 +000012772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12773$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012774if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012776else
12777
Matthias Kloseb9621712010-04-24 17:59:49 +000012778if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012779 ac_cv_little_endian_double=no
12780else
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012782/* end confdefs.h. */
12783
12784#include <string.h>
12785int main() {
12786 double x = 9006104071832581.0;
12787 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12788 return 0;
12789 else
12790 return 1;
12791}
12792
12793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012794if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012795 ac_cv_little_endian_double=yes
12796else
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012801fi
12802
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012803fi
12804
Matthias Kloseb9621712010-04-24 17:59:49 +000012805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12806$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012807if test "$ac_cv_little_endian_double" = yes
12808then
12809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012811
12812fi
12813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12815$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012816if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012817 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012818else
12819
Matthias Kloseb9621712010-04-24 17:59:49 +000012820if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012821 ac_cv_big_endian_double=no
12822else
Matthias Kloseb9621712010-04-24 17:59:49 +000012823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012824/* end confdefs.h. */
12825
12826#include <string.h>
12827int main() {
12828 double x = 9006104071832581.0;
12829 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12830 return 0;
12831 else
12832 return 1;
12833}
12834
12835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012836if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012837 ac_cv_big_endian_double=yes
12838else
Matthias Kloseb9621712010-04-24 17:59:49 +000012839 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012843fi
12844
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012845fi
12846
Matthias Kloseb9621712010-04-24 17:59:49 +000012847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12848$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012849if test "$ac_cv_big_endian_double" = yes
12850then
12851
Matthias Kloseb9621712010-04-24 17:59:49 +000012852$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012853
12854fi
12855
12856# Some ARM platforms use a mixed-endian representation for doubles.
12857# While Python doesn't currently have full support for these platforms
12858# (see e.g., issue 1762561), we can at least make sure that float <-> string
12859# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12861$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012862if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012864else
12865
Matthias Kloseb9621712010-04-24 17:59:49 +000012866if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012867 ac_cv_mixed_endian_double=no
12868else
Matthias Kloseb9621712010-04-24 17:59:49 +000012869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012870/* end confdefs.h. */
12871
12872#include <string.h>
12873int main() {
12874 double x = 9006104071832581.0;
12875 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12876 return 0;
12877 else
12878 return 1;
12879}
12880
12881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012882if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012883 ac_cv_mixed_endian_double=yes
12884else
Matthias Kloseb9621712010-04-24 17:59:49 +000012885 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012887rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12888 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012889fi
12890
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012891fi
12892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12894$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012895if test "$ac_cv_mixed_endian_double" = yes
12896then
12897
Matthias Kloseb9621712010-04-24 17:59:49 +000012898$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012899
12900fi
12901
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012902# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012903# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012904# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012905# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012906# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012907# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012908
12909# This inline assembler syntax may also work for suncc and icc,
12910# so we try it on all platforms.
12911
Matthias Kloseb9621712010-04-24 17:59:49 +000012912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12913$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012915/* end confdefs.h. */
12916
12917int
12918main ()
12919{
12920
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012921 unsigned short cw;
12922 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12923 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012924
12925 ;
12926 return 0;
12927}
12928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012929if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012930 have_gcc_asm_for_x87=yes
12931else
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012933fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12936$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012937if test "$have_gcc_asm_for_x87" = yes
12938then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012939
Matthias Kloseb9621712010-04-24 17:59:49 +000012940$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012941
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012942fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012943
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012944# Detect whether system arithmetic is subject to x87-style double
12945# rounding issues. The result of this test has little meaning on non
12946# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12947# mode is round-to-nearest and double rounding issues are present, and
12948# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12950$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012951# $BASECFLAGS may affect the result
12952ac_save_cc="$CC"
12953CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012954if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012955 ac_cv_x87_double_rounding=no
12956else
Matthias Kloseb9621712010-04-24 17:59:49 +000012957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012958/* end confdefs.h. */
12959
12960#include <stdlib.h>
12961#include <math.h>
12962int main() {
12963 volatile double x, y, z;
12964 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12965 x = 0.99999999999999989; /* 1-2**-53 */
12966 y = 1./x;
12967 if (y != 1.)
12968 exit(0);
12969 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12970 x = 1e16;
12971 y = 2.99999;
12972 z = x + y;
12973 if (z != 1e16+4.)
12974 exit(0);
12975 /* both tests show evidence of double rounding */
12976 exit(1);
12977}
12978
12979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012980if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012981 ac_cv_x87_double_rounding=no
12982else
Matthias Kloseb9621712010-04-24 17:59:49 +000012983 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12986 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012987fi
12988
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012989CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12991$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012992if test "$ac_cv_x87_double_rounding" = yes
12993then
12994
Matthias Kloseb9621712010-04-24 17:59:49 +000012995$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012996
12997fi
12998
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012999# ************************************
13000# * Check for mathematical functions *
13001# ************************************
13002
13003LIBS_SAVE=$LIBS
13004LIBS="$LIBS $LIBM"
13005
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013006for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13007do :
13008 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13009ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013010if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013011 cat >>confdefs.h <<_ACEOF
13012#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13013_ACEOF
13014
13015fi
13016done
13017
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013018for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013019do :
13020 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13021ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013022if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013023 cat >>confdefs.h <<_ACEOF
13024#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13025_ACEOF
13026
13027fi
13028done
13029
13030ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13031"
Victor Stinnere0be4232011-10-25 13:06:09 +020013032if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013033 ac_have_decl=1
13034else
13035 ac_have_decl=0
13036fi
13037
13038cat >>confdefs.h <<_ACEOF
13039#define HAVE_DECL_ISINF $ac_have_decl
13040_ACEOF
13041ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13042"
Victor Stinnere0be4232011-10-25 13:06:09 +020013043if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013044 ac_have_decl=1
13045else
13046 ac_have_decl=0
13047fi
13048
13049cat >>confdefs.h <<_ACEOF
13050#define HAVE_DECL_ISNAN $ac_have_decl
13051_ACEOF
13052ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13053"
Victor Stinnere0be4232011-10-25 13:06:09 +020013054if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013055 ac_have_decl=1
13056else
13057 ac_have_decl=0
13058fi
13059
13060cat >>confdefs.h <<_ACEOF
13061#define HAVE_DECL_ISFINITE $ac_have_decl
13062_ACEOF
13063
13064
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013065# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13066# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13068$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013069if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013071else
13072
Matthias Kloseb9621712010-04-24 17:59:49 +000013073if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013074 ac_cv_tanh_preserves_zero_sign=no
13075else
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013077/* end confdefs.h. */
13078
13079#include <math.h>
13080#include <stdlib.h>
13081int main() {
13082 /* return 0 if either negative zeros don't exist
13083 on this platform or if negative zeros exist
13084 and tanh(-0.) == -0. */
13085 if (atan2(0., -1.) == atan2(-0., -1.) ||
13086 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13087 else exit(1);
13088}
13089
13090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013091if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013092 ac_cv_tanh_preserves_zero_sign=yes
13093else
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13097 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013098fi
13099
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013100fi
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13103$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013104if test "$ac_cv_tanh_preserves_zero_sign" = yes
13105then
13106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013108
13109fi
13110
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013111if test "$ac_cv_func_log1p" = yes
13112then
13113 # On some versions of AIX, log1p(-0.) returns 0. instead of
13114 # -0. See issue #9920.
13115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13116$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013117 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013118 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013119else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013120
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013121 if test "$cross_compiling" = yes; then :
13122 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013123else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13125/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013126
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013127 #include <math.h>
13128 #include <stdlib.h>
13129 int main() {
13130 /* Fail if the signs of log1p(-0.) and -0. can be
13131 distinguished. */
13132 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13133 return 0;
13134 else
13135 return 1;
13136 }
13137
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013138_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013139if ac_fn_c_try_run "$LINENO"; then :
13140 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013141else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013142 ac_cv_log1p_drops_zero_sign=yes
13143fi
13144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013146fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013147
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013148fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013149
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13151$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13152fi
13153if test "$ac_cv_log1p_drops_zero_sign" = yes
13154then
13155
13156$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13157
13158fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013159
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013160LIBS=$LIBS_SAVE
13161
Mark Dickinsona614f042009-11-28 12:48:43 +000013162# For multiprocessing module, check that sem_open
13163# actually works. For FreeBSD versions <= 7.2,
13164# the kernel module that provides POSIX semaphores
13165# isn't loaded by default, so an attempt to call
13166# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13168$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013169if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013171else
Matthias Kloseb9621712010-04-24 17:59:49 +000013172 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013173 ac_cv_posix_semaphores_enabled=yes
13174else
Matthias Kloseb9621712010-04-24 17:59:49 +000013175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013176/* end confdefs.h. */
13177
13178#include <unistd.h>
13179#include <fcntl.h>
13180#include <stdio.h>
13181#include <semaphore.h>
13182#include <sys/stat.h>
13183
13184int main(void) {
13185 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13186 if (a == SEM_FAILED) {
13187 perror("sem_open");
13188 return 1;
13189 }
13190 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013191 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013192 return 0;
13193}
13194
13195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013196if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013197 ac_cv_posix_semaphores_enabled=yes
13198else
Matthias Kloseb9621712010-04-24 17:59:49 +000013199 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13202 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013203fi
13204
13205
Mark Dickinsona614f042009-11-28 12:48:43 +000013206fi
13207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13209$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013210if test $ac_cv_posix_semaphores_enabled = no
13211then
13212
Matthias Kloseb9621712010-04-24 17:59:49 +000013213$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013214
13215fi
13216
Mark Dickinson10683072009-04-18 21:18:19 +000013217# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13219$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013220if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013222else
Matthias Kloseb9621712010-04-24 17:59:49 +000013223 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013224 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013225else
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013227/* end confdefs.h. */
13228
13229#include <unistd.h>
13230#include <fcntl.h>
13231#include <stdio.h>
13232#include <semaphore.h>
13233#include <sys/stat.h>
13234
13235int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013236 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013237 int count;
13238 int res;
13239 if(a==SEM_FAILED){
13240 perror("sem_open");
13241 return 1;
13242
13243 }
13244 res = sem_getvalue(a, &count);
13245 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013246 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013247 return res==-1 ? 1 : 0;
13248}
13249
Mark Dickinson10683072009-04-18 21:18:19 +000013250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013251if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013252 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13257 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013258fi
13259
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013260
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013261fi
13262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13264$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013265if test $ac_cv_broken_sem_getvalue = yes
13266then
13267
Matthias Kloseb9621712010-04-24 17:59:49 +000013268$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013269
13270fi
13271
Mark Dickinsonbd792642009-03-18 20:06:12 +000013272# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13274$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013275# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013276if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013277 enableval=$enable_big_digits; case $enable_big_digits in
13278yes)
13279 enable_big_digits=30 ;;
13280no)
13281 enable_big_digits=15 ;;
1328215|30)
13283 ;;
13284*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013285 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 +000013286esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13288$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013289
13290cat >>confdefs.h <<_ACEOF
13291#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13292_ACEOF
13293
13294
13295else
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13297$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013298fi
13299
13300
Guido van Rossumef2255b2000-03-10 22:30:29 +000013301# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013302ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013303if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013304
13305
Matthias Kloseb9621712010-04-24 17:59:49 +000013306$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013307
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013308 wchar_h="yes"
13309
Guido van Rossumef2255b2000-03-10 22:30:29 +000013310else
Martin v. Löwis11437992002-04-12 09:54:03 +000013311 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013312
13313fi
13314
Michael W. Hudson54241132001-12-07 15:38:26 +000013315
Martin v. Löwis11437992002-04-12 09:54:03 +000013316
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013317# determine wchar_t size
13318if test "$wchar_h" = yes
13319then
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013321# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13322# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13323# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13325$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013326if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013328else
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13330"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013331
Martin v. Löwis11437992002-04-12 09:54:03 +000013332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 if test "$ac_cv_type_wchar_t" = yes; then
13334 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13335$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013336as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013337See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013338 else
13339 ac_cv_sizeof_wchar_t=0
13340 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013342
Martin v. Löwis11437992002-04-12 09:54:03 +000013343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13345$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013346
13347
13348
Martin v. Löwis11437992002-04-12 09:54:03 +000013349cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013350#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013351_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013352
Michael W. Hudson54241132001-12-07 15:38:26 +000013353
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013354fi
13355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13357$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013358have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013360/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013361
13362#include <tcl.h>
13363#if TCL_UTF_MAX != 6
13364# error "NOT UCS4_TCL"
13365#endif
13366int
13367main ()
13368{
13369
13370 ;
13371 return 0;
13372}
13373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013375
13376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013378
13379 have_ucs4_tcl=yes
13380
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13384$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013385
Skip Montanaro6dead952003-09-25 14:50:04 +000013386# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013387if test "$wchar_h" = yes
13388then
13389 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13391$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013392 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013393 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013394else
13395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013397 ac_cv_wchar_t_signed=yes
13398else
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013400/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013401
13402 #include <wchar.h>
13403 int main()
13404 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013405 /* Success: exit code 0 */
13406 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013407 }
13408
13409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013410if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013411 ac_cv_wchar_t_signed=yes
13412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13416 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013417fi
13418
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013419fi
13420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13422$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423fi
13424
Georg Brandl52d168a2008-01-07 18:10:24 +000013425# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013426if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013427 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013428then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013429 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013432
Georg Brandl52d168a2008-01-07 18:10:24 +000013433else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013434 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013435fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13437$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013438
13439# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13441$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013442if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013444else
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 ac_cv_c_bigendian=unknown
13446 # See if we're dealing with a universal compiler.
13447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13448/* end confdefs.h. */
13449#ifndef __APPLE_CC__
13450 not a universal capable compiler
13451 #endif
13452 typedef int dummy;
13453
Skip Montanaro6dead952003-09-25 14:50:04 +000013454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013455if ac_fn_c_try_compile "$LINENO"; then :
13456
13457 # Check for potential -arch flags. It is not universal unless
13458 # there are at least two -arch flags with different values.
13459 ac_arch=
13460 ac_prev=
13461 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13462 if test -n "$ac_prev"; then
13463 case $ac_word in
13464 i?86 | x86_64 | ppc | ppc64)
13465 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13466 ac_arch=$ac_word
13467 else
13468 ac_cv_c_bigendian=universal
13469 break
13470 fi
13471 ;;
13472 esac
13473 ac_prev=
13474 elif test "x$ac_word" = "x-arch"; then
13475 ac_prev=arch
13476 fi
13477 done
13478fi
13479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13480 if test $ac_cv_c_bigendian = unknown; then
13481 # See if sys/param.h defines the BYTE_ORDER macro.
13482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013483/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013484#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013485 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013486
Martin v. Löwis11437992002-04-12 09:54:03 +000013487int
13488main ()
13489{
Matthias Kloseb9621712010-04-24 17:59:49 +000013490#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13491 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13492 && LITTLE_ENDIAN)
13493 bogus endian macros
13494 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013495
13496 ;
13497 return 0;
13498}
13499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013500if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013501 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013503/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013504#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013506
Martin v. Löwis11437992002-04-12 09:54:03 +000013507int
13508main ()
13509{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013510#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 not big endian
13512 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
13514 ;
13515 return 0;
13516}
13517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013518if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013519 ac_cv_c_bigendian=yes
13520else
Matthias Kloseb9621712010-04-24 17:59:49 +000013521 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013524fi
13525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13526 fi
13527 if test $ac_cv_c_bigendian = unknown; then
13528 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013530/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013531#include <limits.h>
13532
Martin v. Löwis11437992002-04-12 09:54:03 +000013533int
13534main ()
13535{
Matthias Kloseb9621712010-04-24 17:59:49 +000013536#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13537 bogus endian macros
13538 #endif
13539
Martin v. Löwis11437992002-04-12 09:54:03 +000013540 ;
13541 return 0;
13542}
13543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013544if ac_fn_c_try_compile "$LINENO"; then :
13545 # It does; now see whether it defined to _BIG_ENDIAN or not.
13546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13547/* end confdefs.h. */
13548#include <limits.h>
13549
13550int
13551main ()
13552{
13553#ifndef _BIG_ENDIAN
13554 not big endian
13555 #endif
13556
13557 ;
13558 return 0;
13559}
13560_ACEOF
13561if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013562 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013563else
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13567fi
13568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13569 fi
13570 if test $ac_cv_c_bigendian = unknown; then
13571 # Compile a test program.
13572 if test "$cross_compiling" = yes; then :
13573 # Try to guess by grepping values from an object file.
13574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13575/* end confdefs.h. */
13576short int ascii_mm[] =
13577 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13578 short int ascii_ii[] =
13579 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13580 int use_ascii (int i) {
13581 return ascii_mm[i] + ascii_ii[i];
13582 }
13583 short int ebcdic_ii[] =
13584 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13585 short int ebcdic_mm[] =
13586 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13587 int use_ebcdic (int i) {
13588 return ebcdic_mm[i] + ebcdic_ii[i];
13589 }
13590 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592int
13593main ()
13594{
13595return use_ascii (foo) == use_ebcdic (foo);
13596 ;
13597 return 0;
13598}
13599_ACEOF
13600if ac_fn_c_try_compile "$LINENO"; then :
13601 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13602 ac_cv_c_bigendian=yes
13603 fi
13604 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13605 if test "$ac_cv_c_bigendian" = unknown; then
13606 ac_cv_c_bigendian=no
13607 else
13608 # finding both strings is unlikely to happen, but who knows?
13609 ac_cv_c_bigendian=unknown
13610 fi
13611 fi
13612fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013614else
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013616/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013617$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013618int
13619main ()
13620{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013621
Matthias Kloseb9621712010-04-24 17:59:49 +000013622 /* Are we little or big endian? From Harbison&Steele. */
13623 union
13624 {
13625 long int l;
13626 char c[sizeof (long int)];
13627 } u;
13628 u.l = 1;
13629 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013630
13631 ;
13632 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013633}
Martin v. Löwis11437992002-04-12 09:54:03 +000013634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013635if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013636 ac_cv_c_bigendian=no
13637else
Matthias Kloseb9621712010-04-24 17:59:49 +000013638 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13641 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13647$as_echo "$ac_cv_c_bigendian" >&6; }
13648 case $ac_cv_c_bigendian in #(
13649 yes)
13650 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13651;; #(
13652 no)
13653 ;; #(
13654 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013655
Matthias Kloseb9621712010-04-24 17:59:49 +000013656$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 ;; #(
13659 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013660 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013661 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013663
Michael W. Hudson54241132001-12-07 15:38:26 +000013664
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013665# ABI version string for Python extension modules. This appears between the
13666# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13667# from the following attributes which affect the ABI of this Python build (in
13668# this order):
13669#
13670# * The Python implementation (always 'cpython-' for us)
13671# * The major and minor version numbers
13672# * --with-pydebug (adds a 'd')
13673# * --with-pymalloc (adds a 'm')
13674# * --with-wide-unicode (adds a 'u')
13675#
13676# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013677# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13678# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013679
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13681$as_echo_n "checking ABIFLAGS... " >&6; }
13682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13683$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13685$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013686SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13688$as_echo "$SOABI" >&6; }
13689
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13691$as_echo_n "checking LDVERSION... " >&6; }
13692LDVERSION='$(VERSION)$(ABIFLAGS)'
13693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13694$as_echo "$LDVERSION" >&6; }
13695
doko@python.org87421192013-01-26 11:39:31 +010013696
13697LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13698
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
Stefan Krah8c8adf62013-01-17 20:41:56 +010013733
13734cat >>confdefs.h <<_ACEOF
13735#define SHLIB_EXT "$SO"
13736_ACEOF
13737
13738
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013739# Check whether right shifting a negative integer extends the sign bit
13740# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13742$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013743if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013745else
Martin v. Löwis11437992002-04-12 09:54:03 +000013746
Matthias Kloseb9621712010-04-24 17:59:49 +000013747if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013748 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013749else
Matthias Kloseb9621712010-04-24 17:59:49 +000013750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013751/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013752
13753int main()
13754{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013755 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013756}
13757
Martin v. Löwis11437992002-04-12 09:54:03 +000013758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013759if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013760 ac_cv_rshift_extends_sign=yes
13761else
Matthias Kloseb9621712010-04-24 17:59:49 +000013762 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013763fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13765 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013766fi
13767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768fi
13769
Matthias Kloseb9621712010-04-24 17:59:49 +000013770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13771$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013772if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013773then
Martin v. Löwis11437992002-04-12 09:54:03 +000013774
Matthias Kloseb9621712010-04-24 17:59:49 +000013775$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013776
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013777fi
13778
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013779# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13781$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013782if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013783 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013784else
Martin v. Löwis11437992002-04-12 09:54:03 +000013785
Matthias Kloseb9621712010-04-24 17:59:49 +000013786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013787/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013788#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013789int
13790main ()
13791{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013792
13793 FILE *f = fopen("/dev/null", "r");
13794 flockfile(f);
13795 getc_unlocked(f);
13796 funlockfile(f);
13797
Martin v. Löwis11437992002-04-12 09:54:03 +000013798 ;
13799 return 0;
13800}
13801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013802if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013803 ac_cv_have_getc_unlocked=yes
13804else
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 ac_cv_have_getc_unlocked=no
13806fi
13807rm -f core conftest.err conftest.$ac_objext \
13808 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810
Matthias Kloseb9621712010-04-24 17:59:49 +000013811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13812$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013813if test "$ac_cv_have_getc_unlocked" = yes
13814then
Martin v. Löwis11437992002-04-12 09:54:03 +000013815
Matthias Kloseb9621712010-04-24 17:59:49 +000013816$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013817
13818fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013819
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013820# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013821# save the value of LIBS so we don't actually link Python with readline
13822LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013823
Gregory P. Smith18820942008-09-07 06:24:49 +000013824# On some systems we need to link readline to a termcap compatible
13825# library. NOTE: Keep the precedence of listed libraries synchronised
13826# with setup.py.
13827py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13829$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013830for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013831 if test -z "$py_libtermcap"; then
13832 READLINE_LIBS="-lreadline"
13833 else
13834 READLINE_LIBS="-lreadline -l$py_libtermcap"
13835 fi
13836 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013838/* end confdefs.h. */
13839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013840/* Override any GCC internal prototype to avoid an error.
13841 Use char because int might match the return type of a GCC
13842 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013843#ifdef __cplusplus
13844extern "C"
13845#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013846char readline ();
13847int
13848main ()
13849{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013850return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013851 ;
13852 return 0;
13853}
13854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013855if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013856 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013858rm -f core conftest.err conftest.$ac_objext \
13859 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013860 if test $py_cv_lib_readline = yes; then
13861 break
13862 fi
13863done
13864# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13865#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013866if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13868$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013869else
Matthias Kloseb9621712010-04-24 17:59:49 +000013870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13871$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013872
Matthias Kloseb9621712010-04-24 17:59:49 +000013873$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013874
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013875fi
13876
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013877# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13879$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013880if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013882else
13883 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013884LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013886/* end confdefs.h. */
13887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888/* Override any GCC internal prototype to avoid an error.
13889 Use char because int might match the return type of a GCC
13890 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013891#ifdef __cplusplus
13892extern "C"
13893#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013894char rl_callback_handler_install ();
13895int
13896main ()
13897{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013899 ;
13900 return 0;
13901}
13902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013903if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013904 ac_cv_lib_readline_rl_callback_handler_install=yes
13905else
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013908rm -f core conftest.err conftest.$ac_objext \
13909 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013910LIBS=$ac_check_lib_save_LIBS
13911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13913$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013914if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013915
Matthias Kloseb9621712010-04-24 17:59:49 +000013916$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013917
13918fi
13919
13920
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013921# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013923/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013924#include <readline/readline.h>
13925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013926if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013927 have_readline=yes
13928else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013929 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013930
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013931fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013932rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013933if test $have_readline = yes
13934then
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013936/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013937#include <readline/readline.h>
13938
13939_ACEOF
13940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013942
Matthias Kloseb9621712010-04-24 17:59:49 +000013943$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013944
13945fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013946rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013947
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013949/* end confdefs.h. */
13950#include <readline/readline.h>
13951
13952_ACEOF
13953if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013955
Matthias Kloseb9621712010-04-24 17:59:49 +000013956$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013957
13958fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013959rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013960
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013961fi
13962
Martin v. Löwis0daad592001-09-30 21:09:59 +000013963# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13965$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013966if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013968else
Martin v. Löwis11437992002-04-12 09:54:03 +000013969 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013970LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013974/* Override any GCC internal prototype to avoid an error.
13975 Use char because int might match the return type of a GCC
13976 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013977#ifdef __cplusplus
13978extern "C"
13979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013980char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013981int
13982main ()
13983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013984return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013985 ;
13986 return 0;
13987}
13988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013989if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013990 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013991else
Matthias Kloseb9621712010-04-24 17:59:49 +000013992 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013994rm -f core conftest.err conftest.$ac_objext \
13995 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013996LIBS=$ac_check_lib_save_LIBS
13997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13999$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014000if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014001
Matthias Kloseb9621712010-04-24 17:59:49 +000014002$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014003
Martin v. Löwis0daad592001-09-30 21:09:59 +000014004fi
14005
Michael W. Hudson54241132001-12-07 15:38:26 +000014006
Thomas Wouters89d996e2007-09-08 17:39:28 +000014007# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14009$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014010if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014011 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014012else
14013 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014014LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014016/* end confdefs.h. */
14017
14018/* Override any GCC internal prototype to avoid an error.
14019 Use char because int might match the return type of a GCC
14020 builtin and then its argument prototype would still apply. */
14021#ifdef __cplusplus
14022extern "C"
14023#endif
14024char rl_completion_display_matches_hook ();
14025int
14026main ()
14027{
14028return rl_completion_display_matches_hook ();
14029 ;
14030 return 0;
14031}
14032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014033if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014034 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14035else
Matthias Kloseb9621712010-04-24 17:59:49 +000014036 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014038rm -f core conftest.err conftest.$ac_objext \
14039 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014040LIBS=$ac_check_lib_save_LIBS
14041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14043$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014044if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014045
Matthias Kloseb9621712010-04-24 17:59:49 +000014046$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014047
14048fi
14049
14050
Martin v. Löwis0daad592001-09-30 21:09:59 +000014051# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14053$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014054if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014055 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014056else
Martin v. Löwis11437992002-04-12 09:54:03 +000014057 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014058LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062/* Override any GCC internal prototype to avoid an error.
14063 Use char because int might match the return type of a GCC
14064 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014065#ifdef __cplusplus
14066extern "C"
14067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014068char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014069int
14070main ()
14071{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 ;
14074 return 0;
14075}
14076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014077if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014079else
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014082rm -f core conftest.err conftest.$ac_objext \
14083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014084LIBS=$ac_check_lib_save_LIBS
14085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14087$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014088if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014089
Matthias Kloseb9621712010-04-24 17:59:49 +000014090$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014091
Guido van Rossum353ae582001-07-10 16:45:32 +000014092fi
14093
Jack Jansendd19cf82001-12-06 22:36:17 +000014094
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014095# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014097/* end confdefs.h. */
14098#include <readline/readline.h>
14099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014100if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014101 have_readline=yes
14102else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014103 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014104
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014105fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014106rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014107if test $have_readline = yes
14108then
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014110/* end confdefs.h. */
14111#include <readline/readline.h>
14112
14113_ACEOF
14114if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014116
Matthias Kloseb9621712010-04-24 17:59:49 +000014117$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014118
14119fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014120rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014121
14122fi
14123
Martin v. Löwis82bca632006-02-10 20:49:30 +000014124# End of readline checks: restore LIBS
14125LIBS=$LIBS_no_readline
14126
Matthias Kloseb9621712010-04-24 17:59:49 +000014127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14128$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014129if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014131else
Martin v. Löwis11437992002-04-12 09:54:03 +000014132
Matthias Kloseb9621712010-04-24 17:59:49 +000014133if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014134 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014135else
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014137/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014138
14139int main()
14140{
14141 int val1 = nice(1);
14142 if (val1 != -1 && val1 == nice(2))
14143 exit(0);
14144 exit(1);
14145}
14146
Martin v. Löwis11437992002-04-12 09:54:03 +000014147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014148if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014149 ac_cv_broken_nice=yes
14150else
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014152fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14154 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014155fi
14156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014157fi
14158
Matthias Kloseb9621712010-04-24 17:59:49 +000014159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14160$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014161if test "$ac_cv_broken_nice" = yes
14162then
Martin v. Löwis11437992002-04-12 09:54:03 +000014163
Matthias Kloseb9621712010-04-24 17:59:49 +000014164$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014165
14166fi
14167
Matthias Kloseb9621712010-04-24 17:59:49 +000014168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14169$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014170if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014172else
Matthias Kloseb9621712010-04-24 17:59:49 +000014173 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014174 ac_cv_broken_poll=no
14175else
Matthias Kloseb9621712010-04-24 17:59:49 +000014176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014177/* end confdefs.h. */
14178
14179#include <poll.h>
14180
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014181int main()
14182{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014183 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014185
14186 close (42);
14187
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014188 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014189 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014190 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014191 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014192 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014193 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014194 return 1;
14195}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014196
14197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014198if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014199 ac_cv_broken_poll=yes
14200else
Matthias Kloseb9621712010-04-24 17:59:49 +000014201 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14204 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014207fi
14208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14210$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014211if test "$ac_cv_broken_poll" = yes
14212then
14213
Matthias Kloseb9621712010-04-24 17:59:49 +000014214$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014215
14216fi
14217
Brett Cannon43802422005-02-10 20:48:03 +000014218# 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 +000014219# (which is not required by ISO C or UNIX spec) and/or if we support
14220# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014221ac_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 +000014222#include <$ac_cv_struct_tm>
14223
Matthias Kloseb9621712010-04-24 17:59:49 +000014224"
Victor Stinnere0be4232011-10-25 13:06:09 +020014225if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014226
14227cat >>confdefs.h <<_ACEOF
14228#define HAVE_STRUCT_TM_TM_ZONE 1
14229_ACEOF
14230
14231
14232fi
14233
14234if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014237
14238else
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14240"
Victor Stinnere0be4232011-10-25 13:06:09 +020014241if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243else
Matthias Kloseb9621712010-04-24 17:59:49 +000014244 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014245fi
14246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014248#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014249_ACEOF
14250
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14252$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014253if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014254 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014255else
Matthias Kloseb9621712010-04-24 17:59:49 +000014256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014257/* end confdefs.h. */
14258#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014259#if !HAVE_DECL_TZNAME
14260extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014261#endif
14262
14263int
14264main ()
14265{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014267 ;
14268 return 0;
14269}
14270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014271if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014272 ac_cv_var_tzname=yes
14273else
Matthias Kloseb9621712010-04-24 17:59:49 +000014274 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014276rm -f core conftest.err conftest.$ac_objext \
14277 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14280$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014281 if test $ac_cv_var_tzname = yes; then
14282
Matthias Kloseb9621712010-04-24 17:59:49 +000014283$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014284
14285 fi
14286fi
14287
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014288
Martin v. Löwis1d459062005-03-14 21:23:33 +000014289# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14291$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014292if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014294else
14295
Matthias Kloseb9621712010-04-24 17:59:49 +000014296if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014297 ac_cv_working_tzset=no
14298else
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014300/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014301
14302#include <stdlib.h>
14303#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014304#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014305
14306#if HAVE_TZNAME
14307extern char *tzname[];
14308#endif
14309
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014310int main()
14311{
Brett Cannon18367812003-09-19 00:59:16 +000014312 /* Note that we need to ensure that not only does tzset(3)
14313 do 'something' with localtime, but it works as documented
14314 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014315 This includes making sure that tzname is set properly if
14316 tm->tm_zone does not exist since it is the alternative way
14317 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014318
14319 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014320 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014321 */
14322
Martin v. Löwis1d459062005-03-14 21:23:33 +000014323 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014324 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14325
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014326 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014327 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014328 if (localtime(&groundhogday)->tm_hour != 0)
14329 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014330#if HAVE_TZNAME
14331 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14332 if (strcmp(tzname[0], "UTC") ||
14333 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14334 exit(1);
14335#endif
Brett Cannon18367812003-09-19 00:59:16 +000014336
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014337 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014338 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014339 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014340 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014341#if HAVE_TZNAME
14342 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14343 exit(1);
14344#endif
Brett Cannon18367812003-09-19 00:59:16 +000014345
14346 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14347 tzset();
14348 if (localtime(&groundhogday)->tm_hour != 11)
14349 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014350#if HAVE_TZNAME
14351 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14352 exit(1);
14353#endif
14354
14355#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014356 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14357 exit(1);
14358 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14359 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014360#endif
Brett Cannon18367812003-09-19 00:59:16 +000014361
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014362 exit(0);
14363}
14364
14365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014366if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014367 ac_cv_working_tzset=yes
14368else
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14372 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014373fi
14374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014375fi
14376
Matthias Kloseb9621712010-04-24 17:59:49 +000014377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14378$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014379if test "$ac_cv_working_tzset" = yes
14380then
14381
Matthias Kloseb9621712010-04-24 17:59:49 +000014382$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014383
14384fi
14385
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014386# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14388$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014389if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014391else
Matthias Kloseb9621712010-04-24 17:59:49 +000014392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014393/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014394#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014395int
14396main ()
14397{
14398
14399struct stat st;
14400st.st_mtim.tv_nsec = 1;
14401
14402 ;
14403 return 0;
14404}
14405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014407 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014408else
Matthias Kloseb9621712010-04-24 17:59:49 +000014409 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14412fi
14413
Matthias Kloseb9621712010-04-24 17:59:49 +000014414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14415$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014416if test "$ac_cv_stat_tv_nsec" = yes
14417then
14418
Matthias Kloseb9621712010-04-24 17:59:49 +000014419$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014420
14421fi
14422
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014423# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14425$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014426if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014427 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014428else
Matthias Kloseb9621712010-04-24 17:59:49 +000014429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014430/* end confdefs.h. */
14431#include <sys/stat.h>
14432int
14433main ()
14434{
14435
14436struct stat st;
14437st.st_mtimespec.tv_nsec = 1;
14438
14439 ;
14440 return 0;
14441}
14442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014444 ac_cv_stat_tv_nsec2=yes
14445else
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14449fi
14450
Matthias Kloseb9621712010-04-24 17:59:49 +000014451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14452$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014453if test "$ac_cv_stat_tv_nsec2" = yes
14454then
14455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014457
14458fi
14459
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014460ac_save_cppflags="$CPPFLAGS"
14461CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014462# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14464$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014465if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014467else
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014469/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014470#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014471int
14472main ()
14473{
Jack Jansen666b1e72001-10-31 12:11:48 +000014474
14475 int rtn;
14476 rtn = mvwdelch(0,0,0);
14477
Martin v. Löwis11437992002-04-12 09:54:03 +000014478 ;
14479 return 0;
14480}
14481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014482if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014483 ac_cv_mvwdelch_is_expression=yes
14484else
Matthias Kloseb9621712010-04-24 17:59:49 +000014485 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14488fi
14489
Matthias Kloseb9621712010-04-24 17:59:49 +000014490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14491$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014492
14493if test "$ac_cv_mvwdelch_is_expression" = yes
14494then
Martin v. Löwis11437992002-04-12 09:54:03 +000014495
Matthias Kloseb9621712010-04-24 17:59:49 +000014496$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014497
14498fi
14499
Matthias Kloseb9621712010-04-24 17:59:49 +000014500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14501$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014502if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014503 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014504else
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014506/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014507#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014508int
14509main ()
14510{
Jack Jansen666b1e72001-10-31 12:11:48 +000014511
14512 WINDOW *w;
14513 w->_flags = 0;
14514
Martin v. Löwis11437992002-04-12 09:54:03 +000014515 ;
14516 return 0;
14517}
14518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014519if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014520 ac_cv_window_has_flags=yes
14521else
Matthias Kloseb9621712010-04-24 17:59:49 +000014522 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14525fi
14526
Matthias Kloseb9621712010-04-24 17:59:49 +000014527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14528$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014529
Jack Jansen666b1e72001-10-31 12:11:48 +000014530
14531if test "$ac_cv_window_has_flags" = yes
14532then
Martin v. Löwis11437992002-04-12 09:54:03 +000014533
Matthias Kloseb9621712010-04-24 17:59:49 +000014534$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014535
14536fi
14537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14539$as_echo_n "checking for is_term_resized... " >&6; }
14540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014541/* end confdefs.h. */
14542#include <curses.h>
14543int
14544main ()
14545{
14546void *x=is_term_resized
14547 ;
14548 return 0;
14549}
14550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014552
Matthias Kloseb9621712010-04-24 17:59:49 +000014553$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014554
Matthias Kloseb159a552010-04-25 21:00:44 +000014555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014556$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014557else
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14559$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014560
14561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14563
Matthias Kloseb9621712010-04-24 17:59:49 +000014564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14565$as_echo_n "checking for resize_term... " >&6; }
14566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014567/* end confdefs.h. */
14568#include <curses.h>
14569int
14570main ()
14571{
14572void *x=resize_term
14573 ;
14574 return 0;
14575}
14576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014577if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014578
Matthias Kloseb9621712010-04-24 17:59:49 +000014579$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014580
Matthias Kloseb159a552010-04-25 21:00:44 +000014581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014582$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014583else
Matthias Kloseb9621712010-04-24 17:59:49 +000014584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14585$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014586
14587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14589
Matthias Kloseb9621712010-04-24 17:59:49 +000014590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14591$as_echo_n "checking for resizeterm... " >&6; }
14592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014593/* end confdefs.h. */
14594#include <curses.h>
14595int
14596main ()
14597{
14598void *x=resizeterm
14599 ;
14600 return 0;
14601}
14602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014603if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014604
Matthias Kloseb9621712010-04-24 17:59:49 +000014605$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014606
Matthias Kloseb159a552010-04-25 21:00:44 +000014607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014608$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014609else
Matthias Kloseb9621712010-04-24 17:59:49 +000014610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14611$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014612
14613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014615# last curses configure check
14616CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14619$as_echo "$as_me: checking for device files" >&6;}
14620
14621if test "x$cross_compiling" = xyes; then
14622 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14624$as_echo_n "checking for /dev/ptmx... " >&6; }
14625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14626$as_echo "not set" >&6; }
14627 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14628 fi
14629 if test "${ac_cv_file__dev_ptc+set}" != set; then
14630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14631$as_echo_n "checking for /dev/ptc... " >&6; }
14632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14633$as_echo "not set" >&6; }
14634 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14635 fi
14636fi
14637
Matthias Kloseb9621712010-04-24 17:59:49 +000014638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14639$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014640if ${ac_cv_file__dev_ptmx+:} false; then :
14641 $as_echo_n "(cached) " >&6
14642else
14643 test "$cross_compiling" = yes &&
14644 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14645if test -r "/dev/ptmx"; then
14646 ac_cv_file__dev_ptmx=yes
14647else
14648 ac_cv_file__dev_ptmx=no
14649fi
14650fi
14651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14652$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14653if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014654
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014655fi
14656
14657if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014658
Matthias Kloseb9621712010-04-24 17:59:49 +000014659$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014660
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14663$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014664if ${ac_cv_file__dev_ptc+:} false; then :
14665 $as_echo_n "(cached) " >&6
14666else
14667 test "$cross_compiling" = yes &&
14668 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14669if test -r "/dev/ptc"; then
14670 ac_cv_file__dev_ptc=yes
14671else
14672 ac_cv_file__dev_ptc=no
14673fi
14674fi
14675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14676$as_echo "$ac_cv_file__dev_ptc" >&6; }
14677if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014678
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014679fi
14680
14681if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014682
Matthias Kloseb9621712010-04-24 17:59:49 +000014683$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014684
Neal Norwitz865400f2003-03-21 01:42:58 +000014685fi
14686
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014687if test "$have_long_long" = yes
14688then
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14690$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014691 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014693else
Matthias Kloseb9621712010-04-24 17:59:49 +000014694 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014695 ac_cv_have_long_long_format="cross -- assuming no"
14696 if test x$GCC = xyes; then
14697 save_CFLAGS=$CFLAGS
14698 CFLAGS="$CFLAGS -Werror -Wformat"
14699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14700/* end confdefs.h. */
14701
14702 #include <stdio.h>
14703 #include <stddef.h>
14704
14705int
14706main ()
14707{
14708
14709 char *buffer;
14710 sprintf(buffer, "%lld", (long long)123);
14711 sprintf(buffer, "%lld", (long long)-123);
14712 sprintf(buffer, "%llu", (unsigned long long)123);
14713
14714 ;
14715 return 0;
14716}
14717_ACEOF
14718if ac_fn_c_try_compile "$LINENO"; then :
14719 ac_cv_have_long_long_format=yes
14720
14721fi
14722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14723 CFLAGS=$save_CFLAGS
14724 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014725else
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014727/* end confdefs.h. */
14728
14729 #include <stdio.h>
14730 #include <stddef.h>
14731 #include <string.h>
14732
14733 #ifdef HAVE_SYS_TYPES_H
14734 #include <sys/types.h>
14735 #endif
14736
14737 int main()
14738 {
14739 char buffer[256];
14740
14741 if (sprintf(buffer, "%lld", (long long)123) < 0)
14742 return 1;
14743 if (strcmp(buffer, "123"))
14744 return 1;
14745
14746 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14747 return 1;
14748 if (strcmp(buffer, "-123"))
14749 return 1;
14750
14751 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14752 return 1;
14753 if (strcmp(buffer, "123"))
14754 return 1;
14755
14756 return 0;
14757 }
14758
14759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014760if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014761 ac_cv_have_long_long_format=yes
14762else
Matthias Kloseb9621712010-04-24 17:59:49 +000014763 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14766 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014767fi
14768
14769
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014770fi
14771
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14773$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014774fi
14775
Mark Dickinson89d7d412009-12-31 20:50:59 +000014776if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014777then
14778
Matthias Kloseb9621712010-04-24 17:59:49 +000014779$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014780
14781fi
14782
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014783if test $ac_sys_system = Darwin
14784then
14785 LIBS="$LIBS -framework CoreFoundation"
14786fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014787
Matthias Kloseb9621712010-04-24 17:59:49 +000014788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14789$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014790if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014792else
Matthias Kloseb9621712010-04-24 17:59:49 +000014793 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014794 ac_cv_have_size_t_format="cross -- assuming yes"
14795
Thomas Wouters477c8d52006-05-27 19:21:47 +000014796else
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014798/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014799
Thomas Wouters477c8d52006-05-27 19:21:47 +000014800#include <stdio.h>
14801#include <stddef.h>
14802#include <string.h>
14803
Christian Heimes2c181612007-12-17 20:04:13 +000014804#ifdef HAVE_SYS_TYPES_H
14805#include <sys/types.h>
14806#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014807
14808#ifdef HAVE_SSIZE_T
14809typedef ssize_t Py_ssize_t;
14810#elif SIZEOF_VOID_P == SIZEOF_LONG
14811typedef long Py_ssize_t;
14812#else
14813typedef int Py_ssize_t;
14814#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014815
Christian Heimes2c181612007-12-17 20:04:13 +000014816int main()
14817{
14818 char buffer[256];
14819
Thomas Wouters477c8d52006-05-27 19:21:47 +000014820 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14821 return 1;
14822
Thomas Wouters89f507f2006-12-13 04:49:30 +000014823 if (strcmp(buffer, "123"))
14824 return 1;
14825
14826 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14827 return 1;
14828
14829 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014830 return 1;
14831
14832 return 0;
14833}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014834
Thomas Wouters477c8d52006-05-27 19:21:47 +000014835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014836if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014837 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014838else
Matthias Kloseb9621712010-04-24 17:59:49 +000014839 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14842 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014843fi
14844
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14847$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014848if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014851
14852fi
14853
Matthias Kloseb9621712010-04-24 17:59:49 +000014854ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014855#ifdef HAVE_SYS_TYPES_H
14856#include <sys/types.h>
14857#endif
14858#ifdef HAVE_SYS_SOCKET_H
14859#include <sys/socket.h>
14860#endif
14861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862"
Victor Stinnere0be4232011-10-25 13:06:09 +020014863if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014864
Martin v. Löwis11437992002-04-12 09:54:03 +000014865else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014866
Matthias Kloseb9621712010-04-24 17:59:49 +000014867$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014868
14869fi
14870
Michael W. Hudson54241132001-12-07 15:38:26 +000014871
Matthias Kloseb9621712010-04-24 17:59:49 +000014872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14873$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014874if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014876else
Matthias Kloseb9621712010-04-24 17:59:49 +000014877 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014878 ac_cv_broken_mbstowcs=no
14879else
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014881/* end confdefs.h. */
14882
Stefan Krah19c21392012-11-22 23:47:32 +010014883#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014884#include<stdlib.h>
14885int main() {
14886 size_t len = -1;
14887 const char *str = "text";
14888 len = mbstowcs(NULL, str, 0);
14889 return (len != 4);
14890}
14891
14892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014893if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014894 ac_cv_broken_mbstowcs=no
14895else
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014898rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14899 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014900fi
14901
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014902fi
14903
Matthias Kloseb9621712010-04-24 17:59:49 +000014904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14905$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014906if test "$ac_cv_broken_mbstowcs" = yes
14907then
14908
Matthias Kloseb9621712010-04-24 17:59:49 +000014909$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014910
14911fi
14912
Antoine Pitroub52ec782009-01-25 16:34:23 +000014913# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14915$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014916
14917# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014918if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014919 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014920if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014921then
14922
Matthias Kloseb9621712010-04-24 17:59:49 +000014923$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014924
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14926$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014927fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014928if test "$withval" = no
14929then
14930
14931$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14932
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14934$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014935fi
14936
Antoine Pitrou042b1282010-08-13 21:15:58 +000014937else
14938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14939$as_echo "no value specified" >&6; }
14940fi
14941
Antoine Pitroub52ec782009-01-25 16:34:23 +000014942
Matthias Kloseb17289e2012-03-15 19:51:34 +010014943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14944$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14945if ${ac_cv_computed_gotos+:} false; then :
14946 $as_echo_n "(cached) " >&6
14947else
14948 if test "$cross_compiling" = yes; then :
14949 if test "${with_computed_gotos+set}" = set; then
14950 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14951 else
14952 ac_cv_computed_gotos=no
14953 fi
14954else
14955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14956/* end confdefs.h. */
14957
14958int main(int argc, char **argv)
14959{
14960 static void *targets[1] = { &&LABEL1 };
14961 goto LABEL2;
14962LABEL1:
14963 return 0;
14964LABEL2:
14965 goto *targets[0];
14966 return 1;
14967}
14968
14969_ACEOF
14970if ac_fn_c_try_run "$LINENO"; then :
14971 ac_cv_computed_gotos=yes
14972else
14973 ac_cv_computed_gotos=no
14974fi
14975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14976 conftest.$ac_objext conftest.beam conftest.$ac_ext
14977fi
14978
14979fi
14980
14981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14982$as_echo "$ac_cv_computed_gotos" >&6; }
14983case "$ac_cv_computed_gotos" in yes*)
14984
14985$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14986
14987esac
14988
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014989case $ac_sys_system in
14990AIX*)
14991
14992$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14993 ;;
14994esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014995
Michael W. Hudson54241132001-12-07 15:38:26 +000014996
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014997
14998
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014999for h in `(cd $srcdir;echo Python/thread_*.h)`
15000do
15001 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15002done
15003
Michael W. Hudson54241132001-12-07 15:38:26 +000015004
Neal Norwitzd24499d2005-12-18 21:36:39 +000015005SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15007$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015008for dir in $SRCDIRS; do
15009 if test ! -d $dir; then
15010 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015011 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015012done
Matthias Kloseb9621712010-04-24 17:59:49 +000015013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15014$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015015
Stefan Krah1919b7e2012-03-21 18:25:23 +010015016# Availability of -O2:
15017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15018$as_echo_n "checking for -O2... " >&6; }
15019saved_cflags="$CFLAGS"
15020CFLAGS="-O2"
15021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15022/* end confdefs.h. */
15023
15024int
15025main ()
15026{
15027
15028
15029 ;
15030 return 0;
15031}
15032_ACEOF
15033if ac_fn_c_try_compile "$LINENO"; then :
15034 have_O2=yes
15035else
15036 have_O2=no
15037fi
15038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15040$as_echo "$have_O2" >&6; }
15041CFLAGS="$saved_cflags"
15042
15043# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15044# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15046$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15047saved_cflags="$CFLAGS"
15048CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15049if test "$have_O2" = no; then
15050 CFLAGS=""
15051fi
15052if test "$cross_compiling" = yes; then :
15053 have_glibc_memmove_bug=undefined
15054else
15055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056/* end confdefs.h. */
15057
15058#include <stdio.h>
15059#include <stdlib.h>
15060#include <string.h>
15061void foo(void *p, void *q) { memmove(p, q, 19); }
15062int main() {
15063 char a[32] = "123456789000000000";
15064 foo(&a[9], a);
15065 if (strcmp(a, "123456789123456789000000000") != 0)
15066 return 1;
15067 foo(a, &a[9]);
15068 if (strcmp(a, "123456789000000000") != 0)
15069 return 1;
15070 return 0;
15071}
15072
15073_ACEOF
15074if ac_fn_c_try_run "$LINENO"; then :
15075 have_glibc_memmove_bug=no
15076else
15077 have_glibc_memmove_bug=yes
15078fi
15079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15080 conftest.$ac_objext conftest.beam conftest.$ac_ext
15081fi
15082
15083CFLAGS="$saved_cflags"
15084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15085$as_echo "$have_glibc_memmove_bug" >&6; }
15086if test "$have_glibc_memmove_bug" = yes; then
15087
15088$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15089
15090fi
15091
15092if test "$have_gcc_asm_for_x87" = yes; then
15093 # Some versions of gcc miscompile inline asm:
15094 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15095 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15096 case $CC in
15097 *gcc*)
15098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15099$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15100 saved_cflags="$CFLAGS"
15101 CFLAGS="-O2"
15102 if test "$cross_compiling" = yes; then :
15103 have_ipa_pure_const_bug=undefined
15104else
15105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15106/* end confdefs.h. */
15107
15108 __attribute__((noinline)) int
15109 foo(int *p) {
15110 int r;
15111 asm ( "movl \$6, (%1)\n\t"
15112 "xorl %0, %0\n\t"
15113 : "=r" (r) : "r" (p) : "memory"
15114 );
15115 return r;
15116 }
15117 int main() {
15118 int p = 8;
15119 if ((foo(&p) ? : p) != 6)
15120 return 1;
15121 return 0;
15122 }
15123
15124_ACEOF
15125if ac_fn_c_try_run "$LINENO"; then :
15126 have_ipa_pure_const_bug=no
15127else
15128 have_ipa_pure_const_bug=yes
15129fi
15130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15131 conftest.$ac_objext conftest.beam conftest.$ac_ext
15132fi
15133
15134 CFLAGS="$saved_cflags"
15135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15136$as_echo "$have_ipa_pure_const_bug" >&6; }
15137 if test "$have_ipa_pure_const_bug" = yes; then
15138
15139$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15140
15141 fi
15142 ;;
15143 esac
15144fi
15145
Guido van Rossum627b2d71993-12-24 10:39:16 +000015146# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015147ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015148
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015149ac_config_files="$ac_config_files Modules/ld_so_aix"
15150
Martin v. Löwis11437992002-04-12 09:54:03 +000015151cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015152# This file is a shell script that caches the results of configure
15153# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015154# scripts and configure runs, see configure's option --config-cache.
15155# It is not useful on other systems. If it contains results you don't
15156# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015157#
Martin v. Löwis11437992002-04-12 09:54:03 +000015158# config.status only pays attention to the cache file if you give it
15159# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015160#
Skip Montanaro6dead952003-09-25 14:50:04 +000015161# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015162# loading this file, other *unset* `ac_cv_foo' will be assigned the
15163# following values.
15164
15165_ACEOF
15166
Guido van Rossumf78abae1997-01-21 22:02:36 +000015167# The following way of writing the cache mishandles newlines in values,
15168# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015169# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015170# Ultrix sh set writes to stderr and can't be redirected directly,
15171# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172(
15173 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15174 eval ac_val=\$$ac_var
15175 case $ac_val in #(
15176 *${as_nl}*)
15177 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015178 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15179$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180 esac
15181 case $ac_var in #(
15182 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15184 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185 esac ;;
15186 esac
15187 done
15188
Martin v. Löwis11437992002-04-12 09:54:03 +000015189 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15191 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015192 # `set' does not quote correctly, so add quotes: double-quote
15193 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015194 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015195 "s/'/'\\\\''/g;
15196 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015197 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015198 *)
15199 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202 esac |
15203 sort
15204) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015206 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015209 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15210 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15212 :end' >>confcache
15213if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15214 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015215 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015216 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15217$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015218 if test ! -f "$cache_file" || test -h "$cache_file"; then
15219 cat confcache >"$cache_file"
15220 else
15221 case $cache_file in #(
15222 */* | ?:*)
15223 mv -f confcache "$cache_file"$$ &&
15224 mv -f "$cache_file"$$ "$cache_file" ;; #(
15225 *)
15226 mv -f confcache "$cache_file" ;;
15227 esac
15228 fi
15229 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015230 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015231 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15232$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015233 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015234fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015235rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015236
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015237test "x$prefix" = xNONE && prefix=$ac_default_prefix
15238# Let make expand exec_prefix.
15239test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015240
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015241DEFS=-DHAVE_CONFIG_H
15242
Skip Montanaro6dead952003-09-25 14:50:04 +000015243ac_libobjs=
15244ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015245U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015246for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15247 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015248 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015249 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015250 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15251 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015252 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15253 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015254done
15255LIBOBJS=$ac_libobjs
15256
15257LTLIBOBJS=$ac_ltlibobjs
15258
15259
Martin v. Löwis11437992002-04-12 09:54:03 +000015260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261
Victor Stinnere0be4232011-10-25 13:06:09 +020015262: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015263ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015264ac_clean_files_save=$ac_clean_files
15265ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015266{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15267$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15268as_write_fail=0
15269cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015270#! $SHELL
15271# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015272# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015273# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015274# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015275
Martin v. Löwis11437992002-04-12 09:54:03 +000015276debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015277ac_cs_recheck=false
15278ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015279
Matthias Kloseb9621712010-04-24 17:59:49 +000015280SHELL=\${CONFIG_SHELL-$SHELL}
15281export SHELL
15282_ASEOF
15283cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15284## -------------------- ##
15285## M4sh Initialization. ##
15286## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015288# Be more Bourne compatible
15289DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015290if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 emulate sh
15292 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015293 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015294 # is contrary to our usage. Disable this feature.
15295 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015297else
Matthias Kloseb9621712010-04-24 17:59:49 +000015298 case `(set -o) 2>/dev/null` in #(
15299 *posix*) :
15300 set -o posix ;; #(
15301 *) :
15302 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015303esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015304fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015305
15306
Matthias Kloseb9621712010-04-24 17:59:49 +000015307as_nl='
15308'
15309export as_nl
15310# Printing a long string crashes Solaris 7 /usr/bin/printf.
15311as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15312as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15313as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15314# Prefer a ksh shell builtin over an external printf program on Solaris,
15315# but without wasting forks for bash or zsh.
15316if test -z "$BASH_VERSION$ZSH_VERSION" \
15317 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15318 as_echo='print -r --'
15319 as_echo_n='print -rn --'
15320elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15321 as_echo='printf %s\n'
15322 as_echo_n='printf %s'
15323else
15324 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15325 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15326 as_echo_n='/usr/ucb/echo -n'
15327 else
15328 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15329 as_echo_n_body='eval
15330 arg=$1;
15331 case $arg in #(
15332 *"$as_nl"*)
15333 expr "X$arg" : "X\\(.*\\)$as_nl";
15334 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15335 esac;
15336 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15337 '
15338 export as_echo_n_body
15339 as_echo_n='sh -c $as_echo_n_body as_echo'
15340 fi
15341 export as_echo_body
15342 as_echo='sh -c $as_echo_body as_echo'
15343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015344
15345# The user is always right.
15346if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 PATH_SEPARATOR=:
15348 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15349 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15350 PATH_SEPARATOR=';'
15351 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354
15355# IFS
15356# We need space, tab and new line, in precisely that order. Quoting is
15357# there to prevent editors from complaining about space-tab.
15358# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15359# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015360IFS=" "" $as_nl"
15361
15362# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015363as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015364case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015365 *[\\/]* ) as_myself=$0 ;;
15366 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015367for as_dir in $PATH
15368do
15369 IFS=$as_save_IFS
15370 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015371 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15372 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015373IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375 ;;
15376esac
15377# We did not find ourselves, most probably we were run as `sh COMMAND'
15378# in which case we are not to be found in the path.
15379if test "x$as_myself" = x; then
15380 as_myself=$0
15381fi
15382if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015383 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15384 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015385fi
15386
Matthias Kloseb9621712010-04-24 17:59:49 +000015387# Unset variables that we do not need and which cause bugs (e.g. in
15388# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15389# suppresses any "Segmentation fault" message there. '((' could
15390# trigger a bug in pdksh 5.2.14.
15391for as_var in BASH_ENV ENV MAIL MAILPATH
15392do eval test x\${$as_var+set} = xset \
15393 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394done
15395PS1='$ '
15396PS2='> '
15397PS4='+ '
15398
15399# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015400LC_ALL=C
15401export LC_ALL
15402LANGUAGE=C
15403export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015404
Matthias Kloseb9621712010-04-24 17:59:49 +000015405# CDPATH.
15406(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15407
15408
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015409# as_fn_error STATUS ERROR [LINENO LOG_FD]
15410# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015411# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15412# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015413# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015414as_fn_error ()
15415{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015416 as_status=$1; test $as_status -eq 0 && as_status=1
15417 if test "$4"; then
15418 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15419 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015420 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015421 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015422 as_fn_exit $as_status
15423} # as_fn_error
15424
15425
15426# as_fn_set_status STATUS
15427# -----------------------
15428# Set $? to STATUS, without forking.
15429as_fn_set_status ()
15430{
15431 return $1
15432} # as_fn_set_status
15433
15434# as_fn_exit STATUS
15435# -----------------
15436# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15437as_fn_exit ()
15438{
15439 set +e
15440 as_fn_set_status $1
15441 exit $1
15442} # as_fn_exit
15443
15444# as_fn_unset VAR
15445# ---------------
15446# Portably unset VAR.
15447as_fn_unset ()
15448{
15449 { eval $1=; unset $1;}
15450}
15451as_unset=as_fn_unset
15452# as_fn_append VAR VALUE
15453# ----------------------
15454# Append the text in VALUE to the end of the definition contained in VAR. Take
15455# advantage of any shell optimizations that allow amortized linear growth over
15456# repeated appends, instead of the typical quadratic growth present in naive
15457# implementations.
15458if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15459 eval 'as_fn_append ()
15460 {
15461 eval $1+=\$2
15462 }'
15463else
15464 as_fn_append ()
15465 {
15466 eval $1=\$$1\$2
15467 }
15468fi # as_fn_append
15469
15470# as_fn_arith ARG...
15471# ------------------
15472# Perform arithmetic evaluation on the ARGs, and store the result in the
15473# global $as_val. Take advantage of shells that can avoid forks. The arguments
15474# must be portable across $(()) and expr.
15475if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15476 eval 'as_fn_arith ()
15477 {
15478 as_val=$(( $* ))
15479 }'
15480else
15481 as_fn_arith ()
15482 {
15483 as_val=`expr "$@" || test $? -eq 1`
15484 }
15485fi # as_fn_arith
15486
15487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015488if expr a : '\(a\)' >/dev/null 2>&1 &&
15489 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15490 as_expr=expr
15491else
15492 as_expr=false
15493fi
15494
15495if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15496 as_basename=basename
15497else
15498 as_basename=false
15499fi
15500
Matthias Kloseb9621712010-04-24 17:59:49 +000015501if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15502 as_dirname=dirname
15503else
15504 as_dirname=false
15505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015507as_me=`$as_basename -- "$0" ||
15508$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15509 X"$0" : 'X\(//\)$' \| \
15510 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015511$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015512 sed '/^.*\/\([^/][^/]*\)\/*$/{
15513 s//\1/
15514 q
15515 }
15516 /^X\/\(\/\/\)$/{
15517 s//\1/
15518 q
15519 }
15520 /^X\/\(\/\).*/{
15521 s//\1/
15522 q
15523 }
15524 s/.*/./; q'`
15525
Matthias Kloseb9621712010-04-24 17:59:49 +000015526# Avoid depending upon Character Ranges.
15527as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15528as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15529as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15530as_cr_digits='0123456789'
15531as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015532
15533ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015534case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015536 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 xy) ECHO_C='\c';;
15539 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15540 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015541 esac;;
15542*)
15543 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015544esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547if test -d conf$$.dir; then
15548 rm -f conf$$.dir/conf$$.file
15549else
15550 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015551 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015553if (echo >conf$$.file) 2>/dev/null; then
15554 if ln -s conf$$.file conf$$ 2>/dev/null; then
15555 as_ln_s='ln -s'
15556 # ... but there are two gotchas:
15557 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15558 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015559 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015560 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015561 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015562 elif ln conf$$.file conf$$ 2>/dev/null; then
15563 as_ln_s=ln
15564 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015565 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015566 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015567else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015568 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015570rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15571rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015572
Matthias Kloseb9621712010-04-24 17:59:49 +000015573
15574# as_fn_mkdir_p
15575# -------------
15576# Create "$as_dir" as a directory, including parents if necessary.
15577as_fn_mkdir_p ()
15578{
15579
15580 case $as_dir in #(
15581 -*) as_dir=./$as_dir;;
15582 esac
15583 test -d "$as_dir" || eval $as_mkdir_p || {
15584 as_dirs=
15585 while :; do
15586 case $as_dir in #(
15587 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15588 *) as_qdir=$as_dir;;
15589 esac
15590 as_dirs="'$as_qdir' $as_dirs"
15591 as_dir=`$as_dirname -- "$as_dir" ||
15592$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15593 X"$as_dir" : 'X\(//\)[^/]' \| \
15594 X"$as_dir" : 'X\(//\)$' \| \
15595 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15596$as_echo X"$as_dir" |
15597 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15598 s//\1/
15599 q
15600 }
15601 /^X\(\/\/\)[^/].*/{
15602 s//\1/
15603 q
15604 }
15605 /^X\(\/\/\)$/{
15606 s//\1/
15607 q
15608 }
15609 /^X\(\/\).*/{
15610 s//\1/
15611 q
15612 }
15613 s/.*/./; q'`
15614 test -d "$as_dir" && break
15615 done
15616 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015617 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015618
15619
15620} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015621if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015622 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015623else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015624 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015625 as_mkdir_p=false
15626fi
15627
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015628
15629# as_fn_executable_p FILE
15630# -----------------------
15631# Test if FILE is an executable regular file.
15632as_fn_executable_p ()
15633{
15634 test -f "$1" && test -x "$1"
15635} # as_fn_executable_p
15636as_test_x='test -x'
15637as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015638
15639# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015640as_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 +000015641
15642# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015643as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015644
15645
Martin v. Löwis11437992002-04-12 09:54:03 +000015646exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015647## ----------------------------------- ##
15648## Main body of $CONFIG_STATUS script. ##
15649## ----------------------------------- ##
15650_ASEOF
15651test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015652
Matthias Kloseb9621712010-04-24 17:59:49 +000015653cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15654# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015655# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015656# values after options handling.
15657ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015658This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015659generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015660
15661 CONFIG_FILES = $CONFIG_FILES
15662 CONFIG_HEADERS = $CONFIG_HEADERS
15663 CONFIG_LINKS = $CONFIG_LINKS
15664 CONFIG_COMMANDS = $CONFIG_COMMANDS
15665 $ $0 $@
15666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015667on `(hostname || uname -n) 2>/dev/null | sed 1q`
15668"
15669
Martin v. Löwis11437992002-04-12 09:54:03 +000015670_ACEOF
15671
Matthias Kloseb9621712010-04-24 17:59:49 +000015672case $ac_config_files in *"
15673"*) set x $ac_config_files; shift; ac_config_files=$*;;
15674esac
15675
15676case $ac_config_headers in *"
15677"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15678esac
15679
15680
15681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015682# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015683config_files="$ac_config_files"
15684config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015686_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015689ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015690\`$as_me' instantiates files and other configuration actions
15691from templates according to the current configuration. Unless the files
15692and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015693
Matthias Kloseb9621712010-04-24 17:59:49 +000015694Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015695
15696 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015697 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015698 --config print configuration, then exit
15699 -q, --quiet, --silent
15700 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 -d, --debug don't remove temporary files
15702 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015703 --file=FILE[:TEMPLATE]
15704 instantiate the configuration file FILE
15705 --header=FILE[:TEMPLATE]
15706 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015707
15708Configuration files:
15709$config_files
15710
15711Configuration headers:
15712$config_headers
15713
Matthias Kloseb9621712010-04-24 17:59:49 +000015714Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015717cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15718ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015719ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015720python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015721configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015722 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015723
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015724Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015725This config.status script is free software; the Free Software Foundation
15726gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015727
15728ac_pwd='$ac_pwd'
15729srcdir='$srcdir'
15730INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015731MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015732test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015733_ACEOF
15734
Matthias Kloseb9621712010-04-24 17:59:49 +000015735cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15736# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015737ac_need_defaults=:
15738while test $# != 0
15739do
15740 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015741 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15743 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015744 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015745 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015746 --*=)
15747 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15748 ac_optarg=
15749 ac_shift=:
15750 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015751 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015752 ac_option=$1
15753 ac_optarg=$2
15754 ac_shift=shift
15755 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015756 esac
15757
Skip Montanaro6dead952003-09-25 14:50:04 +000015758 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015760 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15761 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 $as_echo "$ac_cs_version"; exit ;;
15764 --config | --confi | --conf | --con | --co | --c )
15765 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015766 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 debug=: ;;
15768 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015769 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015770 case $ac_optarg in
15771 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015772 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015773 esac
15774 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 ac_need_defaults=false;;
15776 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015777 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015778 case $ac_optarg in
15779 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15780 esac
15781 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015782 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015783 --he | --h)
15784 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015785 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015786Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015787 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015788 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015789 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15790 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15791 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015792
15793 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015794 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015795Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015796
Matthias Kloseb9621712010-04-24 17:59:49 +000015797 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015798 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015799
15800 esac
15801 shift
15802done
15803
Skip Montanaro6dead952003-09-25 14:50:04 +000015804ac_configure_extra_args=
15805
15806if $ac_cs_silent; then
15807 exec 6>/dev/null
15808 ac_configure_extra_args="$ac_configure_extra_args --silent"
15809fi
15810
15811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015813if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015814 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015815 shift
15816 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15817 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015818 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015819 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015820fi
15821
Martin v. Löwis11437992002-04-12 09:54:03 +000015822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015823cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824exec 5>>config.log
15825{
15826 echo
15827 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15828## Running $as_me. ##
15829_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015830 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015831} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015832
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015834cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015835_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015836
Matthias Kloseb9621712010-04-24 17:59:49 +000015837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015838
15839# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015840for ac_config_target in $ac_config_targets
15841do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015842 case $ac_config_target in
15843 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15844 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15845 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015846 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15847 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015848 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15849 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015850 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010015851 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015852 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015853
Victor Stinnere0be4232011-10-25 13:06:09 +020015854 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 esac
15856done
15857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015858
Martin v. Löwis11437992002-04-12 09:54:03 +000015859# If the user did not use the arguments to specify the items to instantiate,
15860# then the envvar interface is used. Set only those that are not.
15861# We use the long form for the default assignment because of an extremely
15862# bizarre bug on SunOS 4.1.3.
15863if $ac_need_defaults; then
15864 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15865 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15866fi
15867
Skip Montanaro6dead952003-09-25 14:50:04 +000015868# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015869# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015870# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871# Hook for its removal unless debugging.
15872# Note that there is a small window in which the directory will not be cleaned:
15873# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015874$debug ||
15875{
Victor Stinnere0be4232011-10-25 13:06:09 +020015876 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015878 : "${ac_tmp:=$tmp}"
15879 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015880' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015881 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015882}
Martin v. Löwis11437992002-04-12 09:54:03 +000015883# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015884
Martin v. Löwis11437992002-04-12 09:54:03 +000015885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015886 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015887 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015888} ||
15889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015890 tmp=./conf$$-$RANDOM
15891 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015892} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015893ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015894
Matthias Kloseb9621712010-04-24 17:59:49 +000015895# Set up the scripts for CONFIG_FILES section.
15896# No need to generate them if there are no CONFIG_FILES.
15897# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015898if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015899
Matthias Kloseb9621712010-04-24 17:59:49 +000015900
15901ac_cr=`echo X | tr X '\015'`
15902# On cygwin, bash can eat \r inside `` if the user requested igncr.
15903# But we know of no other shell where ac_cr would be empty at this
15904# point, so we can use a bashism as a fallback.
15905if test "x$ac_cr" = x; then
15906 eval ac_cr=\$\'\\r\'
15907fi
15908ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15909if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015910 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015911else
15912 ac_cs_awk_cr=$ac_cr
15913fi
15914
Victor Stinnere0be4232011-10-25 13:06:09 +020015915echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015916_ACEOF
15917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015918
Matthias Kloseb9621712010-04-24 17:59:49 +000015919{
15920 echo "cat >conf$$subs.awk <<_ACEOF" &&
15921 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15922 echo "_ACEOF"
15923} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015924 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15925ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015926ac_delim='%!_!# '
15927for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015928 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015929 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015930
Matthias Kloseb9621712010-04-24 17:59:49 +000015931 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15932 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015933 break
15934 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015935 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015936 else
15937 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015938 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939done
Matthias Kloseb9621712010-04-24 17:59:49 +000015940rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015941
Matthias Kloseb9621712010-04-24 17:59:49 +000015942cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015943cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015945sed -n '
15946h
15947s/^/S["/; s/!.*/"]=/
15948p
15949g
15950s/^[^!]*!//
15951:repl
15952t repl
15953s/'"$ac_delim"'$//
15954t delim
15955:nl
15956h
15957s/\(.\{148\}\)..*/\1/
15958t more1
15959s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15960p
15961n
15962b repl
15963:more1
15964s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15965p
15966g
15967s/.\{148\}//
15968t nl
15969:delim
15970h
15971s/\(.\{148\}\)..*/\1/
15972t more2
15973s/["\\]/\\&/g; s/^/"/; s/$/"/
15974p
15975b
15976:more2
15977s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15978p
15979g
15980s/.\{148\}//
15981t delim
15982' <conf$$subs.awk | sed '
15983/^[^""]/{
15984 N
15985 s/\n//
15986}
15987' >>$CONFIG_STATUS || ac_write_fail=1
15988rm -f conf$$subs.awk
15989cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15990_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015991cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015992 for (key in S) S_is_set[key] = 1
15993 FS = ""
15994
15995}
15996{
15997 line = $ 0
15998 nfields = split(line, field, "@")
15999 substed = 0
16000 len = length(field[1])
16001 for (i = 2; i < nfields; i++) {
16002 key = field[i]
16003 keylen = length(key)
16004 if (S_is_set[key]) {
16005 value = S[key]
16006 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16007 len += length(value) + length(field[++i])
16008 substed = 1
16009 } else
16010 len += 1 + keylen
16011 }
16012
16013 print line
16014}
16015
16016_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016018cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16019if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16020 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16021else
16022 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016023fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016024 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016025_ACEOF
16026
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016027# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16028# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016029# trailing colons and then remove the whole line if VPATH becomes empty
16030# (actually we leave an empty line to preserve line numbers).
16031if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016032 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16033h
16034s///
16035s/^/:/
16036s/[ ]*$/:/
16037s/:\$(srcdir):/:/g
16038s/:\${srcdir}:/:/g
16039s/:@srcdir@:/:/g
16040s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016041s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016042x
16043s/\(=[ ]*\).*/\1/
16044G
16045s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016046s/^[^=]*=[ ]*$//
16047}'
16048fi
16049
Matthias Kloseb9621712010-04-24 17:59:49 +000016050cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016051fi # test -n "$CONFIG_FILES"
16052
Matthias Kloseb9621712010-04-24 17:59:49 +000016053# Set up the scripts for CONFIG_HEADERS section.
16054# No need to generate them if there are no CONFIG_HEADERS.
16055# This happens for instance with `./config.status Makefile'.
16056if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016057cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016058BEGIN {
16059_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016060
Matthias Kloseb9621712010-04-24 17:59:49 +000016061# Transform confdefs.h into an awk script `defines.awk', embedded as
16062# here-document in config.status, that substitutes the proper values into
16063# config.h.in to produce config.h.
16064
16065# Create a delimiter string that does not exist in confdefs.h, to ease
16066# handling of long lines.
16067ac_delim='%!_!# '
16068for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016069 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16070 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016071 break
16072 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016073 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016074 else
16075 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16076 fi
16077done
16078
16079# For the awk script, D is an array of macro values keyed by name,
16080# likewise P contains macro parameters if any. Preserve backslash
16081# newline sequences.
16082
16083ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16084sed -n '
16085s/.\{148\}/&'"$ac_delim"'/g
16086t rset
16087:rset
16088s/^[ ]*#[ ]*define[ ][ ]*/ /
16089t def
16090d
16091:def
16092s/\\$//
16093t bsnl
16094s/["\\]/\\&/g
16095s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16096D["\1"]=" \3"/p
16097s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16098d
16099:bsnl
16100s/["\\]/\\&/g
16101s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16102D["\1"]=" \3\\\\\\n"\\/p
16103t cont
16104s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16105t cont
16106d
16107:cont
16108n
16109s/.\{148\}/&'"$ac_delim"'/g
16110t clear
16111:clear
16112s/\\$//
16113t bsnlc
16114s/["\\]/\\&/g; s/^/"/; s/$/"/p
16115d
16116:bsnlc
16117s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16118b cont
16119' <confdefs.h | sed '
16120s/'"$ac_delim"'/"\\\
16121"/g' >>$CONFIG_STATUS || ac_write_fail=1
16122
16123cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16124 for (key in D) D_is_set[key] = 1
16125 FS = ""
16126}
16127/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16128 line = \$ 0
16129 split(line, arg, " ")
16130 if (arg[1] == "#") {
16131 defundef = arg[2]
16132 mac1 = arg[3]
16133 } else {
16134 defundef = substr(arg[1], 2)
16135 mac1 = arg[2]
16136 }
16137 split(mac1, mac2, "(") #)
16138 macro = mac2[1]
16139 prefix = substr(line, 1, index(line, defundef) - 1)
16140 if (D_is_set[macro]) {
16141 # Preserve the white space surrounding the "#".
16142 print prefix "define", macro P[macro] D[macro]
16143 next
16144 } else {
16145 # Replace #undef with comments. This is necessary, for example,
16146 # in the case of _POSIX_SOURCE, which is predefined and required
16147 # on some systems where configure will not decide to define it.
16148 if (defundef == "undef") {
16149 print "/*", prefix defundef, macro, "*/"
16150 next
16151 }
16152 }
16153}
16154{ print }
16155_ACAWK
16156_ACEOF
16157cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016158 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016159fi # test -n "$CONFIG_HEADERS"
16160
16161
16162eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16163shift
16164for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165do
16166 case $ac_tag in
16167 :[FHLC]) ac_mode=$ac_tag; continue;;
16168 esac
16169 case $ac_mode$ac_tag in
16170 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016171 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016172 :[FH]-) ac_tag=-:-;;
16173 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16174 esac
16175 ac_save_IFS=$IFS
16176 IFS=:
16177 set x $ac_tag
16178 IFS=$ac_save_IFS
16179 shift
16180 ac_file=$1
16181 shift
16182
16183 case $ac_mode in
16184 :L) ac_source=$1;;
16185 :[FH])
16186 ac_file_inputs=
16187 for ac_f
16188 do
16189 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016190 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016191 *) # Look for the file first in the build tree, then in the source tree
16192 # (if the path is not absolute). The absolute path cannot be DOS-style,
16193 # because $ac_f cannot contain `:'.
16194 test -f "$ac_f" ||
16195 case $ac_f in
16196 [\\/$]*) false;;
16197 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16198 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016199 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016200 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016201 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16202 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016203 done
16204
16205 # Let's still pretend it is `configure' which instantiates (i.e., don't
16206 # use $as_me), people would be surprised to read:
16207 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016208 configure_input='Generated from '`
16209 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16210 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016211 if test x"$ac_file" != x-; then
16212 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016213 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16214$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016215 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016216 # Neutralize special characters interpreted by sed in replacement strings.
16217 case $configure_input in #(
16218 *\&* | *\|* | *\\* )
16219 ac_sed_conf_input=`$as_echo "$configure_input" |
16220 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16221 *) ac_sed_conf_input=$configure_input;;
16222 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016223
16224 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016225 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16226 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227 esac
16228 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 esac
16230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016231 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016232$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016233 X"$ac_file" : 'X\(//\)[^/]' \| \
16234 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016235 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016236$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016237 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16238 s//\1/
16239 q
16240 }
16241 /^X\(\/\/\)[^/].*/{
16242 s//\1/
16243 q
16244 }
16245 /^X\(\/\/\)$/{
16246 s//\1/
16247 q
16248 }
16249 /^X\(\/\).*/{
16250 s//\1/
16251 q
16252 }
16253 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016254 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016255 ac_builddir=.
16256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016257case "$ac_dir" in
16258.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16259*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016260 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016261 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016262 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263 case $ac_top_builddir_sub in
16264 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16265 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16266 esac ;;
16267esac
16268ac_abs_top_builddir=$ac_pwd
16269ac_abs_builddir=$ac_pwd$ac_dir_suffix
16270# for backward compatibility:
16271ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016272
16273case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016274 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276 ac_top_srcdir=$ac_top_builddir_sub
16277 ac_abs_top_srcdir=$ac_pwd ;;
16278 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280 ac_top_srcdir=$srcdir
16281 ac_abs_top_srcdir=$srcdir ;;
16282 *) # Relative name.
16283 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16284 ac_top_srcdir=$ac_top_build_prefix$srcdir
16285 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016286esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016288
Martin v. Löwis11437992002-04-12 09:54:03 +000016289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290 case $ac_mode in
16291 :F)
16292 #
16293 # CONFIG_FILE
16294 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016295
16296 case $INSTALL in
16297 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016300 ac_MKDIR_P=$MKDIR_P
16301 case $MKDIR_P in
16302 [\\/$]* | ?:[\\/]* ) ;;
16303 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16304 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016305_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306
Matthias Kloseb9621712010-04-24 17:59:49 +000016307cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308# If the template does not know about datarootdir, expand it.
16309# FIXME: This hack should be removed a few years after 2.60.
16310ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016311ac_sed_dataroot='
16312/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313 p
16314 q
16315}
16316/@datadir@/p
16317/@docdir@/p
16318/@infodir@/p
16319/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016320/@mandir@/p'
16321case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016322*datarootdir*) ac_datarootdir_seen=yes;;
16323*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016324 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16325$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016327cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016328 ac_datarootdir_hack='
16329 s&@datadir@&$datadir&g
16330 s&@docdir@&$docdir&g
16331 s&@infodir@&$infodir&g
16332 s&@localedir@&$localedir&g
16333 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016334 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016335esac
16336_ACEOF
16337
16338# Neutralize VPATH when `$srcdir' = `.'.
16339# Shell code in configure.ac might set extrasub.
16340# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16342ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016343$extrasub
16344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016345cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016346:t
16347/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016348s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016350s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016351s&@srcdir@&$ac_srcdir&;t t
16352s&@abs_srcdir@&$ac_abs_srcdir&;t t
16353s&@top_srcdir@&$ac_top_srcdir&;t t
16354s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16355s&@builddir@&$ac_builddir&;t t
16356s&@abs_builddir@&$ac_abs_builddir&;t t
16357s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16358s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016359s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016360$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016361"
Victor Stinnere0be4232011-10-25 13:06:09 +020016362eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16363 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016365test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016366 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16367 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16368 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016370which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016371$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016372which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016373
Victor Stinnere0be4232011-10-25 13:06:09 +020016374 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016375 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016376 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16377 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016378 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016379 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016380 ;;
16381 :H)
16382 #
16383 # CONFIG_HEADER
16384 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016386 {
16387 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016388 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16389 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016390 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016391 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016392 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16393$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016394 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016395 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016396 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016397 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 fi
16399 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016400 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016401 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016402 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016403 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406
16407 esac
16408
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016409
16410 case $ac_file$ac_mode in
16411 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16412
16413 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016414done # for ac_tag
16415
Guido van Rossum627b2d71993-12-24 10:39:16 +000016416
Matthias Kloseb9621712010-04-24 17:59:49 +000016417as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016418_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016419ac_clean_files=$ac_clean_files_save
16420
Matthias Kloseb9621712010-04-24 17:59:49 +000016421test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016422 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016423
Martin v. Löwis11437992002-04-12 09:54:03 +000016424
16425# configure is writing to config.log, and then calls config.status.
16426# config.status does its own redirection, appending to config.log.
16427# Unfortunately, on DOS this fails, as config.log is still kept open
16428# by configure, so config.status won't be able to write to it; its
16429# output is simply discarded. So we exec the FD to /dev/null,
16430# effectively closing config.log, so it can be properly (re)opened and
16431# appended to by config.status. When coming back to configure, we
16432# need to make the FD available again.
16433if test "$no_create" != yes; then
16434 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016435 ac_config_status_args=
16436 test "$silent" = yes &&
16437 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016438 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016439 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016440 exec 5>>config.log
16441 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16442 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016443 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016444fi
16445if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16447$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016448fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016449
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016450
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016451echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016452if test ! -f Modules/Setup
16453then
16454 cp $srcdir/Modules/Setup.dist Modules/Setup
16455fi
16456
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016457echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016458if test ! -f Modules/Setup.local
16459then
16460 echo "# Edit this file for local setup changes" >Modules/Setup.local
16461fi
16462
16463echo "creating Makefile"
16464$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16465 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016466 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016467mv config.c Modules