blob: fb1404f8838d67b85be23d66d16ec78bbaa794ee [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
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700630EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000631SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000632LIBC
633LIBM
634HAVE_GETHOSTBYNAME
635HAVE_GETHOSTBYNAME_R
636HAVE_GETHOSTBYNAME_R_3_ARG
637HAVE_GETHOSTBYNAME_R_5_ARG
638HAVE_GETHOSTBYNAME_R_6_ARG
639LIBOBJS
640TRUE
641MACHDEP_OBJS
642DYNLOADFILE
643DLINCLDIR
644THREADOBJ
645LDLAST
646USE_THREAD_MODULE
647SIGNAL_OBJS
648USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700649TCLTK_LIBS
650TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000651LIBFFI_INCLUDEDIR
652PKG_CONFIG
653SHLIBS
654CFLAGSFORSHARED
655LINKFORSHARED
656CCSHARED
657BLDSHARED
658LDCXXSHARED
659LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700660SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000661LIBTOOL_CRUFT
662OTHER_LIBTOOL_OPT
663UNIVERSAL_ARCH_FLAGS
664BASECFLAGS
665OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000666ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100668MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000669INSTALL_DATA
670INSTALL_SCRIPT
671INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200672PYTHON
673ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200674ac_ct_READELF
675READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000676ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200677ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000678AR
679RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000680USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000681GNULD
682LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000683LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000684RUNSHARED
685INSTSONAME
686LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000687PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000688BLDLIBRARY
689DLLLIBRARY
690LDLIBRARY
691LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100692MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000693BUILDEXEEXT
694EGREP
695GREP
696CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200697NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200698ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000699MAINCC
700CXX
701OBJEXT
702EXEEXT
703ac_ct_CC
704CPPFLAGS
705LDFLAGS
706CFLAGS
707CC
708EXPORT_MACOSX_DEPLOYMENT_TARGET
709CONFIGURE_MACOSX_DEPLOYMENT_TARGET
710SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200711_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000712MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000713FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000714FRAMEWORKUNIXTOOLSPREFIX
715FRAMEWORKALTINSTALLLAST
716FRAMEWORKALTINSTALLFIRST
717FRAMEWORKINSTALLLAST
718FRAMEWORKINSTALLFIRST
719PYTHONFRAMEWORKINSTALLDIR
720PYTHONFRAMEWORKPREFIX
721PYTHONFRAMEWORKDIR
722PYTHONFRAMEWORKIDENTIFIER
723PYTHONFRAMEWORK
724LIPO_32BIT_FLAGS
725ARCH_RUN_32BIT
726UNIVERSALSDK
727CONFIG_ARGS
728SOVERSION
729VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200730PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100731host_os
732host_vendor
733host_cpu
734host
735build_os
736build_vendor
737build_cpu
738build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500739HAS_HG
740HGBRANCH
741HGTAG
742HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400743BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000744target_alias
745host_alias
746build_alias
747LIBS
748ECHO_T
749ECHO_N
750ECHO_C
751DEFS
752mandir
753localedir
754libdir
755psdir
756pdfdir
757dvidir
758htmldir
759infodir
760docdir
761oldincludedir
762includedir
763localstatedir
764sharedstatedir
765sysconfdir
766datadir
767datarootdir
768libexecdir
769sbindir
770bindir
771program_transform_name
772prefix
773exec_prefix
774PACKAGE_URL
775PACKAGE_BUGREPORT
776PACKAGE_STRING
777PACKAGE_VERSION
778PACKAGE_TARNAME
779PACKAGE_NAME
780PATH_SEPARATOR
781SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000782ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000783ac_user_opts='
784enable_option_checking
785enable_universalsdk
786with_universal_archs
787with_framework_name
788enable_framework
789with_gcc
790with_cxx_main
791with_suffix
792enable_shared
793enable_profiling
794with_pydebug
795with_libs
796with_system_expat
797with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100798with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000799enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700800with_tcltk_includes
801with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000802with_dbmliborder
803with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000804with_threads
805with_thread
806enable_ipv6
807with_doc_strings
808with_tsc
809with_pymalloc
810with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_fpectl
812with_libm
813with_libc
814enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_computed_gotos
816'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817 ac_precious_vars='build_alias
818host_alias
819target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100820MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821CC
822CFLAGS
823LDFLAGS
824LIBS
825CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200826CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000830ac_init_help=
831ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000832ac_unrecognized_opts=
833ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834# The variables have the same names as the options, with
835# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000836cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839no_recursion=
840prefix=NONE
841program_prefix=NONE
842program_suffix=NONE
843program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848x_includes=NONE
849x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000850
851# Installation directory options.
852# These are left unexpanded so users can "make install exec_prefix=/foo"
853# and all the variables that are supposed to be based on exec_prefix
854# by default will actually change.
855# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857bindir='${exec_prefix}/bin'
858sbindir='${exec_prefix}/sbin'
859libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860datarootdir='${prefix}/share'
861datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862sysconfdir='${prefix}/etc'
863sharedstatedir='${prefix}/com'
864localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865includedir='${prefix}/include'
866oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
868infodir='${datarootdir}/info'
869htmldir='${docdir}'
870dvidir='${docdir}'
871pdfdir='${docdir}'
872psdir='${docdir}'
873libdir='${exec_prefix}/lib'
874localedir='${datarootdir}/locale'
875mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000878ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000880do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 # If the previous option needs an argument, assign it.
882 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884 ac_prev=
885 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000886 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200889 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
890 *=) ac_optarg= ;;
891 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 # Accept the important Cygnus configure options, so we can diagnose typos.
895
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896 case $ac_dashdash$ac_option in
897 --)
898 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900 -bindir | --bindir | --bindi | --bind | --bin | --bi)
901 ac_prev=bindir ;;
902 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904
905 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910 -cache-file | --cache-file | --cache-fil | --cache-fi \
911 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
912 ac_prev=cache_file ;;
913 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
914 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 cache_file=$ac_optarg ;;
916
917 --config-cache | -C)
918 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
926 | --dataroo | --dataro | --datar)
927 ac_prev=datarootdir ;;
928 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
929 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
930 datarootdir=$ac_optarg ;;
931
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000933 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000935 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200936 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000937 ac_useropt_orig=$ac_useropt
938 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
939 case $ac_user_opts in
940 *"
941"enable_$ac_useropt"
942"*) ;;
943 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
944 ac_unrecognized_sep=', ';;
945 esac
946 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947
948 -docdir | --docdir | --docdi | --doc | --do)
949 ac_prev=docdir ;;
950 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
951 docdir=$ac_optarg ;;
952
953 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
954 ac_prev=dvidir ;;
955 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
956 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
958 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200962 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt_orig=$ac_useropt
964 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
965 case $ac_user_opts in
966 *"
967"enable_$ac_useropt"
968"*) ;;
969 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
970 ac_unrecognized_sep=', ';;
971 esac
972 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
975 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
976 | --exec | --exe | --ex)
977 ac_prev=exec_prefix ;;
978 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
979 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
980 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Obsolete; use --with-gas.
985 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 -help | --help | --hel | --he | -h)
988 ac_init_help=long ;;
989 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
990 ac_init_help=recursive ;;
991 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
992 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000999 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1000 ac_prev=htmldir ;;
1001 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1002 | --ht=*)
1003 htmldir=$ac_optarg ;;
1004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -includedir | --includedir | --includedi | --included | --include \
1006 | --includ | --inclu | --incl | --inc)
1007 ac_prev=includedir ;;
1008 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1009 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
1012 -infodir | --infodir | --infodi | --infod | --info | --inf)
1013 ac_prev=infodir ;;
1014 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
1017 -libdir | --libdir | --libdi | --libd)
1018 ac_prev=libdir ;;
1019 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
1022 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1023 | --libexe | --libex | --libe)
1024 ac_prev=libexecdir ;;
1025 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1026 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 -localedir | --localedir | --localedi | --localed | --locale)
1030 ac_prev=localedir ;;
1031 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1032 localedir=$ac_optarg ;;
1033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036 ac_prev=localstatedir ;;
1037 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001038 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1042 ac_prev=mandir ;;
1043 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047 # Obsolete; use --without-fp.
1048 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
1050 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 no_create=yes ;;
1053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1055 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1056 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1059 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1060 | --oldin | --oldi | --old | --ol | --o)
1061 ac_prev=oldincludedir ;;
1062 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1063 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1064 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1068 ac_prev=prefix ;;
1069 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1073 | --program-pre | --program-pr | --program-p)
1074 ac_prev=program_prefix ;;
1075 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1076 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1080 | --program-suf | --program-su | --program-s)
1081 ac_prev=program_suffix ;;
1082 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1083 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-transform-name | --program-transform-name \
1087 | --program-transform-nam | --program-transform-na \
1088 | --program-transform-n | --program-transform- \
1089 | --program-transform | --program-transfor \
1090 | --program-transfo | --program-transf \
1091 | --program-trans | --program-tran \
1092 | --progr-tra | --program-tr | --program-t)
1093 ac_prev=program_transform_name ;;
1094 -program-transform-name=* | --program-transform-name=* \
1095 | --program-transform-nam=* | --program-transform-na=* \
1096 | --program-transform-n=* | --program-transform-=* \
1097 | --program-transform=* | --program-transfor=* \
1098 | --program-transfo=* | --program-transf=* \
1099 | --program-trans=* | --program-tran=* \
1100 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001103 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1104 ac_prev=pdfdir ;;
1105 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1106 pdfdir=$ac_optarg ;;
1107
1108 -psdir | --psdir | --psdi | --psd | --ps)
1109 ac_prev=psdir ;;
1110 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1111 psdir=$ac_optarg ;;
1112
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1114 | -silent | --silent | --silen | --sile | --sil)
1115 silent=yes ;;
1116
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1118 ac_prev=sbindir ;;
1119 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1120 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122
1123 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1124 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1125 | --sharedst | --shareds | --shared | --share | --shar \
1126 | --sha | --sh)
1127 ac_prev=sharedstatedir ;;
1128 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1129 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1130 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1131 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 -site | --site | --sit)
1135 ac_prev=site ;;
1136 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1140 ac_prev=srcdir ;;
1141 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001144 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1145 | --syscon | --sysco | --sysc | --sys | --sy)
1146 ac_prev=sysconfdir ;;
1147 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1148 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1157 verbose=yes ;;
1158
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 -version | --version | --versio | --versi | --vers | -V)
1160 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001166 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 ac_useropt_orig=$ac_useropt
1168 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1169 case $ac_user_opts in
1170 *"
1171"with_$ac_useropt"
1172"*) ;;
1173 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1174 ac_unrecognized_sep=', ';;
1175 esac
1176 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
1178 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001182 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 ac_useropt_orig=$ac_useropt
1184 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1185 case $ac_user_opts in
1186 *"
1187"with_$ac_useropt"
1188"*) ;;
1189 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1190 ac_unrecognized_sep=', ';;
1191 esac
1192 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 --x)
1195 # Obsolete; use --with-x.
1196 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1199 | --x-incl | --x-inc | --x-in | --x-i)
1200 ac_prev=x_includes ;;
1201 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1202 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1206 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1207 ac_prev=x_libraries ;;
1208 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1209 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001212 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1213Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 ;;
1215
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 *=*)
1217 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1218 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 case $ac_envvar in #(
1220 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001221 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 export $ac_envvar ;;
1225
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001226 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001230 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001231 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232 ;;
1233
1234 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235done
1236
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001239 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240fi
1241
Matthias Kloseb9621712010-04-24 17:59:49 +00001242if test -n "$ac_unrecognized_opts"; then
1243 case $enable_option_checking in
1244 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001246 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1247 esac
1248fi
1249
1250# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001251for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1252 datadir sysconfdir sharedstatedir localstatedir includedir \
1253 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1254 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001255do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 # Remove trailing slashes.
1258 case $ac_val in
1259 */ )
1260 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1261 eval $ac_var=\$ac_val;;
1262 esac
1263 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265 [\\/$]* | ?:[\\/]* ) continue;;
1266 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001268 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001269done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271# There might be people who depend on the old broken behavior: `$host'
1272# used to hold the argument of --host etc.
1273# FIXME: To remove some day.
1274build=$build_alias
1275host=$host_alias
1276target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277
Martin v. Löwis11437992002-04-12 09:54:03 +00001278# FIXME: To remove some day.
1279if test "x$host_alias" != x; then
1280 if test "x$build_alias" = x; then
1281 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 elif test "x$build_alias" != "x$host_alias"; then
1283 cross_compiling=yes
1284 fi
1285fi
1286
1287ac_tool_prefix=
1288test -n "$host_alias" && ac_tool_prefix=$host_alias-
1289
1290test "$silent" = yes && exec 6>/dev/null
1291
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293ac_pwd=`pwd` && test -n "$ac_pwd" &&
1294ac_ls_di=`ls -di .` &&
1295ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001296 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299
1300
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301# Find the source files, if location was not specified.
1302if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001305 ac_confdir=`$as_dirname -- "$as_myself" ||
1306$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1307 X"$as_myself" : 'X\(//\)[^/]' \| \
1308 X"$as_myself" : 'X\(//\)$' \| \
1309 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1310$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1312 s//\1/
1313 q
1314 }
1315 /^X\(\/\/\)[^/].*/{
1316 s//\1/
1317 q
1318 }
1319 /^X\(\/\/\)$/{
1320 s//\1/
1321 q
1322 }
1323 /^X\(\/\).*/{
1324 s//\1/
1325 q
1326 }
1327 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001328 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330 srcdir=..
1331 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001332else
1333 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335if test ! -r "$srcdir/$ac_unique_file"; then
1336 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1340ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 pwd)`
1343# When building in place, set srcdir=.
1344if test "$ac_abs_confdir" = "$ac_pwd"; then
1345 srcdir=.
1346fi
1347# Remove unnecessary trailing slashes from srcdir.
1348# Double slashes in file names in object file debugging info
1349# mess up M-x gdb in Emacs.
1350case $srcdir in
1351*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1352esac
1353for ac_var in $ac_precious_vars; do
1354 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1355 eval ac_env_${ac_var}_value=\$${ac_var}
1356 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1357 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1358done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001359
Martin v. Löwis11437992002-04-12 09:54:03 +00001360#
1361# Report the --help message.
1362#
1363if test "$ac_init_help" = "long"; then
1364 # Omit some internal or obsolete options to make the list less imposing.
1365 # This message is too long to be a string in the A/UX 3.1 sh.
1366 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001367\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001368
1369Usage: $0 [OPTION]... [VAR=VALUE]...
1370
1371To assign environment variables (e.g., CC, CFLAGS...), specify them as
1372VAR=VALUE. See below for descriptions of some of the useful variables.
1373
1374Defaults for the options are specified in brackets.
1375
1376Configuration:
1377 -h, --help display this help and exit
1378 --help=short display options specific to this package
1379 --help=recursive display the short help of all the included packages
1380 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --cache-file=FILE cache test results in FILE [disabled]
1383 -C, --config-cache alias for \`--cache-file=config.cache'
1384 -n, --no-create do not create output files
1385 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1386
Martin v. Löwis11437992002-04-12 09:54:03 +00001387Installation directories:
1388 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001389 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001391 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393By default, \`make install' will install all the files in
1394\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1395an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1396for instance \`--prefix=\$HOME'.
1397
1398For better control, use the options below.
1399
1400Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001401 --bindir=DIR user executables [EPREFIX/bin]
1402 --sbindir=DIR system admin executables [EPREFIX/sbin]
1403 --libexecdir=DIR program executables [EPREFIX/libexec]
1404 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1405 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1406 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1407 --libdir=DIR object code libraries [EPREFIX/lib]
1408 --includedir=DIR C header files [PREFIX/include]
1409 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1410 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1411 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1412 --infodir=DIR info documentation [DATAROOTDIR/info]
1413 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1414 --mandir=DIR man documentation [DATAROOTDIR/man]
1415 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1416 --htmldir=DIR html documentation [DOCDIR]
1417 --dvidir=DIR dvi documentation [DOCDIR]
1418 --pdfdir=DIR pdf documentation [DOCDIR]
1419 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420_ACEOF
1421
1422 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001423
1424System types:
1425 --build=BUILD configure for building on BUILD [guessed]
1426 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427_ACEOF
1428fi
1429
1430if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001431 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001432 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001433 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 cat <<\_ACEOF
1435
1436Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1439 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001440 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001441 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --enable-framework[=INSTALLDIR]
1443 Build (MacOSX|Darwin) framework
1444 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001445 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001446 --enable-loadable-sqlite-extensions
1447 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001448 --enable-ipv6 Enable ipv6 (with ipv4) support
1449 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001450 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
1453Optional Packages:
1454 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1455 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001456 --with-universal-archs=ARCH
1457 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001458 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001459 --with-framework-name=FRAMEWORK
1460 specify an alternate name of the framework built
1461 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001463 --with-cxx-main=<compiler>
1464 compile main() and link python executable with C++
1465 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001466 --with-suffix=.exe set executable suffix
1467 --with-pydebug build with Py_DEBUG defined
1468 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001469 --with-system-expat build pyexpat module using an installed expat
1470 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001471 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001472 --with-system-libmpdec build _decimal module using an installed libmpdec
1473 library
Ned Deilyd819b932013-09-06 01:07:05 -07001474 --with-tcltk-includes='-I...'
1475 override search for Tcl and Tk include files
1476 --with-tcltk-libs='-L...'
1477 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001478 --with-dbmliborder=db1:db2:...
1479 order to check db backends for dbm. Valid value is a
1480 colon separated string with the backend names
1481 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --with(out)-threads[=DIRECTORY]
1484 disable/enable thread support
1485 --with(out)-thread[=DIRECTORY]
1486 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001488 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001490 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --with-fpectl enable SIGFPE catching
1492 --with-libm=STRING math library
1493 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001494 --with(out)-computed-gotos
1495 Use computed gotos in evaluation loop (enabled by
1496 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001497
1498Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001499 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001500 CC C compiler command
1501 CFLAGS C compiler flags
1502 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1503 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001505 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001507 CPP C preprocessor
1508
1509Use these variables to override the choices made by `configure' or to help
1510it to find libraries and programs with nonstandard names/locations.
1511
Georg Brandle2e15612009-05-20 18:25:10 +00001512Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001515fi
1516
1517if test "$ac_init_help" = "recursive"; then
1518 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001520 test -d "$ac_dir" ||
1521 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1522 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001523 ac_builddir=.
1524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525case "$ac_dir" in
1526.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1527*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001528 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001530 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 case $ac_top_builddir_sub in
1532 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1533 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1534 esac ;;
1535esac
1536ac_abs_top_builddir=$ac_pwd
1537ac_abs_builddir=$ac_pwd$ac_dir_suffix
1538# for backward compatibility:
1539ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
1541case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001542 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544 ac_top_srcdir=$ac_top_builddir_sub
1545 ac_abs_top_srcdir=$ac_pwd ;;
1546 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_top_srcdir=$srcdir
1549 ac_abs_top_srcdir=$srcdir ;;
1550 *) # Relative name.
1551 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1552 ac_top_srcdir=$ac_top_build_prefix$srcdir
1553 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001554esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 cd "$ac_dir" || { ac_status=$?; continue; }
1558 # Check for guested configure.
1559 if test -f "$ac_srcdir/configure.gnu"; then
1560 echo &&
1561 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1562 elif test -f "$ac_srcdir/configure"; then
1563 echo &&
1564 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001566 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 fi || ac_status=$?
1568 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 done
1570fi
1571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001573if $ac_init_version; then
1574 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001575python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001576generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001577
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001578Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579This configure script is free software; the Free Software Foundation
1580gives unlimited permission to copy, distribute and modify it.
1581_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001584
1585## ------------------------ ##
1586## Autoconf initialization. ##
1587## ------------------------ ##
1588
1589# ac_fn_c_try_compile LINENO
1590# --------------------------
1591# Try to compile conftest.$ac_ext, and return whether this succeeded.
1592ac_fn_c_try_compile ()
1593{
1594 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1595 rm -f conftest.$ac_objext
1596 if { { ac_try="$ac_compile"
1597case "(($ac_try" in
1598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1599 *) ac_try_echo=$ac_try;;
1600esac
1601eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1602$as_echo "$ac_try_echo"; } >&5
1603 (eval "$ac_compile") 2>conftest.err
1604 ac_status=$?
1605 if test -s conftest.err; then
1606 grep -v '^ *+' conftest.err >conftest.er1
1607 cat conftest.er1 >&5
1608 mv -f conftest.er1 conftest.err
1609 fi
1610 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1611 test $ac_status = 0; } && {
1612 test -z "$ac_c_werror_flag" ||
1613 test ! -s conftest.err
1614 } && test -s conftest.$ac_objext; then :
1615 ac_retval=0
1616else
1617 $as_echo "$as_me: failed program was:" >&5
1618sed 's/^/| /' conftest.$ac_ext >&5
1619
1620 ac_retval=1
1621fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001622 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001623 as_fn_set_status $ac_retval
1624
1625} # ac_fn_c_try_compile
1626
Matthias Kloseb9621712010-04-24 17:59:49 +00001627# ac_fn_c_try_link LINENO
1628# -----------------------
1629# Try to link conftest.$ac_ext, and return whether this succeeded.
1630ac_fn_c_try_link ()
1631{
1632 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1633 rm -f conftest.$ac_objext conftest$ac_exeext
1634 if { { ac_try="$ac_link"
1635case "(($ac_try" in
1636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1637 *) ac_try_echo=$ac_try;;
1638esac
1639eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1640$as_echo "$ac_try_echo"; } >&5
1641 (eval "$ac_link") 2>conftest.err
1642 ac_status=$?
1643 if test -s conftest.err; then
1644 grep -v '^ *+' conftest.err >conftest.er1
1645 cat conftest.er1 >&5
1646 mv -f conftest.er1 conftest.err
1647 fi
1648 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1649 test $ac_status = 0; } && {
1650 test -z "$ac_c_werror_flag" ||
1651 test ! -s conftest.err
1652 } && test -s conftest$ac_exeext && {
1653 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001654 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001655 }; then :
1656 ac_retval=0
1657else
1658 $as_echo "$as_me: failed program was:" >&5
1659sed 's/^/| /' conftest.$ac_ext >&5
1660
1661 ac_retval=1
1662fi
1663 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1664 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1665 # interfere with the next link command; also delete a directory that is
1666 # left behind by Apple's compiler. We do this before executing the actions.
1667 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001668 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 as_fn_set_status $ac_retval
1670
1671} # ac_fn_c_try_link
1672
Matthias Kloseb9621712010-04-24 17:59:49 +00001673# ac_fn_c_try_cpp LINENO
1674# ----------------------
1675# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1676ac_fn_c_try_cpp ()
1677{
1678 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1679 if { { ac_try="$ac_cpp conftest.$ac_ext"
1680case "(($ac_try" in
1681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682 *) ac_try_echo=$ac_try;;
1683esac
1684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1685$as_echo "$ac_try_echo"; } >&5
1686 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1687 ac_status=$?
1688 if test -s conftest.err; then
1689 grep -v '^ *+' conftest.err >conftest.er1
1690 cat conftest.er1 >&5
1691 mv -f conftest.er1 conftest.err
1692 fi
1693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001694 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001695 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1696 test ! -s conftest.err
1697 }; then :
1698 ac_retval=0
1699else
1700 $as_echo "$as_me: failed program was:" >&5
1701sed 's/^/| /' conftest.$ac_ext >&5
1702
1703 ac_retval=1
1704fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001705 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001706 as_fn_set_status $ac_retval
1707
1708} # ac_fn_c_try_cpp
1709
1710# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1711# -------------------------------------------------------
1712# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1713# the include files in INCLUDES and setting the cache variable VAR
1714# accordingly.
1715ac_fn_c_check_header_mongrel ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001718 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1720$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001721if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001722 $as_echo_n "(cached) " >&6
1723fi
1724eval ac_res=\$$3
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1726$as_echo "$ac_res" >&6; }
1727else
1728 # Is the header compilable?
1729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1730$as_echo_n "checking $2 usability... " >&6; }
1731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1732/* end confdefs.h. */
1733$4
1734#include <$2>
1735_ACEOF
1736if ac_fn_c_try_compile "$LINENO"; then :
1737 ac_header_compiler=yes
1738else
1739 ac_header_compiler=no
1740fi
1741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1743$as_echo "$ac_header_compiler" >&6; }
1744
1745# Is the header present?
1746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1747$as_echo_n "checking $2 presence... " >&6; }
1748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1749/* end confdefs.h. */
1750#include <$2>
1751_ACEOF
1752if ac_fn_c_try_cpp "$LINENO"; then :
1753 ac_header_preproc=yes
1754else
1755 ac_header_preproc=no
1756fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001757rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1759$as_echo "$ac_header_preproc" >&6; }
1760
1761# So? What about this header?
1762case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1763 yes:no: )
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1765$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1767$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1768 ;;
1769 no:yes:* )
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1771$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1773$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1775$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1777$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1779$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001780( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001781## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001782## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001783 ) | sed "s/^/$as_me: WARNING: /" >&2
1784 ;;
1785esac
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1787$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001788if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001789 $as_echo_n "(cached) " >&6
1790else
1791 eval "$3=\$ac_header_compiler"
1792fi
1793eval ac_res=\$$3
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1795$as_echo "$ac_res" >&6; }
1796fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001797 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001798
1799} # ac_fn_c_check_header_mongrel
1800
1801# ac_fn_c_try_run LINENO
1802# ----------------------
1803# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1804# that executables *can* be run.
1805ac_fn_c_try_run ()
1806{
1807 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808 if { { ac_try="$ac_link"
1809case "(($ac_try" in
1810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1811 *) ac_try_echo=$ac_try;;
1812esac
1813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1814$as_echo "$ac_try_echo"; } >&5
1815 (eval "$ac_link") 2>&5
1816 ac_status=$?
1817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1818 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1819 { { case "(($ac_try" in
1820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1821 *) ac_try_echo=$ac_try;;
1822esac
1823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1824$as_echo "$ac_try_echo"; } >&5
1825 (eval "$ac_try") 2>&5
1826 ac_status=$?
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828 test $ac_status = 0; }; }; then :
1829 ac_retval=0
1830else
1831 $as_echo "$as_me: program exited with status $ac_status" >&5
1832 $as_echo "$as_me: failed program was:" >&5
1833sed 's/^/| /' conftest.$ac_ext >&5
1834
1835 ac_retval=$ac_status
1836fi
1837 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001838 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 as_fn_set_status $ac_retval
1840
1841} # ac_fn_c_try_run
1842
1843# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1844# -------------------------------------------------------
1845# Tests whether HEADER exists and can be compiled using the include files in
1846# INCLUDES, setting the cache variable VAR accordingly.
1847ac_fn_c_check_header_compile ()
1848{
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1851$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001852if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001853 $as_echo_n "(cached) " >&6
1854else
1855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856/* end confdefs.h. */
1857$4
1858#include <$2>
1859_ACEOF
1860if ac_fn_c_try_compile "$LINENO"; then :
1861 eval "$3=yes"
1862else
1863 eval "$3=no"
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001870 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001871
1872} # ac_fn_c_check_header_compile
1873
Matthias Kloseb9621712010-04-24 17:59:49 +00001874# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1875# -------------------------------------------
1876# Tests whether TYPE exists after having included INCLUDES, setting cache
1877# variable VAR accordingly.
1878ac_fn_c_check_type ()
1879{
1880 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1882$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001883if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001884 $as_echo_n "(cached) " >&6
1885else
1886 eval "$3=no"
1887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888/* end confdefs.h. */
1889$4
1890int
1891main ()
1892{
1893if (sizeof ($2))
1894 return 0;
1895 ;
1896 return 0;
1897}
1898_ACEOF
1899if ac_fn_c_try_compile "$LINENO"; then :
1900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1901/* end confdefs.h. */
1902$4
1903int
1904main ()
1905{
1906if (sizeof (($2)))
1907 return 0;
1908 ;
1909 return 0;
1910}
1911_ACEOF
1912if ac_fn_c_try_compile "$LINENO"; then :
1913
1914else
1915 eval "$3=yes"
1916fi
1917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1918fi
1919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_check_type
1927
1928# ac_fn_c_find_uintX_t LINENO BITS VAR
1929# ------------------------------------
1930# Finds an unsigned integer type with width BITS, setting cache variable VAR
1931# accordingly.
1932ac_fn_c_find_uintX_t ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1936$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 # Order is important - never check a type that is potentially smaller
1942 # than half of the expected target width.
1943 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1944 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
1948int
1949main ()
1950{
1951static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001952test_array [0] = 0;
1953return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 case $ac_type in #(
1961 uint$2_t) :
1962 eval "$3=yes" ;; #(
1963 *) :
1964 eval "$3=\$ac_type" ;;
1965esac
1966fi
1967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001968 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001969
1970else
1971 break
1972fi
1973 done
1974fi
1975eval ac_res=\$$3
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980} # ac_fn_c_find_uintX_t
1981
1982# ac_fn_c_find_intX_t LINENO BITS VAR
1983# -----------------------------------
1984# Finds a signed integer type with width BITS, setting cache variable VAR
1985# accordingly.
1986ac_fn_c_find_intX_t ()
1987{
1988 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1990$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001991if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001992 $as_echo_n "(cached) " >&6
1993else
1994 eval "$3=no"
1995 # Order is important - never check a type that is potentially smaller
1996 # than half of the expected target width.
1997 for ac_type in int$2_t 'int' 'long int' \
1998 'long long int' 'short int' 'signed char'; do
1999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2000/* end confdefs.h. */
2001$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002002 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002003int
2004main ()
2005{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002006static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002007test_array [0] = 0;
2008return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002009
2010 ;
2011 return 0;
2012}
2013_ACEOF
2014if ac_fn_c_try_compile "$LINENO"; then :
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002018 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002019int
2020main ()
2021{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002022static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002023 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002024test_array [0] = 0;
2025return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002026
2027 ;
2028 return 0;
2029}
2030_ACEOF
2031if ac_fn_c_try_compile "$LINENO"; then :
2032
2033else
2034 case $ac_type in #(
2035 int$2_t) :
2036 eval "$3=yes" ;; #(
2037 *) :
2038 eval "$3=\$ac_type" ;;
2039esac
2040fi
2041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2042fi
2043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002044 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046else
2047 break
2048fi
2049 done
2050fi
2051eval ac_res=\$$3
2052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2053$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002054 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002055
2056} # ac_fn_c_find_intX_t
2057
2058# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2059# --------------------------------------------
2060# Tries to find the compile-time value of EXPR in a program that includes
2061# INCLUDES, setting VAR accordingly. Returns whether the value could be
2062# computed
2063ac_fn_c_compute_int ()
2064{
2065 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066 if test "$cross_compiling" = yes; then
2067 # Depending upon the size, compute the lo and hi bounds.
2068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
2072main ()
2073{
2074static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002075test_array [0] = 0;
2076return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_lo=0 ac_mid=0
2084 while :; do
2085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086/* end confdefs.h. */
2087$4
2088int
2089main ()
2090{
2091static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002092test_array [0] = 0;
2093return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002094
2095 ;
2096 return 0;
2097}
2098_ACEOF
2099if ac_fn_c_try_compile "$LINENO"; then :
2100 ac_hi=$ac_mid; break
2101else
2102 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2103 if test $ac_lo -le $ac_mid; then
2104 ac_lo= ac_hi=
2105 break
2106 fi
2107 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110 done
2111else
2112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113/* end confdefs.h. */
2114$4
2115int
2116main ()
2117{
2118static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002119test_array [0] = 0;
2120return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002121
2122 ;
2123 return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_compile "$LINENO"; then :
2127 ac_hi=-1 ac_mid=-1
2128 while :; do
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132int
2133main ()
2134{
2135static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002136test_array [0] = 0;
2137return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002138
2139 ;
2140 return 0;
2141}
2142_ACEOF
2143if ac_fn_c_try_compile "$LINENO"; then :
2144 ac_lo=$ac_mid; break
2145else
2146 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2147 if test $ac_mid -le $ac_hi; then
2148 ac_lo= ac_hi=
2149 break
2150 fi
2151 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2152fi
2153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2154 done
2155else
2156 ac_lo= ac_hi=
2157fi
2158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2159fi
2160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161# Binary search between lo and hi bounds.
2162while test "x$ac_lo" != "x$ac_hi"; do
2163 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165/* end confdefs.h. */
2166$4
2167int
2168main ()
2169{
2170static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002171test_array [0] = 0;
2172return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002173
2174 ;
2175 return 0;
2176}
2177_ACEOF
2178if ac_fn_c_try_compile "$LINENO"; then :
2179 ac_hi=$ac_mid
2180else
2181 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2182fi
2183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184done
2185case $ac_lo in #((
2186?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2187'') ac_retval=1 ;;
2188esac
2189 else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192$4
2193static long int longval () { return $2; }
2194static unsigned long int ulongval () { return $2; }
2195#include <stdio.h>
2196#include <stdlib.h>
2197int
2198main ()
2199{
2200
2201 FILE *f = fopen ("conftest.val", "w");
2202 if (! f)
2203 return 1;
2204 if (($2) < 0)
2205 {
2206 long int i = longval ();
2207 if (i != ($2))
2208 return 1;
2209 fprintf (f, "%ld", i);
2210 }
2211 else
2212 {
2213 unsigned long int i = ulongval ();
2214 if (i != ($2))
2215 return 1;
2216 fprintf (f, "%lu", i);
2217 }
2218 /* Do not output a trailing newline, as this causes \r\n confusion
2219 on some platforms. */
2220 return ferror (f) || fclose (f) != 0;
2221
2222 ;
2223 return 0;
2224}
2225_ACEOF
2226if ac_fn_c_try_run "$LINENO"; then :
2227 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2228else
2229 ac_retval=1
2230fi
2231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2232 conftest.$ac_objext conftest.beam conftest.$ac_ext
2233rm -f conftest.val
2234
2235 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002236 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002237 as_fn_set_status $ac_retval
2238
2239} # ac_fn_c_compute_int
2240
2241# ac_fn_c_check_func LINENO FUNC VAR
2242# ----------------------------------
2243# Tests whether FUNC exists, setting the cache variable VAR accordingly
2244ac_fn_c_check_func ()
2245{
2246 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2248$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002249if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002250 $as_echo_n "(cached) " >&6
2251else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2255 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2256#define $2 innocuous_$2
2257
2258/* System header to define __stub macros and hopefully few prototypes,
2259 which can conflict with char $2 (); below.
2260 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2261 <limits.h> exists even on freestanding compilers. */
2262
2263#ifdef __STDC__
2264# include <limits.h>
2265#else
2266# include <assert.h>
2267#endif
2268
2269#undef $2
2270
2271/* Override any GCC internal prototype to avoid an error.
2272 Use char because int might match the return type of a GCC
2273 builtin and then its argument prototype would still apply. */
2274#ifdef __cplusplus
2275extern "C"
2276#endif
2277char $2 ();
2278/* The GNU C library defines this for functions which it implements
2279 to always fail with ENOSYS. Some functions are actually named
2280 something starting with __ and the normal name is an alias. */
2281#if defined __stub_$2 || defined __stub___$2
2282choke me
2283#endif
2284
2285int
2286main ()
2287{
2288return $2 ();
2289 ;
2290 return 0;
2291}
2292_ACEOF
2293if ac_fn_c_try_link "$LINENO"; then :
2294 eval "$3=yes"
2295else
2296 eval "$3=no"
2297fi
2298rm -f core conftest.err conftest.$ac_objext \
2299 conftest$ac_exeext conftest.$ac_ext
2300fi
2301eval ac_res=\$$3
2302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2303$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002304 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002305
2306} # ac_fn_c_check_func
2307
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002308# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2309# ---------------------------------------------
2310# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2311# accordingly.
2312ac_fn_c_check_decl ()
2313{
2314 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2315 as_decl_name=`echo $2|sed 's/ *(.*//'`
2316 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2318$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2319if eval \${$3+:} false; then :
2320 $as_echo_n "(cached) " >&6
2321else
2322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h. */
2324$4
2325int
2326main ()
2327{
2328#ifndef $as_decl_name
2329#ifdef __cplusplus
2330 (void) $as_decl_use;
2331#else
2332 (void) $as_decl_name;
2333#endif
2334#endif
2335
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_compile "$LINENO"; then :
2341 eval "$3=yes"
2342else
2343 eval "$3=no"
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347eval ac_res=\$$3
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
2350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2351
2352} # ac_fn_c_check_decl
2353
Matthias Kloseb9621712010-04-24 17:59:49 +00002354# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2355# ----------------------------------------------------
2356# Tries to find if the field MEMBER exists in type AGGR, after including
2357# INCLUDES, setting cache variable VAR accordingly.
2358ac_fn_c_check_member ()
2359{
2360 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2362$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002363if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002364 $as_echo_n "(cached) " >&6
2365else
2366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367/* end confdefs.h. */
2368$5
2369int
2370main ()
2371{
2372static $2 ac_aggr;
2373if (ac_aggr.$3)
2374return 0;
2375 ;
2376 return 0;
2377}
2378_ACEOF
2379if ac_fn_c_try_compile "$LINENO"; then :
2380 eval "$4=yes"
2381else
2382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2383/* end confdefs.h. */
2384$5
2385int
2386main ()
2387{
2388static $2 ac_aggr;
2389if (sizeof ac_aggr.$3)
2390return 0;
2391 ;
2392 return 0;
2393}
2394_ACEOF
2395if ac_fn_c_try_compile "$LINENO"; then :
2396 eval "$4=yes"
2397else
2398 eval "$4=no"
2399fi
2400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404eval ac_res=\$$4
2405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002408
2409} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002411This file contains any messages produced by compilers while
2412running configure, to aid debugging if configure makes a mistake.
2413
Georg Brandl08a90122012-09-29 09:34:13 +02002414It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002415generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002416
2417 $ $0 $@
2418
2419_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002420exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002421{
2422cat <<_ASUNAME
2423## --------- ##
2424## Platform. ##
2425## --------- ##
2426
2427hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2428uname -m = `(uname -m) 2>/dev/null || echo unknown`
2429uname -r = `(uname -r) 2>/dev/null || echo unknown`
2430uname -s = `(uname -s) 2>/dev/null || echo unknown`
2431uname -v = `(uname -v) 2>/dev/null || echo unknown`
2432
2433/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2434/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2435
2436/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2437/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2438/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002440/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2441/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2442/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2443
2444_ASUNAME
2445
2446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2447for as_dir in $PATH
2448do
2449 IFS=$as_save_IFS
2450 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002451 $as_echo "PATH: $as_dir"
2452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002453IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455} >&5
2456
2457cat >&5 <<_ACEOF
2458
2459
2460## ----------- ##
2461## Core tests. ##
2462## ----------- ##
2463
2464_ACEOF
2465
2466
2467# Keep a trace of the command line.
2468# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002469# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002470# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002471# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002472ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002473ac_configure_args0=
2474ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002475ac_must_keep_next=false
2476for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002477do
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 for ac_arg
2479 do
2480 case $ac_arg in
2481 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2482 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2483 | -silent | --silent | --silen | --sile | --sil)
2484 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002486 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 esac
2488 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002493 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002495 case $ac_arg in
2496 *=* | --config-cache | -C | -disable-* | --disable-* \
2497 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2498 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2499 | -with-* | --with-* | -without-* | --without-* | --x)
2500 case "$ac_configure_args0 " in
2501 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2502 esac
2503 ;;
2504 -* ) ac_must_keep_next=true ;;
2505 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 ;;
2509 esac
2510 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002511done
Matthias Kloseb9621712010-04-24 17:59:49 +00002512{ ac_configure_args0=; unset ac_configure_args0;}
2513{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002514
2515# When interrupted or exit'd, cleanup temporary files, and complete
2516# config.log. We remove comments because anyway the quotes in there
2517# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518# WARNING: Use '\'' to represent an apostrophe within the trap.
2519# 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 +00002520trap 'exit_status=$?
2521 # Save into config.log some information that might help in debugging.
2522 {
2523 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002524
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002526## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002527## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
2529 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530(
2531 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2532 eval ac_val=\$$ac_var
2533 case $ac_val in #(
2534 *${as_nl}*)
2535 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2537$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 esac
2539 case $ac_var in #(
2540 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2542 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 esac ;;
2544 esac
2545 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2548 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 "s/'\''/'\''\\\\'\'''\''/g;
2551 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2552 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002553 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002555 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac |
2557 sort
2558)
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002560
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002561 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002562## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002564 echo
2565 for ac_var in $ac_subst_vars
2566 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 eval ac_val=\$$ac_var
2568 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002569 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002571 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002572 done | sort
2573 echo
2574
2575 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002579 echo
2580 for ac_var in $ac_subst_files
2581 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 eval ac_val=\$$ac_var
2583 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002587 done | sort
2588 echo
2589 fi
2590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002592 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002593## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002594## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 echo
2598 fi
2599 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 $as_echo "$as_me: caught signal $ac_signal"
2601 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 rm -f core *.core core.conftest.* &&
2604 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002607for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002609done
2610ac_signal=0
2611
2612# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002614
Matthias Kloseb9621712010-04-24 17:59:49 +00002615$as_echo "/* confdefs.h */" > confdefs.h
2616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617# Predefined preprocessor variables.
2618
2619cat >>confdefs.h <<_ACEOF
2620#define PACKAGE_NAME "$PACKAGE_NAME"
2621_ACEOF
2622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623cat >>confdefs.h <<_ACEOF
2624#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2625_ACEOF
2626
Martin v. Löwis11437992002-04-12 09:54:03 +00002627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_VERSION "$PACKAGE_VERSION"
2629_ACEOF
2630
Martin v. Löwis11437992002-04-12 09:54:03 +00002631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_STRING "$PACKAGE_STRING"
2633_ACEOF
2634
Martin v. Löwis11437992002-04-12 09:54:03 +00002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2637_ACEOF
2638
Matthias Kloseb9621712010-04-24 17:59:49 +00002639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_URL "$PACKAGE_URL"
2641_ACEOF
2642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643
2644# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002645# Prefer an explicitly selected file to automatically selected ones.
2646ac_site_file1=NONE
2647ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002649 # We do not want a PATH search for config.site.
2650 case $CONFIG_SITE in #((
2651 -*) ac_site_file1=./$CONFIG_SITE;;
2652 */*) ac_site_file1=$CONFIG_SITE;;
2653 *) ac_site_file1=./$CONFIG_SITE;;
2654 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002656 ac_site_file1=$prefix/share/config.site
2657 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658else
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 ac_site_file1=$ac_default_prefix/share/config.site
2660 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002662for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663do
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 test "x$ac_site_file" = xNONE && continue
2665 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2667$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002669 . "$ac_site_file" \
2670 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002673See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674 fi
2675done
2676
2677if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 # Some versions of bash will fail to source /dev/null (special files
2679 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2680 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2682$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2685 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 esac
2687 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688else
Matthias Kloseb9621712010-04-24 17:59:49 +00002689 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2690$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 >$cache_file
2692fi
2693
2694# Check that the precious variables saved in the cache have kept the same
2695# value.
2696ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2699 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2701 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 case $ac_old_set,$ac_new_set in
2703 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2705$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 +00002706 ac_cache_corrupted=: ;;
2707 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2709$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 ac_cache_corrupted=: ;;
2711 ,);;
2712 *)
2713 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 # differences in whitespace do not lead to failure.
2715 ac_old_val_w=`echo x $ac_old_val`
2716 ac_new_val_w=`echo x $ac_new_val`
2717 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2719$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2720 ac_cache_corrupted=:
2721 else
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2723$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2724 eval $ac_var=\$ac_old_val
2725 fi
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2727$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2729$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 fi;;
2731 esac
2732 # Pass precious variables to config.status.
2733 if test "$ac_new_set" = set; then
2734 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002735 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 *) ac_arg=$ac_var=$ac_new_val ;;
2737 esac
2738 case " $ac_configure_args " in
2739 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002740 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 esac
2742 fi
2743done
2744if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2748$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002749 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002751## -------------------- ##
2752## Main body of script. ##
2753## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754
Guido van Rossum7f43da71994-08-01 12:15:30 +00002755ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002756ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002757ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2758ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2759ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002760
Guido van Rossum627b2d71993-12-24 10:39:16 +00002761
Michael W. Hudson54241132001-12-07 15:38:26 +00002762
Trent Nelson4d4ec652012-10-16 08:51:24 -04002763
Trent Nelson5595ab52012-10-17 04:47:31 -04002764if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002765 # If we're building out-of-tree, we need to make sure the following
2766 # resources get picked up before their $srcdir counterparts.
2767 # Objects/ -> typeslots.inc
2768 # Include/ -> Python-ast.h, graminit.h
2769 # Python/ -> importlib.h
2770 # (A side effect of this is that these resources will automatically be
2771 # regenerated when building out-of-tree, regardless of whether or not
2772 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2773 # off.)
2774 BASECPPFLAGS="-IObjects -IInclude -IPython"
2775else
2776 BASECPPFLAGS=""
2777fi
2778
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779
2780
2781
2782
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002783if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002784then
2785# Extract the first word of "hg", so it can be a program name with args.
2786set dummy hg; ac_word=$2
2787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2788$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002789if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002790 $as_echo_n "(cached) " >&6
2791else
2792 if test -n "$HAS_HG"; then
2793 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2794else
2795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2796for as_dir in $PATH
2797do
2798 IFS=$as_save_IFS
2799 test -z "$as_dir" && as_dir=.
2800 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002802 ac_cv_prog_HAS_HG="found"
2803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2804 break 2
2805 fi
2806done
2807 done
2808IFS=$as_save_IFS
2809
2810 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2811fi
2812fi
2813HAS_HG=$ac_cv_prog_HAS_HG
2814if test -n "$HAS_HG"; then
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2816$as_echo "$HAS_HG" >&6; }
2817else
2818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2819$as_echo "no" >&6; }
2820fi
2821
2822
2823else
2824HAS_HG=no-repository
2825fi
2826if test $HAS_HG = found
2827then
2828 HGVERSION="hg id -i \$(srcdir)"
2829 HGTAG="hg id -t \$(srcdir)"
2830 HGBRANCH="hg id -b \$(srcdir)"
2831else
2832 HGVERSION=""
2833 HGTAG=""
2834 HGBRANCH=""
2835fi
2836
2837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002839
2840
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002841ac_aux_dir=
2842for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2843 if test -f "$ac_dir/install-sh"; then
2844 ac_aux_dir=$ac_dir
2845 ac_install_sh="$ac_aux_dir/install-sh -c"
2846 break
2847 elif test -f "$ac_dir/install.sh"; then
2848 ac_aux_dir=$ac_dir
2849 ac_install_sh="$ac_aux_dir/install.sh -c"
2850 break
2851 elif test -f "$ac_dir/shtool"; then
2852 ac_aux_dir=$ac_dir
2853 ac_install_sh="$ac_aux_dir/shtool install -c"
2854 break
2855 fi
2856done
2857if test -z "$ac_aux_dir"; then
2858 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2859fi
2860
2861# These three variables are undocumented and unsupported,
2862# and are intended to be withdrawn in a future Autoconf release.
2863# They can cause serious problems if a builder's source tree is in a directory
2864# whose full name contains unusual characters.
2865ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2866ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2867ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2868
2869
2870# Make sure we can run config.sub.
2871$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2872 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2873
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2875$as_echo_n "checking build system type... " >&6; }
2876if ${ac_cv_build+:} false; then :
2877 $as_echo_n "(cached) " >&6
2878else
2879 ac_build_alias=$build_alias
2880test "x$ac_build_alias" = x &&
2881 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2882test "x$ac_build_alias" = x &&
2883 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2884ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2885 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2886
2887fi
2888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2889$as_echo "$ac_cv_build" >&6; }
2890case $ac_cv_build in
2891*-*-*) ;;
2892*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2893esac
2894build=$ac_cv_build
2895ac_save_IFS=$IFS; IFS='-'
2896set x $ac_cv_build
2897shift
2898build_cpu=$1
2899build_vendor=$2
2900shift; shift
2901# Remember, the first character of IFS is used to create $*,
2902# except with old shells:
2903build_os=$*
2904IFS=$ac_save_IFS
2905case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2906
2907
2908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2909$as_echo_n "checking host system type... " >&6; }
2910if ${ac_cv_host+:} false; then :
2911 $as_echo_n "(cached) " >&6
2912else
2913 if test "x$host_alias" = x; then
2914 ac_cv_host=$ac_cv_build
2915else
2916 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2917 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2918fi
2919
2920fi
2921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2922$as_echo "$ac_cv_host" >&6; }
2923case $ac_cv_host in
2924*-*-*) ;;
2925*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2926esac
2927host=$ac_cv_host
2928ac_save_IFS=$IFS; IFS='-'
2929set x $ac_cv_host
2930shift
2931host_cpu=$1
2932host_vendor=$2
2933shift; shift
2934# Remember, the first character of IFS is used to create $*,
2935# except with old shells:
2936host_os=$*
2937IFS=$ac_save_IFS
2938case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2939
2940
2941
doko@python.orga10e4a92013-01-25 18:45:12 +01002942
2943
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002944if test "$cross_compiling" = yes; then
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2946$as_echo_n "checking for python interpreter for cross build... " >&6; }
2947 if test -z "$PYTHON_FOR_BUILD"; then
2948 for interp in python$PACKAGE_VERSION python3 python; do
2949 which $interp >/dev/null 2>&1 || continue
2950 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2951 break
2952 fi
2953 interp=
2954 done
2955 if test x$interp = x; then
2956 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2957 fi
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2959$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002960 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/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002961 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002962elif test "$cross_compiling" = maybe; then
2963 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002964else
2965 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2966fi
2967
2968
Martin v. Löwis11437992002-04-12 09:54:03 +00002969
Benjamin Petersond23f8222009-04-05 19:13:16 +00002970if test "$prefix" != "/"; then
2971 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2972fi
2973
2974
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
2976
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002977# We don't use PACKAGE_ variables, and they cause conflicts
2978# with other autoconf-based packages that include Python.h
2979grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2980rm confdefs.h
2981mv confdefs.h.new confdefs.h
2982
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002983
Georg Brandl08a90122012-09-29 09:34:13 +02002984VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002985
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002986# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002987
2988SOVERSION=1.0
2989
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002990# The later defininition of _XOPEN_SOURCE disables certain features
2991# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002994
2995
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002996# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2997# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2998# them.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003001
3002
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003003# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3004# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3005# them.
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003008
3009
Martin v. Löwisd6320502004-08-12 13:45:08 +00003010# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3011# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3012
Matthias Kloseb9621712010-04-24 17:59:49 +00003013$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003014
3015
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003016# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3017# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3018# them.
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003021
3022
3023
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003024define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003025
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003026# Arguments passed to configure.
3027
3028CONFIG_ARGS="$ac_configure_args"
3029
Matthias Kloseb9621712010-04-24 17:59:49 +00003030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3031$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003032# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003033if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 case $enableval in
3036 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003037 # Locate the best usable SDK, see Mac/README.txt for more
3038 # information
3039 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003040 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003042 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3043 if test ! -d "${enableval}"
3044 then
3045 enableval=/
3046 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048 ;;
3049 esac
3050 case $enableval in
3051 no)
3052 UNIVERSALSDK=
3053 enable_universalsdk=
3054 ;;
3055 *)
3056 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057 if test ! -d "${UNIVERSALSDK}"
3058 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003059 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061 ;;
3062 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003063
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003064
Thomas Wouters477c8d52006-05-27 19:21:47 +00003065else
3066
3067 UNIVERSALSDK=
3068 enable_universalsdk=
3069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003070fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003071
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003072if test -n "${UNIVERSALSDK}"
3073then
Matthias Kloseb9621712010-04-24 17:59:49 +00003074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3075$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076else
Matthias Kloseb9621712010-04-24 17:59:49 +00003077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3078$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003079fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003081
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003082
Ned Deily87adb6e2013-10-18 21:09:56 -07003083ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003084
Ned Deilycbfb9a52012-06-23 16:02:19 -07003085# For backward compatibility reasons we prefer to select '32-bit' if available,
3086# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003088if test "`uname -s`" = "Darwin"
3089then
3090 if test -n "${UNIVERSALSDK}"
3091 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003092 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003093 then
3094 UNIVERSAL_ARCHS="intel"
3095 fi
3096 fi
3097fi
3098
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003099
Matthias Kloseb9621712010-04-24 17:59:49 +00003100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3101$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003102
3103# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003104if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003106 UNIVERSAL_ARCHS="$withval"
3107
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003108fi
3109
Ned Deily87adb6e2013-10-18 21:09:56 -07003110if test -n "${UNIVERSALSDK}"
3111then
3112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3113$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3114else
3115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3116$as_echo "no" >&6; }
3117fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003119
3120# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003121if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003122 withval=$with_framework_name;
3123 PYTHONFRAMEWORK=${withval}
3124 PYTHONFRAMEWORKDIR=${withval}.framework
3125 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3126
3127else
3128
3129 PYTHONFRAMEWORK=Python
3130 PYTHONFRAMEWORKDIR=Python.framework
3131 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3132
3133fi
3134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003136if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003138 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003139 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003140 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003141 esac
3142 case $enableval in
3143 no)
3144 PYTHONFRAMEWORK=
3145 PYTHONFRAMEWORKDIR=no-framework
3146 PYTHONFRAMEWORKPREFIX=
3147 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003148 FRAMEWORKINSTALLFIRST=
3149 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003150 FRAMEWORKALTINSTALLFIRST=
3151 FRAMEWORKALTINSTALLLAST=
3152 if test "x${prefix}" = "xNONE"; then
3153 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3154 else
3155 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3156 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003157 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003158 ;;
3159 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003160 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003161 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003162 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003163 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003164 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3165 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003166 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003167
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003168 if test "x${prefix}" = "xNONE" ; then
3169 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003170
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003171 else
3172 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3173 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003174
3175 case "${enableval}" in
3176 /System*)
3177 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3178 if test "${prefix}" = "NONE" ; then
3179 # See below
3180 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3181 fi
3182 ;;
3183
3184 /Library*)
3185 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3186 ;;
3187
3188 */Library/Frameworks)
3189 MDIR="`dirname "${enableval}"`"
3190 MDIR="`dirname "${MDIR}"`"
3191 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3192
3193 if test "${prefix}" = "NONE"; then
3194 # User hasn't specified the
3195 # --prefix option, but wants to install
3196 # the framework in a non-default location,
3197 # ensure that the compatibility links get
3198 # installed relative to that prefix as well
3199 # instead of in /usr/local.
3200 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3201 fi
3202 ;;
3203
3204 *)
3205 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3206 ;;
3207 esac
3208
Jack Jansen127e56e2001-09-11 14:41:54 +00003209 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003210
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003211 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003216
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003217 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3218
3219 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3220
Jack Jansene578a632001-08-15 01:27:14 +00003221 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003222
Guido van Rossum563e7081996-09-10 18:20:48 +00003223else
Martin v. Löwis11437992002-04-12 09:54:03 +00003224
Jack Jansene578a632001-08-15 01:27:14 +00003225 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003226 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003227 PYTHONFRAMEWORKPREFIX=
3228 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003229 FRAMEWORKINSTALLFIRST=
3230 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003231 FRAMEWORKALTINSTALLFIRST=
3232 FRAMEWORKALTINSTALLLAST=
3233 if test "x${prefix}" = "xNONE" ; then
3234 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3235 else
3236 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3237 fi
Jack Jansene578a632001-08-15 01:27:14 +00003238 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241fi
3242
Thomas Wouters477c8d52006-05-27 19:21:47 +00003243
3244
Michael W. Hudson54241132001-12-07 15:38:26 +00003245
3246
3247
3248
Jack Jansene578a632001-08-15 01:27:14 +00003249
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003250
3251
3252
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003253
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003254
Jack Jansene578a632001-08-15 01:27:14 +00003255##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003256## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003257## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003258##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003259# Set name for machine-dependent library files
3260
Matthias Kloseb9621712010-04-24 17:59:49 +00003261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3262$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003263if test -z "$MACHDEP"
3264then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 # avoid using uname for cross builds
3266 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003267 # ac_sys_system and ac_sys_release are used for setting
3268 # a lot of different things including 'define_xopen_source'
3269 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003270 case "$host" in
3271 *-*-linux*)
3272 ac_sys_system=Linux
3273 ;;
3274 *-*-cygwin*)
3275 ac_sys_system=Cygwin
3276 ;;
3277 *)
3278 # for now, limit cross builds to known configurations
3279 MACHDEP="unknown"
3280 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3281 esac
3282 ac_sys_release=
3283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003284 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003285 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003286 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003287 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003289 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 fi
3292 ac_md_system=`echo $ac_sys_system |
3293 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3294 ac_md_release=`echo $ac_sys_release |
3295 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3296 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003297
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003299 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003300 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003301 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003302 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003303 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003305fi
Guido van Rossum91922671997-10-09 20:24:13 +00003306
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003307
3308if test "$cross_compiling" = yes; then
3309 case "$host" in
3310 *-*-linux*)
3311 case "$host_cpu" in
3312 arm*)
3313 _host_cpu=arm
3314 ;;
3315 *)
3316 _host_cpu=$host_cpu
3317 esac
3318 ;;
3319 *-*-cygwin*)
3320 _host_cpu=
3321 ;;
3322 *)
3323 # for now, limit cross builds to known configurations
3324 MACHDEP="unknown"
3325 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3326 esac
3327 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3328fi
3329
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003330# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3331# disable features if it is defined, without any means to access these
3332# features as extensions. For these systems, we skip the definition of
3333# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3334# some feature, make sure there is no alternative way to access this
3335# feature. Also, when using wildcards, make sure you have verified the
3336# need for not defining _XOPEN_SOURCE on all systems matching the
3337# wildcard, and that the wildcard does not include future systems
3338# (which may remove their limitations).
3339case $ac_sys_system/$ac_sys_release in
3340 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3341 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003342 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003343 # In addition, Stefan Krah confirms that issue #1244610 exists through
3344 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003345 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003346 define_xopen_source=no
3347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Kloseb9621712010-04-24 17:59:49 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003352
3353 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003354 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003355 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3356 # also defined. This can be overridden by defining _BSD_SOURCE
3357 # As this has a different meaning on Linux, only define it on OpenBSD
3358
Matthias Kloseb9621712010-04-24 17:59:49 +00003359$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003360
3361 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003362 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3363 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3364 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003365 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 +00003366 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003367 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3368 # request to enable features supported by the standard as a request
3369 # to disable features not supported by the standard. The best way
3370 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3371 # entirely and define __EXTENSIONS__ instead.
3372 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003373 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3375 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003376 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003377 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003378 define_xopen_source=no;;
3379 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003380 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003381 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003382 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003383 # On FreeBSD 4, the math functions C89 does not cover are never defined
3384 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3385 FreeBSD/4.*)
3386 define_xopen_source=no;;
3387 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3388 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3389 # identifies itself as Darwin/7.*
3390 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3391 # disables platform specific features beyond repair.
3392 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3393 # has no effect, don't bother defining them
3394 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003395 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003396 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003397 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003398 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3399 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3400 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003401 AIX/4)
3402 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003403 AIX/5)
3404 if test `uname -r` -eq 1; then
3405 define_xopen_source=no
3406 fi
3407 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003408 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3409 # defining NI_NUMERICHOST.
3410 QNX/6.3.2)
3411 define_xopen_source=no
3412 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414esac
3415
3416if test $define_xopen_source = yes
3417then
Victor Stinner14d098d2011-09-07 22:29:43 +02003418 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
Victor Stinner14d098d2011-09-07 22:29:43 +02003420$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003421
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
3423 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3424 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3425 # several APIs are not declared. Since this is also needed in some
3426 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Matthias Kloseb9621712010-04-24 17:59:49 +00003428$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003429
3430
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003431
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003432$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003433
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434fi
3435
Guido van Rossum91922671997-10-09 20:24:13 +00003436#
3437# SGI compilers allow the specification of the both the ABI and the
3438# ISA on the command line. Depending on the values of these switches,
3439# different and often incompatable code will be generated.
3440#
3441# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3442# thus supply support for various ABI/ISA combinations. The MACHDEP
3443# variable is also adjusted.
3444#
3445
3446if test ! -z "$SGI_ABI"
3447then
3448 CC="cc $SGI_ABI"
3449 LDFLAGS="$SGI_ABI $LDFLAGS"
3450 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3453$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3456# it may influence the way we can build extensions, so distutils
3457# needs to check it
3458
Thomas Wouters477c8d52006-05-27 19:21:47 +00003459
Jack Jansen6b08a402004-06-03 12:41:45 +00003460CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003461EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003462
Guido van Rossum627b2d71993-12-24 10:39:16 +00003463# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003464
3465# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3466# for debug/optimization stuff. BASECFLAGS is for flags that are required
3467# just to get things to compile and link. Users are free to override OPT
3468# when running configure or make. The build should not break if they do.
3469# BASECFLAGS should generally not be messed with, however.
3470
3471# XXX shouldn't some/most/all of this code be merged with the stuff later
3472# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3474$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003477if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003479 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003480 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003481 without_gcc=yes;;
3482 yes) CC=gcc
3483 without_gcc=no;;
3484 *) CC=$withval
3485 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003486 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003487else
Martin v. Löwis11437992002-04-12 09:54:03 +00003488
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003489 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003490 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003491 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003492 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003493 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494fi
3495
Matthias Kloseb9621712010-04-24 17:59:49 +00003496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3497$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003498
Guido van Rossum8b131c51995-03-09 14:10:13 +00003499# If the user switches compilers, we can't believe the cache
3500if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3501then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003502 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003503(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003504fi
3505
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003506# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3507# when the compiler supports them, but we don't always want -O2, and
3508# we set -g later.
3509if test -z "$CFLAGS"; then
3510 CFLAGS=
3511fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003512
3513if test "$ac_sys_system" = "Darwin"
3514then
3515 # Compiler selection on MacOSX is more complicated than
3516 # AC_PROG_CC can handle, see Mac/README.txt for more
3517 # information
3518 if test -z "${CC}"
3519 then
3520 found_gcc=
3521 found_clang=
3522 as_save_IFS=$IFS; IFS=:
3523 for as_dir in $PATH
3524 do
3525 IFS=$as_save_IFS
3526 if test -x $as_dir/gcc; then
3527 if test -z "${found_gcc}"; then
3528 found_gcc=$as_dir/gcc
3529 fi
3530 fi
3531 if test -x $as_dir/clang; then
3532 if test -z "${found_clang}"; then
3533 found_clang=$as_dir/clang
3534 fi
3535 fi
3536 done
3537 IFS=$as_save_IFS
3538
3539 if test -n "$found_gcc" -a -n "$found_clang"
3540 then
3541 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3542 then
3543 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3544$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3545 CC="$found_clang"
3546 CXX="$found_clang++"
3547 fi
3548
3549
3550 elif test -z "$found_gcc" -a -n "$found_clang"
3551 then
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3553$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3554 CC="$found_clang"
3555 CXX="$found_clang++"
3556
3557 elif test -z "$found_gcc" -a -z "$found_clang"
3558 then
3559 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3560 if test -n "${found_clang}"
3561 then
3562 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3563$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3564 CC="${found_clang}"
3565 CXX="`/usr/bin/xcrun -find clang++`"
3566
3567 # else: use default behaviour
3568 fi
3569 fi
3570 fi
3571fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003572ac_ext=c
3573ac_cpp='$CPP $CPPFLAGS'
3574ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3575ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3576ac_compiler_gnu=$ac_cv_c_compiler_gnu
3577if test -n "$ac_tool_prefix"; then
3578 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3579set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3581$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003582if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003584else
3585 if test -n "$CC"; then
3586 ac_cv_prog_CC="$CC" # Let the user override the test.
3587else
Martin v. Löwis11437992002-04-12 09:54:03 +00003588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3589for as_dir in $PATH
3590do
3591 IFS=$as_save_IFS
3592 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 $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 +00003597 break 2
3598 fi
3599done
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003602
Jack Jansendd19cf82001-12-06 22:36:17 +00003603fi
3604fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003605CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003606if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3608$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003609else
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3611$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003612fi
3613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615fi
3616if test -z "$ac_cv_prog_CC"; then
3617 ac_ct_CC=$CC
3618 # Extract the first word of "gcc", so it can be a program name with args.
3619set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3621$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003622if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003624else
3625 if test -n "$ac_ct_CC"; then
3626 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3627else
3628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3629for as_dir in $PATH
3630do
3631 IFS=$as_save_IFS
3632 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 $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 +00003637 break 2
3638 fi
3639done
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003641IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003642
3643fi
3644fi
3645ac_ct_CC=$ac_cv_prog_ac_ct_CC
3646if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3648$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649else
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3651$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003652fi
3653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654 if test "x$ac_ct_CC" = x; then
3655 CC=""
3656 else
3657 case $cross_compiling:$ac_tool_warned in
3658yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003659{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3660$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661ac_tool_warned=yes ;;
3662esac
3663 CC=$ac_ct_CC
3664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003665else
3666 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003667fi
3668
Jack Jansendd19cf82001-12-06 22:36:17 +00003669if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003670 if test -n "$ac_tool_prefix"; then
3671 # 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 +00003672set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3674$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003675if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003677else
3678 if test -n "$CC"; then
3679 ac_cv_prog_CC="$CC" # Let the user override the test.
3680else
Martin v. Löwis11437992002-04-12 09:54:03 +00003681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3682for as_dir in $PATH
3683do
3684 IFS=$as_save_IFS
3685 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003686 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 $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 +00003690 break 2
3691 fi
3692done
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003695
3696fi
3697fi
3698CC=$ac_cv_prog_CC
3699if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3701$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003702else
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3704$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003705fi
3706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003707
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003709fi
3710if test -z "$CC"; then
3711 # Extract the first word of "cc", so it can be a program name with args.
3712set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3714$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003715if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003717else
3718 if test -n "$CC"; then
3719 ac_cv_prog_CC="$CC" # Let the user override the test.
3720else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003721 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3723for as_dir in $PATH
3724do
3725 IFS=$as_save_IFS
3726 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3730 ac_prog_rejected=yes
3731 continue
3732 fi
3733 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $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 +00003735 break 2
3736 fi
3737done
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003740
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741if test $ac_prog_rejected = yes; then
3742 # We found a bogon in the path, so make sure we never use it.
3743 set dummy $ac_cv_prog_CC
3744 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746 # We chose a different compiler from the bogus one.
3747 # However, it has the same basename, so the bogon will be chosen
3748 # first if we set CC to just the basename; use the full file name.
3749 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003750 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751 fi
3752fi
3753fi
3754fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003755CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3758$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759else
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3761$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762fi
3763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764
Martin v. Löwis11437992002-04-12 09:54:03 +00003765fi
3766if test -z "$CC"; then
3767 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 do
3770 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3771set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003774if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003776else
3777 if test -n "$CC"; then
3778 ac_cv_prog_CC="$CC" # Let the user override the test.
3779else
Martin v. Löwis11437992002-04-12 09:54:03 +00003780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783 IFS=$as_save_IFS
3784 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 $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 +00003789 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003790 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003791done
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003794
3795fi
3796fi
3797CC=$ac_cv_prog_CC
3798if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3800$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3803$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003804fi
3805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 test -n "$CC" && break
3808 done
3809fi
3810if test -z "$CC"; then
3811 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003813do
3814 # Extract the first word of "$ac_prog", so it can be a program name with args.
3815set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3817$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003818if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003820else
3821 if test -n "$ac_ct_CC"; then
3822 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3823else
3824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3825for as_dir in $PATH
3826do
3827 IFS=$as_save_IFS
3828 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003831 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 $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 +00003833 break 2
3834 fi
3835done
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839fi
3840fi
3841ac_ct_CC=$ac_cv_prog_ac_ct_CC
3842if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3844$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003845else
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3847$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 test -n "$ac_ct_CC" && break
3852done
Michael W. Hudson54241132001-12-07 15:38:26 +00003853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003854 if test "x$ac_ct_CC" = x; then
3855 CC=""
3856 else
3857 case $cross_compiling:$ac_tool_warned in
3858yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003859{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3860$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861ac_tool_warned=yes ;;
3862esac
3863 CC=$ac_ct_CC
3864 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003865fi
3866
3867fi
3868
3869
Matthias Kloseb9621712010-04-24 17:59:49 +00003870test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003872as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003873See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003874
3875# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003876$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3877set X $ac_compile
3878ac_compiler=$2
3879for ac_option in --version -v -V -qversion; do
3880 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881case "(($ac_try" in
3882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3883 *) ac_try_echo=$ac_try;;
3884esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003885eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3886$as_echo "$ac_try_echo"; } >&5
3887 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003888 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 if test -s conftest.err; then
3890 sed '10a\
3891... rest of stderr output deleted ...
3892 10q' conftest.err >conftest.er1
3893 cat conftest.er1 >&5
3894 fi
3895 rm -f conftest.er1 conftest.err
3896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3897 test $ac_status = 0; }
3898done
Martin v. Löwis11437992002-04-12 09:54:03 +00003899
Matthias Kloseb9621712010-04-24 17:59:49 +00003900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003901/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003902
Martin v. Löwis11437992002-04-12 09:54:03 +00003903int
3904main ()
3905{
3906
3907 ;
3908 return 0;
3909}
3910_ACEOF
3911ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003912ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003913# Try to create an executable without -o first, disregard a.out.
3914# It will help us diagnose broken compilers, and finding out an intuition
3915# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3917$as_echo_n "checking whether the C compiler works... " >&6; }
3918ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3919
3920# The possible output files:
3921ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923ac_rmfiles=
3924for ac_file in $ac_files
3925do
3926 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3929 esac
3930done
3931rm -f $ac_rmfiles
3932
Matthias Kloseb9621712010-04-24 17:59:49 +00003933if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934case "(($ac_try" in
3935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936 *) ac_try_echo=$ac_try;;
3937esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3939$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003941 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3943 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3945# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3946# in a Makefile. We should not override ac_cv_exeext if it was cached,
3947# so that the user can short-circuit this test for compilers unknown to
3948# Autoconf.
3949for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003950do
3951 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003952 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954 ;;
3955 [ab].out )
3956 # We found the default executable, but exeext='' is most
3957 # certainly right.
3958 break;;
3959 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 then :; else
3962 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3963 fi
3964 # We set ac_cv_exeext here because the later test for it is not
3965 # safe: cross compilers may not add the suffix if given an `-o'
3966 # argument, so we may need to know it at that point already.
3967 # Even if this section looks crufty: it has the advantage of
3968 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003969 break;;
3970 * )
3971 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 esac
3973done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974test "$ac_cv_exeext" = no && ac_cv_exeext=
3975
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003976else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977 ac_file=''
3978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003979if test -z "$ac_file"; then :
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3981$as_echo "no" >&6; }
3982$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003983sed 's/^/| /' conftest.$ac_ext >&5
3984
Matthias Kloseb9621712010-04-24 17:59:49 +00003985{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003987as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003988See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003989else
3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3991$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3994$as_echo_n "checking for C compiler default output file name... " >&6; }
3995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3996$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998
Matthias Kloseb9621712010-04-24 17:59:49 +00003999rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4002$as_echo_n "checking for suffix of executables... " >&6; }
4003if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004004case "(($ac_try" in
4005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006 *) ac_try_echo=$ac_try;;
4007esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4009$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004011 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4013 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4015# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4016# work properly (i.e., refer to `conftest.exe'), while it won't with
4017# `rm'.
4018for ac_file in conftest.exe conftest conftest.*; do
4019 test -f "$ac_file" || continue
4020 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004022 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4023 break;;
4024 * ) break;;
4025 esac
4026done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027else
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004030as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004031See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004033rm -f conftest conftest$ac_cv_exeext
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4035$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036
4037rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004038EXEEXT=$ac_cv_exeext
4039ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4041/* end confdefs.h. */
4042#include <stdio.h>
4043int
4044main ()
4045{
4046FILE *f = fopen ("conftest.out", "w");
4047 return ferror (f) || fclose (f) != 0;
4048
4049 ;
4050 return 0;
4051}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004053ac_clean_files="$ac_clean_files conftest.out"
4054# Check that the compiler produces executables we can run. If not, either
4055# the compiler is broken, or we cross compile.
4056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4057$as_echo_n "checking whether we are cross compiling... " >&6; }
4058if test "$cross_compiling" != yes; then
4059 { { ac_try="$ac_link"
4060case "(($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_link") 2>&5
4067 ac_status=$?
4068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4069 test $ac_status = 0; }
4070 if { ac_try='./conftest$ac_cv_exeext'
4071 { { case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
4075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076$as_echo "$ac_try_echo"; } >&5
4077 (eval "$ac_try") 2>&5
4078 ac_status=$?
4079 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080 test $ac_status = 0; }; }; then
4081 cross_compiling=no
4082 else
4083 if test "$cross_compiling" = maybe; then
4084 cross_compiling=yes
4085 else
4086 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4087$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004088as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004089If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004090See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 fi
4092 fi
4093fi
4094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4095$as_echo "$cross_compiling" >&6; }
4096
4097rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4098ac_clean_files=$ac_clean_files_save
4099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4100$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004101if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 $as_echo_n "(cached) " >&6
4103else
4104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004105/* end confdefs.h. */
4106
4107int
4108main ()
4109{
4110
4111 ;
4112 return 0;
4113}
4114_ACEOF
4115rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004116if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117case "(($ac_try" in
4118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4119 *) ac_try_echo=$ac_try;;
4120esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004121eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4122$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004124 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4126 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004127 for ac_file in conftest.o conftest.obj conftest.*; do
4128 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4132 break;;
4133 esac
4134done
4135else
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004137sed 's/^/| /' conftest.$ac_ext >&5
4138
Matthias Kloseb9621712010-04-24 17:59:49 +00004139{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004141as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004142See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004143fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004144rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4147$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004148OBJEXT=$ac_cv_objext
4149ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4151$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004152if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004154else
Matthias Kloseb9621712010-04-24 17:59:49 +00004155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004157
Martin v. Löwis11437992002-04-12 09:54:03 +00004158int
4159main ()
4160{
4161#ifndef __GNUC__
4162 choke me
4163#endif
4164
4165 ;
4166 return 0;
4167}
4168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004170 ac_compiler_gnu=yes
4171else
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004175ac_cv_c_compiler_gnu=$ac_compiler_gnu
4176
4177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4179$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4180if test $ac_compiler_gnu = yes; then
4181 GCC=yes
4182else
4183 GCC=
4184fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004185ac_test_CFLAGS=${CFLAGS+set}
4186ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4188$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004189if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004191else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192 ac_save_c_werror_flag=$ac_c_werror_flag
4193 ac_c_werror_flag=yes
4194 ac_cv_prog_cc_g=no
4195 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004198
Martin v. Löwis11437992002-04-12 09:54:03 +00004199int
4200main ()
4201{
4202
4203 ;
4204 return 0;
4205}
4206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004207if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004208 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004209else
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 CFLAGS=""
4211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212/* end confdefs.h. */
4213
4214int
4215main ()
4216{
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004222if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223
Matthias Kloseb9621712010-04-24 17:59:49 +00004224else
4225 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228/* end confdefs.h. */
4229
4230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004238if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4246 ac_c_werror_flag=$ac_save_c_werror_flag
4247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4249$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004250if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004251 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004252elif test $ac_cv_prog_cc_g = yes; then
4253 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004254 CFLAGS="-g -O2"
4255 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004256 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257 fi
4258else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004259 if test "$GCC" = yes; then
4260 CFLAGS="-O2"
4261 else
4262 CFLAGS=
4263 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4266$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004267if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004269else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004271ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004273/* end confdefs.h. */
4274#include <stdarg.h>
4275#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004276struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004277/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4278struct buf { int x; };
4279FILE * (*rcsopen) (struct buf *, struct stat *, int);
4280static char *e (p, i)
4281 char **p;
4282 int i;
4283{
4284 return p[i];
4285}
4286static char *f (char * (*g) (char **, int), char **p, ...)
4287{
4288 char *s;
4289 va_list v;
4290 va_start (v,p);
4291 s = g (p, va_arg (v,int));
4292 va_end (v);
4293 return s;
4294}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004295
4296/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4297 function prototypes and stuff, but not '\xHH' hex character constants.
4298 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004300 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4301 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004303int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4306 inside strings and character constants. */
4307#define FOO(x) 'x'
4308int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4309
Skip Montanaro6dead952003-09-25 14:50:04 +00004310int test (int i, double x);
4311struct s1 {int (*f) (int a);};
4312struct s2 {int (*f) (double a);};
4313int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4314int argc;
4315char **argv;
4316int
4317main ()
4318{
4319return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4320 ;
4321 return 0;
4322}
4323_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4325 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004326do
4327 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331rm -f core conftest.err conftest.$ac_objext
4332 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004333done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004335CC=$ac_save_CC
4336
4337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338# AC_CACHE_VAL
4339case "x$ac_cv_prog_cc_c89" in
4340 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4342$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4345$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004346 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4349$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004350esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004351if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004352
Matthias Kloseb9621712010-04-24 17:59:49 +00004353fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004354
Martin v. Löwis11437992002-04-12 09:54:03 +00004355ac_ext=c
4356ac_cpp='$CPP $CPPFLAGS'
4357ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4358ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4359ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004360
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004361
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004362
4363
Matthias Kloseb9621712010-04-24 17:59:49 +00004364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4365$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004368if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004370
4371 case $withval in
4372 no) with_cxx_main=no
4373 MAINCC='$(CC)';;
4374 yes) with_cxx_main=yes
4375 MAINCC='$(CXX)';;
4376 *) with_cxx_main=yes
4377 MAINCC=$withval
4378 if test -z "$CXX"
4379 then
4380 CXX=$withval
4381 fi;;
4382 esac
4383else
4384
4385 with_cxx_main=no
4386 MAINCC='$(CC)'
4387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388fi
4389
Matthias Kloseb9621712010-04-24 17:59:49 +00004390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4391$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004392
4393preset_cxx="$CXX"
4394if test -z "$CXX"
4395then
4396 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004397 gcc) if test -n "$ac_tool_prefix"; then
4398 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4399set dummy ${ac_tool_prefix}g++; ac_word=$2
4400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4401$as_echo_n "checking for $ac_word... " >&6; }
4402if ${ac_cv_path_CXX+:} false; then :
4403 $as_echo_n "(cached) " >&6
4404else
4405 case $CXX in
4406 [\\/]* | ?:[\\/]*)
4407 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4408 ;;
4409 *)
4410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4411for as_dir in notfound
4412do
4413 IFS=$as_save_IFS
4414 test -z "$as_dir" && as_dir=.
4415 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004416 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004417 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4418 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4419 break 2
4420 fi
4421done
4422 done
4423IFS=$as_save_IFS
4424
4425 ;;
4426esac
4427fi
4428CXX=$ac_cv_path_CXX
4429if test -n "$CXX"; then
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4431$as_echo "$CXX" >&6; }
4432else
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4434$as_echo "no" >&6; }
4435fi
4436
4437
4438fi
4439if test -z "$ac_cv_path_CXX"; then
4440 ac_pt_CXX=$CXX
4441 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004442set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4444$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004445if ${ac_cv_path_ac_pt_CXX+:} false; then :
4446 $as_echo_n "(cached) " >&6
4447else
4448 case $ac_pt_CXX in
4449 [\\/]* | ?:[\\/]*)
4450 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4451 ;;
4452 *)
4453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4454for as_dir in notfound
4455do
4456 IFS=$as_save_IFS
4457 test -z "$as_dir" && as_dir=.
4458 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004459 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004460 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4461 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4462 break 2
4463 fi
4464done
4465 done
4466IFS=$as_save_IFS
4467
4468 ;;
4469esac
4470fi
4471ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4472if test -n "$ac_pt_CXX"; then
4473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4474$as_echo "$ac_pt_CXX" >&6; }
4475else
4476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4477$as_echo "no" >&6; }
4478fi
4479
4480 if test "x$ac_pt_CXX" = x; then
4481 CXX="g++"
4482 else
4483 case $cross_compiling:$ac_tool_warned in
4484yes:)
4485{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4486$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4487ac_tool_warned=yes ;;
4488esac
4489 CXX=$ac_pt_CXX
4490 fi
4491else
4492 CXX="$ac_cv_path_CXX"
4493fi
4494 ;;
4495 cc) if test -n "$ac_tool_prefix"; then
4496 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4497set dummy ${ac_tool_prefix}c++; ac_word=$2
4498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4499$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004500if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004501 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004502else
4503 case $CXX in
4504 [\\/]* | ?:[\\/]*)
4505 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4506 ;;
4507 *)
4508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509for as_dir in notfound
4510do
4511 IFS=$as_save_IFS
4512 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004514 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004515 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004517 break 2
4518 fi
4519done
Matthias Kloseb9621712010-04-24 17:59:49 +00004520 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004521IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004522
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004523 ;;
4524esac
4525fi
4526CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004527if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4529$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004530else
Matthias Kloseb9621712010-04-24 17:59:49 +00004531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4532$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004534
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004535
4536fi
4537if test -z "$ac_cv_path_CXX"; then
4538 ac_pt_CXX=$CXX
4539 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004540set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4542$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004543if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004544 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004545else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004546 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004547 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004548 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 +00004549 ;;
4550 *)
4551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4552for as_dir in notfound
4553do
4554 IFS=$as_save_IFS
4555 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004556 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004558 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004560 break 2
4561 fi
4562done
Matthias Kloseb9621712010-04-24 17:59:49 +00004563 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004564IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004565
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004566 ;;
4567esac
4568fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004569ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4570if test -n "$ac_pt_CXX"; then
4571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4572$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004573else
Matthias Kloseb9621712010-04-24 17:59:49 +00004574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4575$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004577
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004578 if test "x$ac_pt_CXX" = x; then
4579 CXX="c++"
4580 else
4581 case $cross_compiling:$ac_tool_warned in
4582yes:)
4583{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4584$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4585ac_tool_warned=yes ;;
4586esac
4587 CXX=$ac_pt_CXX
4588 fi
4589else
4590 CXX="$ac_cv_path_CXX"
4591fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004593 clang|*/clang) if test -n "$ac_tool_prefix"; then
4594 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4595set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
4598if ${ac_cv_path_CXX+:} false; then :
4599 $as_echo_n "(cached) " >&6
4600else
4601 case $CXX in
4602 [\\/]* | ?:[\\/]*)
4603 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4604 ;;
4605 *)
4606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in notfound
4608do
4609 IFS=$as_save_IFS
4610 test -z "$as_dir" && as_dir=.
4611 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004613 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615 break 2
4616 fi
4617done
4618 done
4619IFS=$as_save_IFS
4620
Ned Deilycbfb9a52012-06-23 16:02:19 -07004621 ;;
4622esac
4623fi
4624CXX=$ac_cv_path_CXX
4625if test -n "$CXX"; then
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4627$as_echo "$CXX" >&6; }
4628else
4629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4630$as_echo "no" >&6; }
4631fi
4632
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004633
4634fi
4635if test -z "$ac_cv_path_CXX"; then
4636 ac_pt_CXX=$CXX
4637 # Extract the first word of "clang++", so it can be a program name with args.
4638set dummy clang++; ac_word=$2
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4640$as_echo_n "checking for $ac_word... " >&6; }
4641if ${ac_cv_path_ac_pt_CXX+:} false; then :
4642 $as_echo_n "(cached) " >&6
4643else
4644 case $ac_pt_CXX in
4645 [\\/]* | ?:[\\/]*)
4646 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4647 ;;
4648 *)
4649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4650for as_dir in notfound
4651do
4652 IFS=$as_save_IFS
4653 test -z "$as_dir" && as_dir=.
4654 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004656 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4658 break 2
4659 fi
4660done
4661 done
4662IFS=$as_save_IFS
4663
4664 ;;
4665esac
4666fi
4667ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4668if test -n "$ac_pt_CXX"; then
4669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4670$as_echo "$ac_pt_CXX" >&6; }
4671else
4672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4673$as_echo "no" >&6; }
4674fi
4675
4676 if test "x$ac_pt_CXX" = x; then
4677 CXX="clang++"
4678 else
4679 case $cross_compiling:$ac_tool_warned in
4680yes:)
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4682$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4683ac_tool_warned=yes ;;
4684esac
4685 CXX=$ac_pt_CXX
4686 fi
4687else
4688 CXX="$ac_cv_path_CXX"
4689fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004690 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004691 esac
4692 if test "$CXX" = "notfound"
4693 then
4694 CXX=""
4695 fi
4696fi
4697if test -z "$CXX"
4698then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004699 if test -n "$ac_tool_prefix"; then
4700 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4701 do
4702 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4703set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004706if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004707 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004708else
4709 if test -n "$CXX"; then
4710 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4711else
4712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4713for as_dir in $PATH
4714do
4715 IFS=$as_save_IFS
4716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004719 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004721 break 2
4722 fi
4723done
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004725IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004726
4727fi
4728fi
4729CXX=$ac_cv_prog_CXX
4730if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4732$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004733else
Matthias Kloseb9621712010-04-24 17:59:49 +00004734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736fi
4737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004738
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004739 test -n "$CXX" && break
4740 done
4741fi
4742if test -z "$CXX"; then
4743 ac_ct_CXX=$CXX
4744 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4745do
4746 # Extract the first word of "$ac_prog", so it can be a program name with args.
4747set dummy $ac_prog; ac_word=$2
4748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4749$as_echo_n "checking for $ac_word... " >&6; }
4750if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4751 $as_echo_n "(cached) " >&6
4752else
4753 if test -n "$ac_ct_CXX"; then
4754 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4755else
4756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4757for as_dir in $PATH
4758do
4759 IFS=$as_save_IFS
4760 test -z "$as_dir" && as_dir=.
4761 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004763 ac_cv_prog_ac_ct_CXX="$ac_prog"
4764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4765 break 2
4766 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004768 done
4769IFS=$as_save_IFS
4770
4771fi
4772fi
4773ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4774if test -n "$ac_ct_CXX"; then
4775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4776$as_echo "$ac_ct_CXX" >&6; }
4777else
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4779$as_echo "no" >&6; }
4780fi
4781
4782
4783 test -n "$ac_ct_CXX" && break
4784done
4785
4786 if test "x$ac_ct_CXX" = x; then
4787 CXX="notfound"
4788 else
4789 case $cross_compiling:$ac_tool_warned in
4790yes:)
4791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4793ac_tool_warned=yes ;;
4794esac
4795 CXX=$ac_ct_CXX
4796 fi
4797fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798
4799 if test "$CXX" = "notfound"
4800 then
4801 CXX=""
4802 fi
4803fi
4804if test "$preset_cxx" != "$CXX"
4805then
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807
4808 By default, distutils will build C++ extension modules with \"$CXX\".
4809 If this is not intended, then set CXX on the configure command line.
4810 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004811$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812
4813 By default, distutils will build C++ extension modules with \"$CXX\".
4814 If this is not intended, then set CXX on the configure command line.
4815 " >&2;}
4816fi
4817
4818
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4820$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4821save_LDFLAGS="$LDFLAGS"
4822LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004823
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4825/* end confdefs.h. */
4826
4827int
4828main ()
4829{
4830
4831 ;
4832 return 0;
4833}
4834_ACEOF
4835if ac_fn_c_try_link "$LINENO"; then :
4836 NO_AS_NEEDED="-Wl,--no-as-needed"
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4838$as_echo "yes" >&6; }
4839else
4840 NO_AS_NEEDED=""
4841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4842$as_echo "no" >&6; }
4843fi
4844rm -f core conftest.err conftest.$ac_objext \
4845 conftest$ac_exeext conftest.$ac_ext
4846LDFLAGS="$save_LDFLAGS"
4847
4848
4849
4850# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004851ac_ext=c
4852ac_cpp='$CPP $CPPFLAGS'
4853ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4854ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4855ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4857$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004858# On Suns, sometimes $CPP names a directory.
4859if test -n "$CPP" && test -d "$CPP"; then
4860 CPP=
4861fi
4862if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004863 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004865else
Martin v. Löwis11437992002-04-12 09:54:03 +00004866 # Double quotes because CPP needs to be expanded
4867 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4868 do
4869 ac_preproc_ok=false
4870for ac_c_preproc_warn_flag in '' yes
4871do
4872 # Use a header file that comes with gcc, so configuring glibc
4873 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004874 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4875 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004876 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004877 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004879/* end confdefs.h. */
4880#ifdef __STDC__
4881# include <limits.h>
4882#else
4883# include <assert.h>
4884#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004885 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004887if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004888
Matthias Kloseb9621712010-04-24 17:59:49 +00004889else
Martin v. Löwis11437992002-04-12 09:54:03 +00004890 # Broken: fails on valid input.
4891continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004892fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004893rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004895 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004896 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004899#include <ac_nonexistent.h>
4900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004901if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004902 # Broken: success on invalid input.
4903continue
4904else
Martin v. Löwis11437992002-04-12 09:54:03 +00004905 # Passes both tests.
4906ac_preproc_ok=:
4907break
4908fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004909rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004910
4911done
4912# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004913rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004914if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004915 break
4916fi
4917
4918 done
4919 ac_cv_prog_CPP=$CPP
4920
4921fi
4922 CPP=$ac_cv_prog_CPP
4923else
4924 ac_cv_prog_CPP=$CPP
4925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4927$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004928ac_preproc_ok=false
4929for ac_c_preproc_warn_flag in '' yes
4930do
4931 # Use a header file that comes with gcc, so configuring glibc
4932 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004933 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4934 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 # On the NeXT, cc -E runs the code through the compiler's parser,
4936 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004938/* end confdefs.h. */
4939#ifdef __STDC__
4940# include <limits.h>
4941#else
4942# include <assert.h>
4943#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004944 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004946if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004947
Matthias Kloseb9621712010-04-24 17:59:49 +00004948else
Martin v. Löwis11437992002-04-12 09:54:03 +00004949 # Broken: fails on valid input.
4950continue
4951fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004952rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004954 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004955 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004958#include <ac_nonexistent.h>
4959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004960if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004961 # Broken: success on invalid input.
4962continue
4963else
Martin v. Löwis11437992002-04-12 09:54:03 +00004964 # Passes both tests.
4965ac_preproc_ok=:
4966break
4967fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004968rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004969
4970done
4971# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004972rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004973if $ac_preproc_ok; then :
4974
Martin v. Löwis11437992002-04-12 09:54:03 +00004975else
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004978as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004979See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004980fi
4981
4982ac_ext=c
4983ac_cpp='$CPP $CPPFLAGS'
4984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4986ac_compiler_gnu=$ac_cv_c_compiler_gnu
4987
4988
Matthias Kloseb9621712010-04-24 17:59:49 +00004989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4990$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004991if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004992 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004993else
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004995 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004996 # Loop through the user's path and test for each of PROGNAME-LIST
4997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004998for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4999do
5000 IFS=$as_save_IFS
5001 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 for ac_prog in grep ggrep; do
5003 for ac_exec_ext in '' $ac_executable_extensions; do
5004 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005005 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005006# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005007 # Check for GNU $ac_path_GREP
5008case `"$ac_path_GREP" --version 2>&1` in
5009*GNU*)
5010 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5011*)
5012 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005013 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005014 while :
5015 do
5016 cat "conftest.in" "conftest.in" >"conftest.tmp"
5017 mv "conftest.tmp" "conftest.in"
5018 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005020 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5021 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005023 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5024 # Best one so far, save it but keep looking for a better one
5025 ac_cv_path_GREP="$ac_path_GREP"
5026 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005027 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005028 # 10*(2^10) chars as input seems more than enough
5029 test $ac_count -gt 10 && break
5030 done
5031 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5032esac
5033
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 $ac_path_GREP_found && break 3
5035 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005036 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005038IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005040 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 +00005041 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042else
5043 ac_cv_path_GREP=$GREP
5044fi
5045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5048$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049 GREP="$ac_cv_path_GREP"
5050
5051
Matthias Kloseb9621712010-04-24 17:59:49 +00005052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5053$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005054if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005056else
5057 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5058 then ac_cv_path_EGREP="$GREP -E"
5059 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005061 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 # Loop through the user's path and test for each of PROGNAME-LIST
5063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5065do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 for ac_prog in egrep; do
5069 for ac_exec_ext in '' $ac_executable_extensions; do
5070 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005071 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005072# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073 # Check for GNU $ac_path_EGREP
5074case `"$ac_path_EGREP" --version 2>&1` in
5075*GNU*)
5076 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5077*)
5078 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005080 while :
5081 do
5082 cat "conftest.in" "conftest.in" >"conftest.tmp"
5083 mv "conftest.tmp" "conftest.in"
5084 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005086 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5087 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5090 # Best one so far, save it but keep looking for a better one
5091 ac_cv_path_EGREP="$ac_path_EGREP"
5092 ac_path_EGREP_max=$ac_count
5093 fi
5094 # 10*(2^10) chars as input seems more than enough
5095 test $ac_count -gt 10 && break
5096 done
5097 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5098esac
5099
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 $ac_path_EGREP_found && break 3
5101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005102 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005106 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 +00005107 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005108else
5109 ac_cv_path_EGREP=$EGREP
5110fi
5111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005112 fi
5113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5115$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005116 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005117
5118
Matthias Kloseb9621712010-04-24 17:59:49 +00005119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5120$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005121if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 $as_echo_n "(cached) " >&6
5123else
5124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005125/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005126#include <stdlib.h>
5127#include <stdarg.h>
5128#include <string.h>
5129#include <float.h>
5130
5131int
5132main ()
5133{
5134
5135 ;
5136 return 0;
5137}
5138_ACEOF
5139if ac_fn_c_try_compile "$LINENO"; then :
5140 ac_cv_header_stdc=yes
5141else
5142 ac_cv_header_stdc=no
5143fi
5144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5145
5146if test $ac_cv_header_stdc = yes; then
5147 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5149/* end confdefs.h. */
5150#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005151
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005152_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005154 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005156else
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005158fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005159rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160
Matthias Kloseb9621712010-04-24 17:59:49 +00005161fi
5162
5163if test $ac_cv_header_stdc = yes; then
5164 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5166/* end confdefs.h. */
5167#include <stdlib.h>
5168
5169_ACEOF
5170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5171 $EGREP "free" >/dev/null 2>&1; then :
5172
5173else
5174 ac_cv_header_stdc=no
5175fi
5176rm -f conftest*
5177
5178fi
5179
5180if test $ac_cv_header_stdc = yes; then
5181 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5182 if test "$cross_compiling" = yes; then :
5183 :
5184else
5185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5186/* end confdefs.h. */
5187#include <ctype.h>
5188#include <stdlib.h>
5189#if ((' ' & 0x0FF) == 0x020)
5190# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5191# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5192#else
5193# define ISLOWER(c) \
5194 (('a' <= (c) && (c) <= 'i') \
5195 || ('j' <= (c) && (c) <= 'r') \
5196 || ('s' <= (c) && (c) <= 'z'))
5197# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5198#endif
5199
5200#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5201int
5202main ()
5203{
5204 int i;
5205 for (i = 0; i < 256; i++)
5206 if (XOR (islower (i), ISLOWER (i))
5207 || toupper (i) != TOUPPER (i))
5208 return 2;
5209 return 0;
5210}
5211_ACEOF
5212if ac_fn_c_try_run "$LINENO"; then :
5213
5214else
5215 ac_cv_header_stdc=no
5216fi
5217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5218 conftest.$ac_objext conftest.beam conftest.$ac_ext
5219fi
5220
5221fi
5222fi
5223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5224$as_echo "$ac_cv_header_stdc" >&6; }
5225if test $ac_cv_header_stdc = yes; then
5226
5227$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5228
5229fi
5230
5231# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5232for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5233 inttypes.h stdint.h unistd.h
5234do :
5235 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5236ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5237"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005238if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005239 cat >>confdefs.h <<_ACEOF
5240#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5241_ACEOF
5242
5243fi
5244
5245done
5246
5247
5248
5249 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 +02005250if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005251 MINIX=yes
5252else
5253 MINIX=
5254fi
5255
5256
5257 if test "$MINIX" = yes; then
5258
5259$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5260
5261
5262$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5263
5264
5265$as_echo "#define _MINIX 1" >>confdefs.h
5266
5267 fi
5268
5269
5270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5271$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005272if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005273 $as_echo_n "(cached) " >&6
5274else
5275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5276/* end confdefs.h. */
5277
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005278# define __EXTENSIONS__ 1
5279 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005280int
5281main ()
5282{
5283
5284 ;
5285 return 0;
5286}
5287_ACEOF
5288if ac_fn_c_try_compile "$LINENO"; then :
5289 ac_cv_safe_to_define___extensions__=yes
5290else
5291 ac_cv_safe_to_define___extensions__=no
5292fi
5293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5294fi
5295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5296$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5297 test $ac_cv_safe_to_define___extensions__ = yes &&
5298 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5299
5300 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5301
5302 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5303
5304 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5305
5306 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5307
5308
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310# Check for unsupported systems
5311case $ac_sys_system/$ac_sys_release in
5312atheos*|Linux*/1*)
5313 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5314 echo See README for details.
5315 exit 1;;
5316esac
5317
5318
Matthias Kloseb9621712010-04-24 17:59:49 +00005319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5320$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321
5322# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005323if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324 withval=$with_suffix;
5325 case $withval in
5326 no) EXEEXT=;;
5327 yes) EXEEXT=.exe;;
5328 *) EXEEXT=$withval;;
5329 esac
5330fi
5331
Matthias Kloseb9621712010-04-24 17:59:49 +00005332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5333$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334
5335# Test whether we're running on a non-case-sensitive system, in which
5336# case we give a warning if no ext is given
5337
Matthias Kloseb9621712010-04-24 17:59:49 +00005338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5339$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340if test ! -d CaseSensitiveTestDir; then
5341mkdir CaseSensitiveTestDir
5342fi
5343
5344if test -d casesensitivetestdir
5345then
Matthias Kloseb9621712010-04-24 17:59:49 +00005346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5347$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005348 BUILDEXEEXT=.exe
5349else
Matthias Kloseb9621712010-04-24 17:59:49 +00005350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 BUILDEXEEXT=$EXEEXT
5353fi
5354rmdir CaseSensitiveTestDir
5355
5356case $MACHDEP in
5357bsdos*)
5358 case $CC in
5359 gcc) CC="$CC -D_HAVE_BSDI";;
5360 esac;;
5361esac
5362
5363case $ac_sys_system in
5364hp*|HP*)
5365 case $CC in
5366 cc|*/cc) CC="$CC -Ae";;
5367 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368esac
5369
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005370MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5371
5372
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373
5374
Matthias Kloseb9621712010-04-24 17:59:49 +00005375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5376$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377if test -z "$LIBRARY"
5378then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005379 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5382$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383
5384# LDLIBRARY is the name of the library to link against (as opposed to the
5385# name of the library into which to insert object files). BLDLIBRARY is also
5386# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5387# is blank as the main program is not linked directly against LDLIBRARY.
5388# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5389# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5390# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5391# DLLLIBRARY is the shared (i.e., DLL) library.
5392#
5393# RUNSHARED is used to run shared python without installed libraries
5394#
5395# INSTSONAME is the name of the shared library that will be use to install
5396# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005397#
5398# LDVERSION is the shared library version number, normally the Python version
5399# with the ABI build flags appended.
5400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401
5402
5403
5404
5405
5406
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408LDLIBRARY="$LIBRARY"
5409BLDLIBRARY='$(LDLIBRARY)'
5410INSTSONAME='$(LDLIBRARY)'
5411DLLLIBRARY=''
5412LDLIBRARYDIR=''
5413RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005414LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415
5416# LINKCC is the command that links the python executable -- default is $(CC).
5417# If CXX is set, and if it is needed to link a main function that was
5418# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5419# python might then depend on the C++ runtime
5420# This is altered for AIX in order to build the export list before
5421# linking.
5422
Matthias Kloseb9621712010-04-24 17:59:49 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5424$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425if test -z "$LINKCC"
5426then
5427 LINKCC='$(PURIFY) $(MAINCC)'
5428 case $ac_sys_system in
5429 AIX*)
5430 exp_extra="\"\""
5431 if test $ac_sys_release -ge 5 -o \
5432 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5433 exp_extra="."
5434 fi
5435 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436 QNX*)
5437 # qcc must be used because the other compilers do not
5438 # support -N.
5439 LINKCC=qcc;;
5440 esac
5441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5443$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444
5445# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5446# make sure we default having it set to "no": this is used by
5447# distutils.unixccompiler to know if it should add --enable-new-dtags
5448# to linker command lines, and failing to detect GNU ld simply results
5449# in the same bahaviour as before.
5450
Matthias Kloseb9621712010-04-24 17:59:49 +00005451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5452$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453ac_prog=ld
5454if test "$GCC" = yes; then
5455 ac_prog=`$CC -print-prog-name=ld`
5456fi
5457case `"$ac_prog" -V 2>&1 < /dev/null` in
5458 *GNU*)
5459 GNULD=yes;;
5460 *)
5461 GNULD=no;;
5462esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5464$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5467$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005468if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005469 $as_echo_n "(cached) " >&6
5470else
5471 ac_cv_c_inline=no
5472for ac_kw in inline __inline__ __inline; do
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#ifndef __cplusplus
5476typedef int foo_t;
5477static $ac_kw foo_t static_foo () {return 0; }
5478$ac_kw foo_t foo () {return 0; }
5479#endif
5480
5481_ACEOF
5482if ac_fn_c_try_compile "$LINENO"; then :
5483 ac_cv_c_inline=$ac_kw
5484fi
5485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5486 test "$ac_cv_c_inline" != no && break
5487done
5488
5489fi
5490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5491$as_echo "$ac_cv_c_inline" >&6; }
5492
5493case $ac_cv_c_inline in
5494 inline | yes) ;;
5495 *)
5496 case $ac_cv_c_inline in
5497 no) ac_val=;;
5498 *) ac_val=$ac_cv_c_inline;;
5499 esac
5500 cat >>confdefs.h <<_ACEOF
5501#ifndef __cplusplus
5502#define inline $ac_val
5503#endif
5504_ACEOF
5505 ;;
5506esac
5507
5508if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005509
5510$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005511
5512
5513fi
5514
5515
Matthias Kloseb9621712010-04-24 17:59:49 +00005516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5517$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005519if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520 enableval=$enable_shared;
5521fi
5522
5523
5524if test -z "$enable_shared"
5525then
5526 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005527 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528 enable_shared="yes";;
5529 *)
5530 enable_shared="no";;
5531 esac
5532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5534$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005535
Matthias Kloseb9621712010-04-24 17:59:49 +00005536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5537$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005539if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005540 enableval=$enable_profiling;
5541fi
5542
5543if test "x$enable_profiling" = xyes; then
5544 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005545 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547/* end confdefs.h. */
5548int main() { return 0; }
5549_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005550if ac_fn_c_try_link "$LINENO"; then :
5551
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005553 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005555rm -f core conftest.err conftest.$ac_objext \
5556 conftest$ac_exeext conftest.$ac_ext
5557 CC="$ac_save_cc"
5558else
5559 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5562$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563
doko@ubuntu.comba015832012-06-30 16:52:05 +02005564if test "x$enable_profiling" = xyes; then
5565 BASECFLAGS="-pg $BASECFLAGS"
5566 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567fi
5568
Matthias Kloseb9621712010-04-24 17:59:49 +00005569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5570$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005571
5572# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5573# library that we build, but we do not want to link against it (we
5574# will find it with a -framework option). For this reason there is an
5575# extra variable BLDLIBRARY against which Python and the extension
5576# modules are linked, BLDLIBRARY. This is normally the same as
5577# LDLIBRARY, but empty for MacOSX framework builds.
5578if test "$enable_framework"
5579then
5580 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5581 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5582 BLDLIBRARY=''
5583else
5584 BLDLIBRARY='$(LDLIBRARY)'
5585fi
5586
5587# Other platforms follow
5588if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005589 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
Matthias Kloseb9621712010-04-24 17:59:49 +00005591$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592
5593 case $ac_sys_system in
5594 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005595 LDLIBRARY='libpython$(LDVERSION).dll.a'
5596 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597 ;;
5598 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005599 LDLIBRARY='libpython$(LDVERSION).so'
5600 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5602 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005603 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005604 then
5605 PY3LIBRARY=libpython3.so
5606 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005608 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005609 LDLIBRARY='libpython$(LDVERSION).so'
5610 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5612 case $ac_sys_system in
5613 FreeBSD*)
5614 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5615 ;;
5616 esac
5617 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005618 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005619 then
5620 PY3LIBRARY=libpython3.so
5621 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622 ;;
5623 hp*|HP*)
5624 case `uname -m` in
5625 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005626 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627 ;;
5628 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005629 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630 ;;
5631 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005632 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5634 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005636 LDLIBRARY='libpython$(LDVERSION).dylib'
5637 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5639 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005640 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005641 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005642 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5643 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644
5645 esac
5646else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005647 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648 case $ac_sys_system in
5649 CYGWIN*)
5650 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005651 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652 ;;
5653 esac
5654fi
5655
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005656if test "$cross_compiling" = yes; then
5657 RUNSHARED=
5658fi
5659
Matthias Kloseb9621712010-04-24 17:59:49 +00005660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5661$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662
5663if test -n "$ac_tool_prefix"; then
5664 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5665set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005668if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670else
5671 if test -n "$RANLIB"; then
5672 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5673else
5674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5675for as_dir in $PATH
5676do
5677 IFS=$as_save_IFS
5678 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 break 2
5684 fi
5685done
Matthias Kloseb9621712010-04-24 17:59:49 +00005686 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687IFS=$as_save_IFS
5688
5689fi
5690fi
5691RANLIB=$ac_cv_prog_RANLIB
5692if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5694$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695else
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698fi
5699
5700
5701fi
5702if test -z "$ac_cv_prog_RANLIB"; then
5703 ac_ct_RANLIB=$RANLIB
5704 # Extract the first word of "ranlib", so it can be a program name with args.
5705set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5707$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005708if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710else
5711 if test -n "$ac_ct_RANLIB"; then
5712 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5713else
5714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5715for as_dir in $PATH
5716do
5717 IFS=$as_save_IFS
5718 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723 break 2
5724 fi
5725done
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727IFS=$as_save_IFS
5728
5729fi
5730fi
5731ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5732if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5734$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735else
Matthias Kloseb9621712010-04-24 17:59:49 +00005736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5737$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738fi
5739
5740 if test "x$ac_ct_RANLIB" = x; then
5741 RANLIB=":"
5742 else
5743 case $cross_compiling:$ac_tool_warned in
5744yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5746$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747ac_tool_warned=yes ;;
5748esac
5749 RANLIB=$ac_ct_RANLIB
5750 fi
5751else
5752 RANLIB="$ac_cv_prog_RANLIB"
5753fi
5754
5755
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005756if test -n "$ac_tool_prefix"; then
5757 for ac_prog in ar aal
5758 do
5759 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5760set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5762$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005763if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765else
5766 if test -n "$AR"; then
5767 ac_cv_prog_AR="$AR" # Let the user override the test.
5768else
5769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5770for as_dir in $PATH
5771do
5772 IFS=$as_save_IFS
5773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005776 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778 break 2
5779 fi
5780done
Matthias Kloseb9621712010-04-24 17:59:49 +00005781 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782IFS=$as_save_IFS
5783
5784fi
5785fi
5786AR=$ac_cv_prog_AR
5787if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5789$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790else
Matthias Kloseb9621712010-04-24 17:59:49 +00005791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5792$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793fi
5794
5795
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005796 test -n "$AR" && break
5797 done
5798fi
5799if test -z "$AR"; then
5800 ac_ct_AR=$AR
5801 for ac_prog in ar aal
5802do
5803 # Extract the first word of "$ac_prog", so it can be a program name with args.
5804set dummy $ac_prog; ac_word=$2
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5806$as_echo_n "checking for $ac_word... " >&6; }
5807if ${ac_cv_prog_ac_ct_AR+:} false; then :
5808 $as_echo_n "(cached) " >&6
5809else
5810 if test -n "$ac_ct_AR"; then
5811 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5812else
5813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5814for as_dir in $PATH
5815do
5816 IFS=$as_save_IFS
5817 test -z "$as_dir" && as_dir=.
5818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005820 ac_cv_prog_ac_ct_AR="$ac_prog"
5821 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5822 break 2
5823 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005825 done
5826IFS=$as_save_IFS
5827
5828fi
5829fi
5830ac_ct_AR=$ac_cv_prog_ac_ct_AR
5831if test -n "$ac_ct_AR"; then
5832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5833$as_echo "$ac_ct_AR" >&6; }
5834else
5835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836$as_echo "no" >&6; }
5837fi
5838
5839
5840 test -n "$ac_ct_AR" && break
5841done
5842
5843 if test "x$ac_ct_AR" = x; then
5844 AR="ar"
5845 else
5846 case $cross_compiling:$ac_tool_warned in
5847yes:)
5848{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5849$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5850ac_tool_warned=yes ;;
5851esac
5852 AR=$ac_ct_AR
5853 fi
5854fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855
5856
5857# tweak ARFLAGS only if the user didn't set it on the command line
5858
5859if test -z "$ARFLAGS"
5860then
5861 ARFLAGS="rc"
5862fi
5863
doko@ubuntu.com58844492012-06-30 18:25:32 +02005864if test -n "$ac_tool_prefix"; then
5865 for ac_prog in readelf
5866 do
5867 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5868set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5870$as_echo_n "checking for $ac_word... " >&6; }
5871if ${ac_cv_prog_READELF+:} false; then :
5872 $as_echo_n "(cached) " >&6
5873else
5874 if test -n "$READELF"; then
5875 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5876else
5877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5878for as_dir in $PATH
5879do
5880 IFS=$as_save_IFS
5881 test -z "$as_dir" && as_dir=.
5882 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005884 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5886 break 2
5887 fi
5888done
5889 done
5890IFS=$as_save_IFS
5891
5892fi
5893fi
5894READELF=$ac_cv_prog_READELF
5895if test -n "$READELF"; then
5896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5897$as_echo "$READELF" >&6; }
5898else
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5900$as_echo "no" >&6; }
5901fi
5902
5903
5904 test -n "$READELF" && break
5905 done
5906fi
5907if test -z "$READELF"; then
5908 ac_ct_READELF=$READELF
5909 for ac_prog in readelf
5910do
5911 # Extract the first word of "$ac_prog", so it can be a program name with args.
5912set dummy $ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5916 $as_echo_n "(cached) " >&6
5917else
5918 if test -n "$ac_ct_READELF"; then
5919 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5920else
5921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5922for as_dir in $PATH
5923do
5924 IFS=$as_save_IFS
5925 test -z "$as_dir" && as_dir=.
5926 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005928 ac_cv_prog_ac_ct_READELF="$ac_prog"
5929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5930 break 2
5931 fi
5932done
5933 done
5934IFS=$as_save_IFS
5935
5936fi
5937fi
5938ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5939if test -n "$ac_ct_READELF"; then
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5941$as_echo "$ac_ct_READELF" >&6; }
5942else
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5944$as_echo "no" >&6; }
5945fi
5946
5947
5948 test -n "$ac_ct_READELF" && break
5949done
5950
5951 if test "x$ac_ct_READELF" = x; then
5952 READELF=":"
5953 else
5954 case $cross_compiling:$ac_tool_warned in
5955yes:)
5956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5958ac_tool_warned=yes ;;
5959esac
5960 READELF=$ac_ct_READELF
5961 fi
5962fi
5963
5964if test "$cross_compiling" = yes; then
5965 case "$READELF" in
5966 readelf|:)
5967 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5968 ;;
5969 esac
5970fi
5971
5972
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973
Matthias Klosec4c48422012-10-21 23:05:35 +02005974for ac_prog in python$PACKAGE_VERSION python3 python
5975do
5976 # Extract the first word of "$ac_prog", so it can be a program name with args.
5977set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5979$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005980if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005981 $as_echo_n "(cached) " >&6
5982else
Matthias Klosec4c48422012-10-21 23:05:35 +02005983 if test -n "$PYTHON"; then
5984 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005985else
5986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987for as_dir in $PATH
5988do
5989 IFS=$as_save_IFS
5990 test -z "$as_dir" && as_dir=.
5991 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005993 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5995 break 2
5996 fi
5997done
5998 done
5999IFS=$as_save_IFS
6000
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006001fi
6002fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006003PYTHON=$ac_cv_prog_PYTHON
6004if test -n "$PYTHON"; then
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6006$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006007else
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6009$as_echo "no" >&6; }
6010fi
6011
6012
Matthias Klosec4c48422012-10-21 23:05:35 +02006013 test -n "$PYTHON" && break
6014done
6015test -n "$PYTHON" || PYTHON="not-found"
6016
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006017if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006018 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6019else
6020 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006021fi
6022
6023
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024case $MACHDEP in
6025bsdos*|hp*|HP*)
6026 # install -d does not work on BSDI or HP-UX
6027 if test -z "$INSTALL"
6028 then
6029 INSTALL="${srcdir}/install-sh -c"
6030 fi
6031esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032# Find a good install program. We prefer a C program (faster),
6033# so one script is as good as another. But avoid the broken or
6034# incompatible versions:
6035# SysV /etc/install, /usr/sbin/install
6036# SunOS /usr/etc/install
6037# IRIX /sbin/install
6038# AIX /bin/install
6039# AmigaOS /C/install, which installs bootblocks on floppy discs
6040# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6041# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6042# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6043# OS/2's system install, which has a completely different semantic
6044# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006045# Reject install programs that cannot install multiple files.
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6047$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006049if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006050 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051else
6052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6053for as_dir in $PATH
6054do
6055 IFS=$as_save_IFS
6056 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 # Account for people who put trailing slashes in PATH elements.
6058case $as_dir/ in #((
6059 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006061 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062 /usr/ucb/* ) ;;
6063 *)
6064 # OSF1 and SCO ODT 3.0 have their own names for install.
6065 # Don't use installbsd from OSF since it installs stuff as root
6066 # by default.
6067 for ac_prog in ginstall scoinst install; do
6068 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006069 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070 if test $ac_prog = install &&
6071 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6072 # AIX install. It has an incompatible calling convention.
6073 :
6074 elif test $ac_prog = install &&
6075 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6076 # program-specific install script used by HP pwplus--don't use.
6077 :
6078 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 rm -rf conftest.one conftest.two conftest.dir
6080 echo one > conftest.one
6081 echo two > conftest.two
6082 mkdir conftest.dir
6083 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6084 test -s conftest.one && test -s conftest.two &&
6085 test -s conftest.dir/conftest.one &&
6086 test -s conftest.dir/conftest.two
6087 then
6088 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6089 break 3
6090 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091 fi
6092 fi
6093 done
6094 done
6095 ;;
6096esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006097
6098 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099IFS=$as_save_IFS
6100
Matthias Kloseb9621712010-04-24 17:59:49 +00006101rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102
6103fi
6104 if test "${ac_cv_path_install+set}" = set; then
6105 INSTALL=$ac_cv_path_install
6106 else
6107 # As a last resort, use the slow shell script. Don't cache a
6108 # value for INSTALL within a source directory, because that will
6109 # break other packages using the cache if that directory is
6110 # removed, or if the value is a relative name.
6111 INSTALL=$ac_install_sh
6112 fi
6113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6115$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006116
6117# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6118# It thinks the first close brace ends the variable substitution.
6119test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6120
6121test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6122
6123test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6124
Matthias Klose93a0ef12012-03-15 18:08:34 +01006125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6126$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6127if test -z "$MKDIR_P"; then
6128 if ${ac_cv_path_mkdir+:} false; then :
6129 $as_echo_n "(cached) " >&6
6130else
6131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6132for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6133do
6134 IFS=$as_save_IFS
6135 test -z "$as_dir" && as_dir=.
6136 for ac_prog in mkdir gmkdir; do
6137 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006138 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006139 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6140 'mkdir (GNU coreutils) '* | \
6141 'mkdir (coreutils) '* | \
6142 'mkdir (fileutils) '4.1*)
6143 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6144 break 3;;
6145 esac
6146 done
6147 done
6148 done
6149IFS=$as_save_IFS
6150
6151fi
6152
6153 test -d ./--version && rmdir ./--version
6154 if test "${ac_cv_path_mkdir+set}" = set; then
6155 MKDIR_P="$ac_cv_path_mkdir -p"
6156 else
6157 # As a last resort, use the slow shell script. Don't cache a
6158 # value for MKDIR_P within a source directory, because that will
6159 # break other packages using the cache if that directory is
6160 # removed, or if the value is a relative name.
6161 MKDIR_P="$ac_install_sh -d"
6162 fi
6163fi
6164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6165$as_echo "$MKDIR_P" >&6; }
6166
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167
6168# Not every filesystem supports hard links
6169
6170if test -z "$LN" ; then
6171 case $ac_sys_system in
6172 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173 *) LN=ln;;
6174 esac
6175fi
6176
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006177# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006178
6179ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006180
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6183$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184
6185# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006186if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187 withval=$with_pydebug;
6188if test "$withval" != no
6189then
6190
Matthias Kloseb9621712010-04-24 17:59:49 +00006191$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192
Matthias Kloseb9621712010-04-24 17:59:49 +00006193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6194$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006196 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006197else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199fi
6200else
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6202$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203fi
6204
6205
6206# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6207# merged with this chunk of code?
6208
6209# Optimizer/debugger flags
6210# ------------------------
6211# (The following bit of code is complicated enough - please keep things
6212# indented properly. Just pretend you're editing Python code. ;-)
6213
6214# There are two parallel sets of case statements below, one that checks to
6215# see if OPT was set and one that does BASECFLAGS setting based upon
6216# compiler and platform. BASECFLAGS tweaks need to be made even if the
6217# user set OPT.
6218
6219# tweak OPT based on compiler and platform, only if the user didn't set
6220# it on the command line
6221
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006222if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223then
6224 case $GCC in
6225 yes)
6226 if test "$CC" != 'g++' ; then
6227 STRICT_PROTO="-Wstrict-prototypes"
6228 fi
6229 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6230 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6231 WRAP="-fwrapv"
6232 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006233
6234 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006235 case $CC in
6236 *clang*) WRAP="-fwrapv"
6237 ;;
6238 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006239
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240 case $ac_cv_prog_cc_g in
6241 yes)
6242 if test "$Py_DEBUG" = 'true' ; then
6243 # Optimization messes up debuggers, so turn it off for
6244 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006245 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246 else
6247 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6248 fi
6249 ;;
6250 *)
6251 OPT="-O3 -Wall $STRICT_PROTO"
6252 ;;
6253 esac
6254 case $ac_sys_system in
6255 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6256 ;;
6257 esac
6258 ;;
6259
6260 *)
6261 OPT="-O"
6262 ;;
6263 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264fi
6265
6266
6267
6268# The -arch flags for universal builds on OSX
6269UNIVERSAL_ARCH_FLAGS=
6270
6271
6272# tweak BASECFLAGS based on compiler and platform
6273case $GCC in
6274yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006275 # Python doesn't violate C99 aliasing rules, but older versions of
6276 # GCC produce warnings for legal Python code. Enable
6277 # -fno-strict-aliasing on versions of GCC that support but produce
6278 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6280$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281 ac_save_cc="$CC"
6282 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006283 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006284 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006285 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006286else
Matthias Kloseb9621712010-04-24 17:59:49 +00006287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006289
Matthias Kloseb159a552010-04-25 21:00:44 +00006290
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006291int
6292main ()
6293{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006294
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006295 ;
6296 return 0;
6297}
Matthias Kloseb159a552010-04-25 21:00:44 +00006298
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006300if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006301
6302 CC="$ac_save_cc -fstrict-aliasing"
6303 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006305/* end confdefs.h. */
6306
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006307 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006308int
6309main ()
6310{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006311double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006312 ;
6313 return 0;
6314}
Matthias Kloseb159a552010-04-25 21:00:44 +00006315
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006317if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006318
6319 ac_cv_no_strict_aliasing=no
6320
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321else
Matthias Kloseb159a552010-04-25 21:00:44 +00006322
6323 ac_cv_no_strict_aliasing=yes
6324
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006325fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006327
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006328else
Matthias Kloseb159a552010-04-25 21:00:44 +00006329
6330 ac_cv_no_strict_aliasing=no
6331
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006334fi
6335
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006336 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6339$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006340 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341 then
6342 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6343 fi
6344
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6346$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6347 ac_save_cc="$CC"
6348 CC="$CC -Wunused-result -Werror"
6349 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006350 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006351 $as_echo_n "(cached) " >&6
6352else
6353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6354/* end confdefs.h. */
6355
6356
6357int
6358main ()
6359{
6360
6361 ;
6362 return 0;
6363}
6364
6365_ACEOF
6366if ac_fn_c_try_compile "$LINENO"; then :
6367
6368 ac_cv_disable_unused_result_warning=yes
6369
6370else
6371
6372 ac_cv_disable_unused_result_warning=no
6373
6374fi
6375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6376fi
6377
6378 CFLAGS="$save_CFLAGS"
6379 CC="$ac_save_cc"
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6381$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6382
6383 if test $ac_cv_disable_unused_result_warning = yes
6384 then
6385 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6386 fi
6387
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6389$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6390 ac_save_cc="$CC"
6391 CC="$CC -Werror=declaration-after-statement"
6392 save_CFLAGS="$CFLAGS"
6393 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6394 $as_echo_n "(cached) " >&6
6395else
6396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6397/* end confdefs.h. */
6398
6399
6400int
6401main ()
6402{
6403
6404 ;
6405 return 0;
6406}
6407
6408_ACEOF
6409if ac_fn_c_try_compile "$LINENO"; then :
6410
6411 ac_cv_declaration_after_statement_warning=yes
6412
6413else
6414
6415 ac_cv_declaration_after_statement_warning=no
6416
6417fi
6418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6419fi
6420
6421 CFLAGS="$save_CFLAGS"
6422 CC="$ac_save_cc"
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6424$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6425
6426 if test $ac_cv_declaration_after_statement_warning = yes
6427 then
6428 BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
6429 fi
6430
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6432 # support. Without this, treatment of subnormals doesn't follow
6433 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006434 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006435 alpha*)
6436 BASECFLAGS="$BASECFLAGS -mieee"
6437 ;;
6438 esac
6439
6440 case $ac_sys_system in
6441 SCO_SV*)
6442 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6443 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006444
6445 # is there any other compiler on Darwin besides gcc?
6446 Darwin*)
6447 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6448 # used to be here, but non-Apple gcc doesn't accept them.
6449 if test "${CC}" = gcc
6450 then
6451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006452$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006453 case "${UNIVERSALSDK}" in
6454 */MacOSX10.4u.sdk)
6455 # Build using 10.4 SDK, force usage of gcc when the
6456 # compiler is gcc, otherwise the user will get very
6457 # confusing error messages when building on OSX 10.6
6458 CC=gcc-4.0
6459 CPP=cpp-4.0
6460 ;;
6461 esac
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006463$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006464 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006465
Ned Deily87adb6e2013-10-18 21:09:56 -07006466 if test "${enable_universalsdk}"
6467 then
6468 case "$UNIVERSAL_ARCHS" in
6469 32-bit)
6470 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6471 LIPO_32BIT_FLAGS=""
6472 ARCH_RUN_32BIT=""
6473 ;;
6474 64-bit)
6475 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6476 LIPO_32BIT_FLAGS=""
6477 ARCH_RUN_32BIT="true"
6478 ;;
6479 all)
6480 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6481 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6482 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6483 ;;
6484 intel)
6485 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6486 LIPO_32BIT_FLAGS="-extract i386"
6487 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6488 ;;
6489 intel-32)
6490 UNIVERSAL_ARCH_FLAGS="-arch i386"
6491 LIPO_32BIT_FLAGS=""
6492 ARCH_RUN_32BIT=""
6493 ;;
6494 3-way)
6495 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6496 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6497 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6498 ;;
6499 *)
6500 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6501 ;;
6502 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006503
Ned Deily87adb6e2013-10-18 21:09:56 -07006504 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6505 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6506 if test "${UNIVERSALSDK}" != "/"
6507 then
6508 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6509 fi
6510 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006511
Ned Deily87adb6e2013-10-18 21:09:56 -07006512 # Calculate an appropriate deployment target for this build:
6513 # The deployment target value is used explicitly to enable certain
6514 # features are enabled (such as builtin libedit support for readline)
6515 # through the use of Apple's Availabiliy Macros and is used as a
6516 # component of the string returned by distutils.get_platform().
6517 #
6518 # Use the value from:
6519 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6520 # 2. the operating system version of the build machine if >= 10.6
6521 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6522 # below to pick either 10.3, 10.4, or 10.5 as the target.
6523 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524
Ned Deily87adb6e2013-10-18 21:09:56 -07006525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6526$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
6527 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
6528 if test ${cur_target} '>' 10.2 && \
6529 test ${cur_target} '<' 10.6
6530 then
6531 cur_target=10.3
6532 if test ${enable_universalsdk}
6533 then
6534 case "$UNIVERSAL_ARCHS" in
6535 all|3-way|intel|64-bit)
6536 # These configurations were first supported in 10.5
6537 cur_target='10.5'
6538 ;;
6539 esac
6540 else
6541 if test `/usr/bin/arch` = "i386"
6542 then
6543 # 10.4 was the first release to support Intel archs
6544 cur_target="10.4"
6545 fi
6546 fi
6547 fi
6548 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006549
Ned Deily87adb6e2013-10-18 21:09:56 -07006550 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6551 # environment with a value that is the same as what we'll use
6552 # in the Makefile to ensure that we'll get the same compiler
6553 # environment during configure and build time.
6554 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6555 export MACOSX_DEPLOYMENT_TARGET
6556 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6558$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006559
Ned Deily87adb6e2013-10-18 21:09:56 -07006560 # end of Darwin* tests
6561 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006562 esac
6563 ;;
6564
6565*)
6566 case $ac_sys_system in
6567 OpenUNIX*|UnixWare*)
6568 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6569 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006570 SCO_SV*)
6571 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6572 ;;
6573 esac
6574 ;;
6575esac
6576
6577if test "$Py_DEBUG" = 'true'; then
6578 :
6579else
6580 OPT="-DNDEBUG $OPT"
6581fi
6582
6583if test "$ac_arch_flags"
6584then
6585 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6586fi
6587
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006588# On some compilers, pthreads are available without further options
6589# (e.g. MacOS X). On some of these systems, the compiler will not
6590# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6591# So we have to see first whether pthreads are available without
6592# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6594$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006595if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006596 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006597else
Matthias Kloseb9621712010-04-24 17:59:49 +00006598 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006599 ac_cv_pthread_is_default=no
6600else
Matthias Kloseb9621712010-04-24 17:59:49 +00006601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006602/* end confdefs.h. */
6603
Stefan Krah7dba5942012-11-22 22:49:11 +01006604#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006605#include <pthread.h>
6606
6607void* routine(void* p){return NULL;}
6608
6609int main(){
6610 pthread_t p;
6611 if(pthread_create(&p,NULL,routine,NULL)!=0)
6612 return 1;
6613 (void)pthread_detach(p);
6614 return 0;
6615}
6616
6617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006618if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006619
6620 ac_cv_pthread_is_default=yes
6621 ac_cv_kthread=no
6622 ac_cv_pthread=no
6623
6624else
Matthias Kloseb9621712010-04-24 17:59:49 +00006625 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6628 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006629fi
6630
6631
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006632fi
6633
Matthias Kloseb9621712010-04-24 17:59:49 +00006634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6635$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006636
6637
6638if test $ac_cv_pthread_is_default = yes
6639then
6640 ac_cv_kpthread=no
6641else
6642# -Kpthread, if available, provides the right #defines
6643# and linker options to make pthread_create available
6644# Some compilers won't report that they do not support -Kpthread,
6645# so we need to run a program to see whether it really made the
6646# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6648$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006649if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006650 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006651else
6652 ac_save_cc="$CC"
6653CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006654if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006655 ac_cv_kpthread=no
6656else
Matthias Kloseb9621712010-04-24 17:59:49 +00006657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006658/* end confdefs.h. */
6659
Stefan Krah7dba5942012-11-22 22:49:11 +01006660#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006661#include <pthread.h>
6662
6663void* routine(void* p){return NULL;}
6664
6665int main(){
6666 pthread_t p;
6667 if(pthread_create(&p,NULL,routine,NULL)!=0)
6668 return 1;
6669 (void)pthread_detach(p);
6670 return 0;
6671}
6672
6673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006674if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006675 ac_cv_kpthread=yes
6676else
Matthias Kloseb9621712010-04-24 17:59:49 +00006677 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6680 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681fi
6682
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006683CC="$ac_save_cc"
6684fi
6685
Matthias Kloseb9621712010-04-24 17:59:49 +00006686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6687$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688fi
6689
6690if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6691then
6692# -Kthread, if available, provides the right #defines
6693# and linker options to make pthread_create available
6694# Some compilers won't report that they do not support -Kthread,
6695# so we need to run a program to see whether it really made the
6696# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6698$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006699if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006700 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006701else
6702 ac_save_cc="$CC"
6703CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006704if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006705 ac_cv_kthread=no
6706else
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708/* end confdefs.h. */
6709
Stefan Krah7dba5942012-11-22 22:49:11 +01006710#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711#include <pthread.h>
6712
6713void* routine(void* p){return NULL;}
6714
6715int main(){
6716 pthread_t p;
6717 if(pthread_create(&p,NULL,routine,NULL)!=0)
6718 return 1;
6719 (void)pthread_detach(p);
6720 return 0;
6721}
6722
6723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006724if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006725 ac_cv_kthread=yes
6726else
Matthias Kloseb9621712010-04-24 17:59:49 +00006727 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006729rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6730 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006731fi
6732
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733CC="$ac_save_cc"
6734fi
6735
Matthias Kloseb9621712010-04-24 17:59:49 +00006736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6737$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738fi
6739
6740if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6741then
6742# -pthread, if available, provides the right #defines
6743# and linker options to make pthread_create available
6744# Some compilers won't report that they do not support -pthread,
6745# so we need to run a program to see whether it really made the
6746# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6748$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006749if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006750 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751else
6752 ac_save_cc="$CC"
6753CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006754if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006755 ac_cv_pthread=no
6756else
Matthias Kloseb9621712010-04-24 17:59:49 +00006757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006758/* end confdefs.h. */
6759
Stefan Krah7dba5942012-11-22 22:49:11 +01006760#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761#include <pthread.h>
6762
6763void* routine(void* p){return NULL;}
6764
6765int main(){
6766 pthread_t p;
6767 if(pthread_create(&p,NULL,routine,NULL)!=0)
6768 return 1;
6769 (void)pthread_detach(p);
6770 return 0;
6771}
6772
6773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006774if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006775 ac_cv_pthread=yes
6776else
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781fi
6782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783CC="$ac_save_cc"
6784fi
6785
Matthias Kloseb9621712010-04-24 17:59:49 +00006786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6787$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006788fi
6789
6790# If we have set a CC compiler flag for thread support then
6791# check if it works for CXX, too.
6792ac_cv_cxx_thread=no
6793if test ! -z "$CXX"
6794then
Matthias Kloseb9621712010-04-24 17:59:49 +00006795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6796$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006797ac_save_cxx="$CXX"
6798
6799if test "$ac_cv_kpthread" = "yes"
6800then
6801 CXX="$CXX -Kpthread"
6802 ac_cv_cxx_thread=yes
6803elif test "$ac_cv_kthread" = "yes"
6804then
6805 CXX="$CXX -Kthread"
6806 ac_cv_cxx_thread=yes
6807elif test "$ac_cv_pthread" = "yes"
6808then
6809 CXX="$CXX -pthread"
6810 ac_cv_cxx_thread=yes
6811fi
6812
6813if test $ac_cv_cxx_thread = yes
6814then
6815 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6816 $CXX -c conftest.$ac_ext 2>&5
6817 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6818 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6819 then
6820 ac_cv_cxx_thread=yes
6821 else
6822 ac_cv_cxx_thread=no
6823 fi
6824 rm -fr conftest*
6825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6827$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006828fi
6829CXX="$ac_save_cxx"
6830
6831
6832# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6834$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006835if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837else
Matthias Kloseb9621712010-04-24 17:59:49 +00006838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839/* end confdefs.h. */
6840#include <stdlib.h>
6841#include <stdarg.h>
6842#include <string.h>
6843#include <float.h>
6844
6845int
6846main ()
6847{
6848
6849 ;
6850 return 0;
6851}
6852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006853if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854 ac_cv_header_stdc=yes
6855else
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6859
6860if test $ac_cv_header_stdc = yes; then
6861 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863/* end confdefs.h. */
6864#include <string.h>
6865
6866_ACEOF
6867if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006868 $EGREP "memchr" >/dev/null 2>&1; then :
6869
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870else
6871 ac_cv_header_stdc=no
6872fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006873rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874
6875fi
6876
6877if test $ac_cv_header_stdc = yes; then
6878 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006880/* end confdefs.h. */
6881#include <stdlib.h>
6882
6883_ACEOF
6884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006885 $EGREP "free" >/dev/null 2>&1; then :
6886
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887else
6888 ac_cv_header_stdc=no
6889fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006890rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891
6892fi
6893
6894if test $ac_cv_header_stdc = yes; then
6895 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006896 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897 :
6898else
Matthias Kloseb9621712010-04-24 17:59:49 +00006899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900/* end confdefs.h. */
6901#include <ctype.h>
6902#include <stdlib.h>
6903#if ((' ' & 0x0FF) == 0x020)
6904# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6905# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6906#else
6907# define ISLOWER(c) \
6908 (('a' <= (c) && (c) <= 'i') \
6909 || ('j' <= (c) && (c) <= 'r') \
6910 || ('s' <= (c) && (c) <= 'z'))
6911# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6912#endif
6913
6914#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6915int
6916main ()
6917{
6918 int i;
6919 for (i = 0; i < 256; i++)
6920 if (XOR (islower (i), ISLOWER (i))
6921 || toupper (i) != TOUPPER (i))
6922 return 2;
6923 return 0;
6924}
6925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006926if ac_fn_c_try_run "$LINENO"; then :
6927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928else
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6932 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006933fi
6934
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006935fi
6936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6938$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006939if test $ac_cv_header_stdc = yes; then
6940
Matthias Kloseb9621712010-04-24 17:59:49 +00006941$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942
6943fi
6944
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006945ac_save_cppflags="$CPPFLAGS"
6946CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006947for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006948fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006949ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006950sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006951unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006952poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006953sys/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 +01006954sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006955sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006956sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006957sys/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 -07006958libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesf0400ba2013-06-18 13:22:17 +02006959bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006960do :
6961 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6962ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006963if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006964 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006965#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006966_ACEOF
6967
6968fi
6969
Guido van Rossum627b2d71993-12-24 10:39:16 +00006970done
6971
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006972CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006973ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006974for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006975 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6977$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006978if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006979 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006980else
Matthias Kloseb9621712010-04-24 17:59:49 +00006981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006982/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006983#include <sys/types.h>
6984#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006985
Martin v. Löwis11437992002-04-12 09:54:03 +00006986int
6987main ()
6988{
6989if ((DIR *) 0)
6990return 0;
6991 ;
6992 return 0;
6993}
6994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006995if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006996 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006997else
Matthias Kloseb9621712010-04-24 17:59:49 +00006998 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007002eval ac_res=\$$as_ac_Header
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7004$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007005if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007006 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007007#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007008_ACEOF
7009
7010ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007011fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007012
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007013done
7014# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7015if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7017$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007018if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007019 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007020else
Martin v. Löwis11437992002-04-12 09:54:03 +00007021 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007025/* Override any GCC internal prototype to avoid an error.
7026 Use char because int might match the return type of a GCC
7027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007028#ifdef __cplusplus
7029extern "C"
7030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007031char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007032int
7033main ()
7034{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007036 ;
7037 return 0;
7038}
7039_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040for ac_lib in '' dir; do
7041 if test -z "$ac_lib"; then
7042 ac_res="none required"
7043 else
7044 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007045 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007046 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007048 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007050rm -f core conftest.err conftest.$ac_objext \
7051 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007052 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007053 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007055done
Victor Stinnere0be4232011-10-25 13:06:09 +02007056if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007058else
7059 ac_cv_search_opendir=no
7060fi
7061rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007062LIBS=$ac_func_search_save_LIBS
7063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7065$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007067if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007069
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007070fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007071
Michael W. Hudson54241132001-12-07 15:38:26 +00007072else
Matthias Kloseb9621712010-04-24 17:59:49 +00007073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7074$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007075if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007076 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007077else
7078 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082/* Override any GCC internal prototype to avoid an error.
7083 Use char because int might match the return type of a GCC
7084 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007085#ifdef __cplusplus
7086extern "C"
7087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007088char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007089int
7090main ()
7091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007093 ;
7094 return 0;
7095}
7096_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007097for ac_lib in '' x; do
7098 if test -z "$ac_lib"; then
7099 ac_res="none required"
7100 else
7101 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007102 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007103 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007104 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007105 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007107rm -f core conftest.err conftest.$ac_objext \
7108 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007109 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007110 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112done
Victor Stinnere0be4232011-10-25 13:06:09 +02007113if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007115else
7116 ac_cv_search_opendir=no
7117fi
7118rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007119LIBS=$ac_func_search_save_LIBS
7120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7122$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007123ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007124if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007125 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007127fi
7128
7129fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007130
Matthias Kloseb9621712010-04-24 17:59:49 +00007131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7132$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007133if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007134 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007135else
Matthias Kloseb9621712010-04-24 17:59:49 +00007136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007137/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007138#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007139int
7140main ()
7141{
7142return makedev(0, 0);
7143 ;
7144 return 0;
7145}
7146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007147if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007148 ac_cv_header_sys_types_h_makedev=yes
7149else
Matthias Kloseb9621712010-04-24 17:59:49 +00007150 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007152rm -f core conftest.err conftest.$ac_objext \
7153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007154
7155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7157$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007158
7159if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007160ac_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 +02007161if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007162
Matthias Kloseb9621712010-04-24 17:59:49 +00007163$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007164
7165fi
7166
7167
7168
7169 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007170 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 +02007171if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007172
Matthias Kloseb9621712010-04-24 17:59:49 +00007173$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007174
7175fi
7176
7177
7178 fi
7179fi
7180
Michael W. Hudson54241132001-12-07 15:38:26 +00007181
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007182# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7183for ac_header in net/if.h
7184do :
7185 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7186#ifdef STDC_HEADERS
7187# include <stdlib.h>
7188# include <stddef.h>
7189#else
7190# ifdef HAVE_STDLIB_H
7191# include <stdlib.h>
7192# endif
7193#endif
7194#ifdef HAVE_SYS_SOCKET_H
7195# include <sys/socket.h>
7196#endif
7197
7198"
Victor Stinnere0be4232011-10-25 13:06:09 +02007199if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007200 cat >>confdefs.h <<_ACEOF
7201#define HAVE_NET_IF_H 1
7202_ACEOF
7203
7204fi
7205
7206done
7207
7208
7209
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007210# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007211for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007212do :
7213 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007214#ifdef HAVE_CURSES_H
7215#include <curses.h>
7216#endif
7217
Matthias Kloseb9621712010-04-24 17:59:49 +00007218"
Victor Stinnere0be4232011-10-25 13:06:09 +02007219if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007220 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007221#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007222_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007223
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007224fi
7225
7226done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007227
7228
Martin v. Löwis11017b12006-01-14 18:12:57 +00007229# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007230for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007231do :
7232 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 +00007233#ifdef HAVE_ASM_TYPES_H
7234#include <asm/types.h>
7235#endif
7236#ifdef HAVE_SYS_SOCKET_H
7237#include <sys/socket.h>
7238#endif
7239
Matthias Kloseb9621712010-04-24 17:59:49 +00007240"
Victor Stinnere0be4232011-10-25 13:06:09 +02007241if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007242 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007243#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007244_ACEOF
7245
7246fi
7247
7248done
7249
7250
Charles-François Natali47413c12011-10-06 19:47:44 +02007251# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007252for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007253do :
7254 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7255ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7256#ifdef HAVE_SYS_SOCKET_H
7257#include <sys/socket.h>
7258#endif
7259
7260"
7261if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7262 cat >>confdefs.h <<_ACEOF
7263#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7264_ACEOF
7265
7266fi
7267
7268done
7269
7270
Guido van Rossum627b2d71993-12-24 10:39:16 +00007271# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007272was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7274$as_echo_n "checking for clock_t in time.h... " >&6; }
7275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007276/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007277#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007278
7279_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007281 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007282 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007283else
Martin v. Löwis11437992002-04-12 09:54:03 +00007284
7285
Matthias Kloseb9621712010-04-24 17:59:49 +00007286$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007287
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007288
Guido van Rossum627b2d71993-12-24 10:39:16 +00007289fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007290rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007291
Matthias Kloseb9621712010-04-24 17:59:49 +00007292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7293$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007294
Matthias Kloseb9621712010-04-24 17:59:49 +00007295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7296$as_echo_n "checking for makedev... " >&6; }
7297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007298/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007299
Jesus Cea740f53a2010-04-28 11:35:30 +00007300#if defined(MAJOR_IN_MKDEV)
7301#include <sys/mkdev.h>
7302#elif defined(MAJOR_IN_SYSMACROS)
7303#include <sys/sysmacros.h>
7304#else
7305#include <sys/types.h>
7306#endif
7307
Neal Norwitz11690112002-07-30 01:08:28 +00007308int
7309main ()
7310{
Jesus Cea740f53a2010-04-28 11:35:30 +00007311
7312 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007313 ;
7314 return 0;
7315}
Matthias Kloseb159a552010-04-25 21:00:44 +00007316
Neal Norwitz11690112002-07-30 01:08:28 +00007317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007318if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007319 ac_cv_has_makedev=yes
7320else
Matthias Kloseb9621712010-04-24 17:59:49 +00007321 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007323rm -f core conftest.err conftest.$ac_objext \
7324 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7326$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007327if test "$ac_cv_has_makedev" = "yes"; then
7328
Matthias Kloseb9621712010-04-24 17:59:49 +00007329$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007330
7331fi
7332
Martin v. Löwis399a6892002-10-04 10:22:02 +00007333# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7334# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7335# defined, but the compiler does not support pragma redefine_extname,
7336# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7337# structures (such as rlimit64) without declaring them. As a
7338# work-around, disable LFS on such configurations
7339
7340use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7342$as_echo_n "checking Solaris LFS bug... " >&6; }
7343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007344/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007345
7346#define _LARGEFILE_SOURCE 1
7347#define _FILE_OFFSET_BITS 64
7348#include <sys/resource.h>
7349
Martin v. Löwis399a6892002-10-04 10:22:02 +00007350int
7351main ()
7352{
7353struct rlimit foo;
7354 ;
7355 return 0;
7356}
7357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007359 sol_lfs_bug=no
7360else
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7365$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007366if test "$sol_lfs_bug" = "yes"; then
7367 use_lfs=no
7368fi
7369
7370if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007371# Two defines needed to enable largefile support on various platforms
7372# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007373case $ac_sys_system/$ac_sys_release in
7374AIX*)
7375
7376$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7377
7378 ;;
7379esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007380
Matthias Kloseb9621712010-04-24 17:59:49 +00007381$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007382
7383
Matthias Kloseb9621712010-04-24 17:59:49 +00007384$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007385
Martin v. Löwis399a6892002-10-04 10:22:02 +00007386fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007387
Guido van Rossum84e7b241996-08-19 21:59:00 +00007388# Add some code to confdefs.h so that the test for off_t works on SCO
7389cat >> confdefs.h <<\EOF
7390#if defined(SCO_DS)
7391#undef _OFF_T
7392#endif
7393EOF
7394
Guido van Rossumef2255b2000-03-10 22:30:29 +00007395# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007396ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007397if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007398
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007399else
Martin v. Löwis11437992002-04-12 09:54:03 +00007400
7401cat >>confdefs.h <<_ACEOF
7402#define mode_t int
7403_ACEOF
7404
7405fi
7406
Matthias Kloseb9621712010-04-24 17:59:49 +00007407ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007408if test "x$ac_cv_type_off_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 off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007414_ACEOF
7415
7416fi
7417
Matthias Kloseb9621712010-04-24 17:59:49 +00007418ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007419if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007420
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007421else
Martin v. Löwis11437992002-04-12 09:54:03 +00007422
7423cat >>confdefs.h <<_ACEOF
7424#define pid_t int
7425_ACEOF
7426
7427fi
7428
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007429
Martin v. Löwis11437992002-04-12 09:54:03 +00007430cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007431#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007432_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007433
Matthias Kloseb9621712010-04-24 17:59:49 +00007434ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007435if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007437else
Martin v. Löwis11437992002-04-12 09:54:03 +00007438
7439cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007440#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007441_ACEOF
7442
7443fi
7444
Matthias Kloseb9621712010-04-24 17:59:49 +00007445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7446$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007447if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007449else
Matthias Kloseb9621712010-04-24 17:59:49 +00007450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007451/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007452#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007453
7454_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007456 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007457 ac_cv_type_uid_t=yes
7458else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007459 ac_cv_type_uid_t=no
7460fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007461rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007462
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7465$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007466if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007467
Matthias Kloseb9621712010-04-24 17:59:49 +00007468$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007469
7470
Matthias Kloseb9621712010-04-24 17:59:49 +00007471$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007472
7473fi
7474
Mark Dickinson983bc162012-12-02 12:11:38 +00007475
7476# There are two separate checks for each of the exact-width integer types we
7477# need. First we check whether the type is available using the usual
7478# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7479# and <stdint.h> where available). We then also use the special type checks of
7480# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7481# directly, #define's uint32_t to be a suitable type.
7482
7483ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7484if test "x$ac_cv_type_uint32_t" = xyes; then :
7485
7486$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7487
7488fi
7489
Matthias Kloseb9621712010-04-24 17:59:49 +00007490ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7491case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007492 no|yes) ;; #(
7493 *)
7494
Matthias Kloseb9621712010-04-24 17:59:49 +00007495$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007496
7497
7498cat >>confdefs.h <<_ACEOF
7499#define uint32_t $ac_cv_c_uint32_t
7500_ACEOF
7501;;
7502 esac
7503
Mark Dickinson983bc162012-12-02 12:11:38 +00007504
7505ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7506if test "x$ac_cv_type_uint64_t" = xyes; then :
7507
7508$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7509
7510fi
7511
Matthias Kloseb9621712010-04-24 17:59:49 +00007512ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7513case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007514 no|yes) ;; #(
7515 *)
7516
Matthias Kloseb9621712010-04-24 17:59:49 +00007517$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007518
7519
7520cat >>confdefs.h <<_ACEOF
7521#define uint64_t $ac_cv_c_uint64_t
7522_ACEOF
7523;;
7524 esac
7525
Mark Dickinson983bc162012-12-02 12:11:38 +00007526
7527ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7528if test "x$ac_cv_type_int32_t" = xyes; then :
7529
7530$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7531
7532fi
7533
Matthias Kloseb9621712010-04-24 17:59:49 +00007534ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7535case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007536 no|yes) ;; #(
7537 *)
7538
7539cat >>confdefs.h <<_ACEOF
7540#define int32_t $ac_cv_c_int32_t
7541_ACEOF
7542;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007543esac
7544
Mark Dickinson983bc162012-12-02 12:11:38 +00007545
7546ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7547if test "x$ac_cv_type_int64_t" = xyes; then :
7548
7549$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7550
7551fi
7552
Matthias Kloseb9621712010-04-24 17:59:49 +00007553ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7554case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007555 no|yes) ;; #(
7556 *)
7557
7558cat >>confdefs.h <<_ACEOF
7559#define int64_t $ac_cv_c_int64_t
7560_ACEOF
7561;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007562esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007563
Mark Dickinson983bc162012-12-02 12:11:38 +00007564
Matthias Kloseb9621712010-04-24 17:59:49 +00007565ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007566if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007567
Matthias Kloseb9621712010-04-24 17:59:49 +00007568$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007569
7570fi
7571
Stefan Krah1919b7e2012-03-21 18:25:23 +01007572ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7573if test "x$ac_cv_type___uint128_t" = xyes; then :
7574
7575$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7576
7577fi
7578
Jack Jansendd19cf82001-12-06 22:36:17 +00007579
Michael W. Hudson54241132001-12-07 15:38:26 +00007580# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007581# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007582# The cast to long int works around a bug in the HP C Compiler
7583# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7584# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7585# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7587$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007588if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007589 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007590else
Matthias Kloseb9621712010-04-24 17:59:49 +00007591 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 +00007592
Martin v. Löwis11437992002-04-12 09:54:03 +00007593else
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 if test "$ac_cv_type_int" = yes; then
7595 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007597as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007598See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007599 else
7600 ac_cv_sizeof_int=0
7601 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007603
Martin v. Löwis11437992002-04-12 09:54:03 +00007604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7606$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007607
7608
7609
Martin v. Löwis11437992002-04-12 09:54:03 +00007610cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007611#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007612_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007613
7614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615# The cast to long int works around a bug in the HP C Compiler
7616# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7617# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7618# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7620$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007621if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007622 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007623else
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 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 +00007625
Martin v. Löwis11437992002-04-12 09:54:03 +00007626else
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 if test "$ac_cv_type_long" = yes; then
7628 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7629$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007630as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007631See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007632 else
7633 ac_cv_sizeof_long=0
7634 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007636
Martin v. Löwis11437992002-04-12 09:54:03 +00007637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7639$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007640
7641
7642
Martin v. Löwis11437992002-04-12 09:54:03 +00007643cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007644#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007645_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007646
7647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648# The cast to long int works around a bug in the HP C Compiler
7649# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7650# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7651# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7653$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007654if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007656else
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 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 +00007658
Martin v. Löwis11437992002-04-12 09:54:03 +00007659else
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 if test "$ac_cv_type_void_p" = yes; then
7661 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007663as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007664See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007665 else
7666 ac_cv_sizeof_void_p=0
7667 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007669
Martin v. Löwis11437992002-04-12 09:54:03 +00007670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7672$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673
7674
7675
Martin v. Löwis11437992002-04-12 09:54:03 +00007676cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007677#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007678_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007679
7680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681# The cast to long int works around a bug in the HP C Compiler
7682# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7683# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7684# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7686$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007687if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007688 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007689else
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 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 +00007691
Martin v. Löwis11437992002-04-12 09:54:03 +00007692else
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 if test "$ac_cv_type_short" = yes; then
7694 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007696as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007697See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007698 else
7699 ac_cv_sizeof_short=0
7700 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007702
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7705$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007706
7707
7708
Martin v. Löwis11437992002-04-12 09:54:03 +00007709cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007710#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007711_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007712
7713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714# The cast to long int works around a bug in the HP C Compiler
7715# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7716# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7717# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7719$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007720if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007722else
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 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 +00007724
Martin v. Löwis11437992002-04-12 09:54:03 +00007725else
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 if test "$ac_cv_type_float" = yes; then
7727 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007729as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007730See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007731 else
7732 ac_cv_sizeof_float=0
7733 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007735
Martin v. Löwis11437992002-04-12 09:54:03 +00007736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7738$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007739
7740
7741
Martin v. Löwis11437992002-04-12 09:54:03 +00007742cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007743#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007744_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007745
7746
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747# The cast to long int works around a bug in the HP C Compiler
7748# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7749# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7750# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7752$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007753if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007755else
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 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 +00007757
Martin v. Löwis11437992002-04-12 09:54:03 +00007758else
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 if test "$ac_cv_type_double" = yes; then
7760 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007762as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007763See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007764 else
7765 ac_cv_sizeof_double=0
7766 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007768
Martin v. Löwis11437992002-04-12 09:54:03 +00007769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7771$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772
7773
7774
Martin v. Löwis11437992002-04-12 09:54:03 +00007775cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007776#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007777_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007778
7779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007780# The cast to long int works around a bug in the HP C Compiler
7781# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7782# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7783# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7785$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007786if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007788else
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 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 +00007790
Martin v. Löwis11437992002-04-12 09:54:03 +00007791else
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 if test "$ac_cv_type_fpos_t" = yes; then
7793 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7794$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007795as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007796See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 else
7798 ac_cv_sizeof_fpos_t=0
7799 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007801
Martin v. Löwis11437992002-04-12 09:54:03 +00007802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7804$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805
7806
7807
Martin v. Löwis11437992002-04-12 09:54:03 +00007808cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007809#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007810_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007811
Michael W. Hudson54241132001-12-07 15:38:26 +00007812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813# The cast to long int works around a bug in the HP C Compiler
7814# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7815# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7816# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7818$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007819if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007821else
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 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 +00007823
Martin v. Löwis18e16552006-02-15 17:27:45 +00007824else
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 if test "$ac_cv_type_size_t" = yes; then
7826 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007828as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007829See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 else
7831 ac_cv_sizeof_size_t=0
7832 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007834
Martin v. Löwis18e16552006-02-15 17:27:45 +00007835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7837$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838
7839
7840
Martin v. Löwis18e16552006-02-15 17:27:45 +00007841cat >>confdefs.h <<_ACEOF
7842#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7843_ACEOF
7844
7845
Christian Heimes400adb02008-02-01 08:12:03 +00007846# The cast to long int works around a bug in the HP C Compiler
7847# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7848# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7849# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7851$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007852if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007854else
Matthias Kloseb9621712010-04-24 17:59:49 +00007855 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 +00007856
Christian Heimes400adb02008-02-01 08:12:03 +00007857else
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 if test "$ac_cv_type_pid_t" = yes; then
7859 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007861as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007862See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007863 else
7864 ac_cv_sizeof_pid_t=0
7865 fi
7866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867
Christian Heimes400adb02008-02-01 08:12:03 +00007868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7870$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007871
7872
7873
7874cat >>confdefs.h <<_ACEOF
7875#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7876_ACEOF
7877
7878
Michael W. Hudson54241132001-12-07 15:38:26 +00007879
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7881$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007882have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007884/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007885
Martin v. Löwis11437992002-04-12 09:54:03 +00007886int
7887main ()
7888{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007889long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 ;
7891 return 0;
7892}
7893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007894if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007895
7896
Matthias Kloseb9621712010-04-24 17:59:49 +00007897$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007898
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007899 have_long_long=yes
7900
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7904$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007905if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906# The cast to long int works around a bug in the HP C Compiler
7907# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7908# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7909# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7911$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007912if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007914else
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 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 +00007916
Martin v. Löwis11437992002-04-12 09:54:03 +00007917else
Matthias Kloseb9621712010-04-24 17:59:49 +00007918 if test "$ac_cv_type_long_long" = yes; then
7919 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007921as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007922See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923 else
7924 ac_cv_sizeof_long_long=0
7925 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007927
Martin v. Löwis11437992002-04-12 09:54:03 +00007928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7930$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931
7932
7933
Martin v. Löwis11437992002-04-12 09:54:03 +00007934cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007935#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007936_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007937
Michael W. Hudson54241132001-12-07 15:38:26 +00007938
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007939fi
7940
Matthias Kloseb9621712010-04-24 17:59:49 +00007941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7942$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007943have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007945/* end confdefs.h. */
7946
7947int
7948main ()
7949{
7950long double x; x = (long double)0;
7951 ;
7952 return 0;
7953}
7954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007955if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007956
7957
Matthias Kloseb9621712010-04-24 17:59:49 +00007958$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007959
7960 have_long_double=yes
7961
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007962fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7965$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007966if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007967# The cast to long int works around a bug in the HP C Compiler
7968# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7969# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7970# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7972$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007973if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007974 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007975else
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 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 +00007977
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007978else
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 if test "$ac_cv_type_long_double" = yes; then
7980 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007982as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007983See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007984 else
7985 ac_cv_sizeof_long_double=0
7986 fi
7987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7991$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007992
7993
7994
7995cat >>confdefs.h <<_ACEOF
7996#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7997_ACEOF
7998
7999
8000fi
8001
8002
Matthias Kloseb9621712010-04-24 17:59:49 +00008003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8004$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008005have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008007/* end confdefs.h. */
8008
8009int
8010main ()
8011{
8012_Bool x; x = (_Bool)0;
8013 ;
8014 return 0;
8015}
8016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008017if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008018
8019
Matthias Kloseb9621712010-04-24 17:59:49 +00008020$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008021
8022 have_c99_bool=yes
8023
Thomas Woutersb2137042007-02-01 18:02:27 +00008024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8027$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008028if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029# The cast to long int works around a bug in the HP C Compiler
8030# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8031# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8032# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8034$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008035if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008037else
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 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 +00008039
Thomas Woutersb2137042007-02-01 18:02:27 +00008040else
Matthias Kloseb9621712010-04-24 17:59:49 +00008041 if test "$ac_cv_type__Bool" = yes; then
8042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008044as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008045See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046 else
8047 ac_cv_sizeof__Bool=0
8048 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008050
Thomas Woutersb2137042007-02-01 18:02:27 +00008051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8053$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054
8055
8056
Thomas Woutersb2137042007-02-01 18:02:27 +00008057cat >>confdefs.h <<_ACEOF
8058#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8059_ACEOF
8060
8061
8062fi
8063
Matthias Kloseb9621712010-04-24 17:59:49 +00008064ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008065 #include <stdint.h>
8066 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008067 #ifdef HAVE_INTTYPES_H
8068 #include <inttypes.h>
8069 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008070"
Victor Stinnere0be4232011-10-25 13:06:09 +02008071if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008072
8073cat >>confdefs.h <<_ACEOF
8074#define HAVE_UINTPTR_T 1
8075_ACEOF
8076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077# The cast to long int works around a bug in the HP C Compiler
8078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8080# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8082$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008083if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008085else
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 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 +00008087
Martin v. Löwis11437992002-04-12 09:54:03 +00008088else
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 if test "$ac_cv_type_uintptr_t" = yes; then
8090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008092as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008093See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008094 else
8095 ac_cv_sizeof_uintptr_t=0
8096 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008098
Martin v. Löwis11437992002-04-12 09:54:03 +00008099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8101$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102
8103
8104
Martin v. Löwis11437992002-04-12 09:54:03 +00008105cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008106#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008107_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008108
Michael W. Hudson54241132001-12-07 15:38:26 +00008109
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008110fi
8111
Thomas Wouters89f507f2006-12-13 04:49:30 +00008112
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008113# The cast to long int works around a bug in the HP C Compiler
8114# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8115# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8116# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8118$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008119if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008120 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008121else
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008123#ifdef HAVE_SYS_TYPES_H
8124#include <sys/types.h>
8125#endif
8126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008128
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008129else
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 if test "$ac_cv_type_off_t" = yes; then
8131 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8132$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008133as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008134See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008135 else
8136 ac_cv_sizeof_off_t=0
8137 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008139
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8142$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008143
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008144
8145
Martin v. Löwis11437992002-04-12 09:54:03 +00008146cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008147#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008148_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008149
Michael W. Hudson54241132001-12-07 15:38:26 +00008150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8153$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008154if test "$have_long_long" = yes
8155then
8156if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008157 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008158
Matthias Kloseb9621712010-04-24 17:59:49 +00008159$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008160
Matthias Kloseb9621712010-04-24 17:59:49 +00008161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8162$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008163else
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8165$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008166fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008167else
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8169$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008170fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008171
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008172# The cast to long int works around a bug in the HP C Compiler
8173# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8174# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8175# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8177$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008178if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008179 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008180else
Matthias Kloseb9621712010-04-24 17:59:49 +00008181 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008182#ifdef HAVE_SYS_TYPES_H
8183#include <sys/types.h>
8184#endif
8185#ifdef HAVE_TIME_H
8186#include <time.h>
8187#endif
8188
Matthias Kloseb9621712010-04-24 17:59:49 +00008189"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008190
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008191else
Matthias Kloseb9621712010-04-24 17:59:49 +00008192 if test "$ac_cv_type_time_t" = yes; then
8193 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8194$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008195as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008196See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008197 else
8198 ac_cv_sizeof_time_t=0
8199 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008201
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8204$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008206
8207
Martin v. Löwis11437992002-04-12 09:54:03 +00008208cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008209#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008210_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008211
Michael W. Hudson54241132001-12-07 15:38:26 +00008212
8213
Trent Mick635f6fb2000-08-23 21:33:05 +00008214# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008215ac_save_cc="$CC"
8216if test "$ac_cv_kpthread" = "yes"
8217then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008218elif test "$ac_cv_kthread" = "yes"
8219then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008220elif test "$ac_cv_pthread" = "yes"
8221then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008222fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008223
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8225$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008226have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008228/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008229
8230 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008231int
8232main ()
8233{
Guido van Rossum12580492000-09-24 16:47:19 +00008234pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008235 ;
8236 return 0;
8237}
Matthias Kloseb159a552010-04-25 21:00:44 +00008238
Martin v. Löwis11437992002-04-12 09:54:03 +00008239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008240if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008241 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8245$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008246if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008248# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8249# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8250# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8252$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008253if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008254 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008255else
Matthias Kloseb9621712010-04-24 17:59:49 +00008256 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008257#ifdef HAVE_PTHREAD_H
8258#include <pthread.h>
8259#endif
8260
Matthias Kloseb9621712010-04-24 17:59:49 +00008261"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008262
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008263else
Matthias Kloseb9621712010-04-24 17:59:49 +00008264 if test "$ac_cv_type_pthread_t" = yes; then
8265 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008267as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008268See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008269 else
8270 ac_cv_sizeof_pthread_t=0
8271 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008273
Trent Mick635f6fb2000-08-23 21:33:05 +00008274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8276$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008278
8279
Martin v. Löwis11437992002-04-12 09:54:03 +00008280cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008281#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008282_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008283
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008284
Trent Mick635f6fb2000-08-23 21:33:05 +00008285fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008286CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008287
Michael W. Hudson54241132001-12-07 15:38:26 +00008288
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008289case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008290 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008291 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8292 ;;
8293 Darwin/*)
8294 OTHER_LIBTOOL_OPT=""
8295 ;;
8296esac
8297
8298
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008299
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008300case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008301 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008302 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8303 if test "${enable_universalsdk}"; then
8304 :
8305 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008306 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008307 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008308 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008309 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008310 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008311 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008312 if test ${gcc_version} '<' 4.0
8313 then
8314 LIBTOOL_CRUFT="-lcc_dynamic"
8315 else
8316 LIBTOOL_CRUFT=""
8317 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008319 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008320else
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008322/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008323
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008324 #include <unistd.h>
8325 int main(int argc, char*argv[])
8326 {
8327 if (sizeof(long) == 4) {
8328 return 0;
8329 } else {
8330 return 1;
8331 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008332 }
8333
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008335if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008336 ac_osx_32bit=yes
8337else
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8341 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008342fi
8343
8344
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008345 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008346 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008347 i386)
8348 MACOSX_DEFAULT_ARCH="i386"
8349 ;;
8350 ppc)
8351 MACOSX_DEFAULT_ARCH="ppc"
8352 ;;
8353 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008354 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008355 ;;
8356 esac
8357 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008358 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008359 i386)
8360 MACOSX_DEFAULT_ARCH="x86_64"
8361 ;;
8362 ppc)
8363 MACOSX_DEFAULT_ARCH="ppc64"
8364 ;;
8365 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008366 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008367 ;;
8368 esac
8369
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008370 fi
8371
8372 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008373 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008374 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008375esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8377$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008378if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008379then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008380 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008381 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008382 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008383
Matthias Kloseb9621712010-04-24 17:59:49 +00008384$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008385
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8387$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008388 if test $enable_shared = "yes"
8389 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008390 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 +00008391 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008392else
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8394$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008395fi
8396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8398$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008399case $ac_sys_system/$ac_sys_release in
8400 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008401
Matthias Kloseb9621712010-04-24 17:59:49 +00008402$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008403
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8405$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008406 ;;
8407 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8409$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008410 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008411esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008412
Guido van Rossum0a516c91994-09-12 10:58:40 +00008413# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008414
Michael W. Hudson54241132001-12-07 15:38:26 +00008415
8416
8417
8418
Benjamin Peterson99f03762010-04-11 22:15:28 +00008419
Thomas Wouters477c8d52006-05-27 19:21:47 +00008420
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008421# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8422# -- usually .so, .sl on HP-UX, .dll on Cygwin
8423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8424$as_echo_n "checking the extension of shared libraries... " >&6; }
8425if test -z "$SHLIB_SUFFIX"; then
8426 case $ac_sys_system in
8427 hp*|HP*)
8428 case `uname -m` in
8429 ia64) SHLIB_SUFFIX=.so;;
8430 *) SHLIB_SUFFIX=.sl;;
8431 esac
8432 ;;
8433 CYGWIN*) SHLIB_SUFFIX=.dll;;
8434 *) SHLIB_SUFFIX=.so;;
8435 esac
8436fi
8437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8438$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008439
Guido van Rossum0a516c91994-09-12 10:58:40 +00008440# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008441# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008442# (Shared libraries in this instance are shared modules to be loaded into
8443# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8445$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008446if test -z "$LDSHARED"
8447then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008448 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008449 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008450 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008451 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008452 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008453 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008454 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008455 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008456 if test "$GCC" = "yes" ; then
8457 LDSHARED='$(CC) -shared'
8458 LDCXXSHARED='$(CXX) -shared'
8459 else
8460 LDSHARED='$(CC) -G'
8461 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008462 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008463 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008464 if test "$GCC" = "yes" ; then
8465 LDSHARED='$(CC) -shared'
8466 LDCXXSHARED='$(CXX) -shared'
8467 else
8468 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008469 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008470 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008471 LDSHARED='$(CC) -bundle'
8472 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008473 if test "$enable_framework" ; then
8474 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008475 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8476 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008477 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008478 else
8479 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008480 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008481 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008482 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008483 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008484 LDSHARED='$(CC) -bundle'
8485 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008486 if test "$enable_framework" ; then
8487 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008488 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8489 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008490 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008491 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008492 # No framework, use the Python app as bundle-loader
8493 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008494 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008495 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008496 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008497 Darwin/*)
8498 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8499 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008500
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008501 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008502 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008503 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8504 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008505 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008506 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008507 LDSHARED='$(CC) -bundle'
8508 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008509 if test "$enable_framework" ; then
8510 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008511 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8512 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008513 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008514 else
8515 # No framework, use the Python app as bundle-loader
8516 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8517 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008518 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008519 fi
8520 fi
8521 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008522 Linux*|GNU*|QNX*)
8523 LDSHARED='$(CC) -shared'
8524 LDCXXSHARED='$(CXX) -shared';;
8525 BSD/OS*/4*)
8526 LDSHARED="gcc -shared"
8527 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008528 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008529 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008530 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008531 LDSHARED='$(CC) -shared'
8532 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008533 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008534 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008535 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008536 OpenBSD*)
8537 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8538 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008539 LDSHARED='$(CC) -shared $(CCSHARED)'
8540 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008541 else
8542 case `uname -r` in
8543 [01].* | 2.[0-7] | 2.[0-7].*)
8544 LDSHARED="ld -Bshareable ${LDFLAGS}"
8545 ;;
8546 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008547 LDSHARED='$(CC) -shared $(CCSHARED)'
8548 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008549 ;;
8550 esac
8551 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008552 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008553 LDSHARED='$(CC) -shared'
8554 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008555 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008556 if test "$GCC" = "yes" ; then
8557 LDSHARED='$(CC) -shared'
8558 LDCXXSHARED='$(CXX) -shared'
8559 else
8560 LDSHARED='$(CC) -G'
8561 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008562 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008563 SCO_SV*)
8564 LDSHARED='$(CC) -Wl,-G,-Bexport'
8565 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8566 CYGWIN*)
8567 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8568 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008569 *) LDSHARED="ld";;
8570 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: $LDSHARED" >&5
8573$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008574LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008575BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008576# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008577# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8579$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008580if test -z "$CCSHARED"
8581then
Guido van Rossum07397971997-04-29 21:49:50 +00008582 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008583 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008584 then CCSHARED="-fPIC";
8585 elif test `uname -p` = sparc;
8586 then CCSHARED="-xcode=pic32";
8587 else CCSHARED="-Kpic";
8588 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008589 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008590 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008591 else CCSHARED="+z";
8592 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008593 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008594 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008595 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008596 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008597 if test "$GCC" = "yes"
8598 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008599 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008600 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008601 SCO_SV*)
8602 if test "$GCC" = "yes"
8603 then CCSHARED="-fPIC"
8604 else CCSHARED="-Kpic -belf"
8605 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008606 IRIX*/6*) case $CC in
8607 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008608 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008609 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008610 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8613$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008614# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008615# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8617$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008618if test -z "$LINKFORSHARED"
8619then
Guido van Rossum07397971997-04-29 21:49:50 +00008620 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008621 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008622 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008623 LINKFORSHARED="-Wl,-E -Wl,+s";;
8624# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008625 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008626 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008627 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008628 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008629 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008630
8631 # Issue #18075: the default maximum stack size (8MBytes) is too
8632 # small for the default recursion limit. Increase the stack size
8633 # to ensure that tests don't crash
8634 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8635
Jack Jansene578a632001-08-15 01:27:14 +00008636 if test "$enable_framework"
8637 then
Jack Jansenda49e192005-01-07 13:08:22 +00008638 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008639 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008640 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008641 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008642 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008643 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008644 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008645 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8646 then
8647 LINKFORSHARED="-Wl,--export-dynamic"
8648 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008649 SunOS/5*) case $CC in
8650 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008651 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008652 then
8653 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008654 fi;;
8655 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008656 CYGWIN*)
8657 if test $enable_shared = "no"
8658 then
8659 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8660 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008661 QNX*)
8662 # -Wl,-E causes the symbols to be added to the dynamic
8663 # symbol table so that they can be found when a module
8664 # is loaded. -N 2048K causes the stack size to be set
8665 # to 2048 kilobytes so that the stack doesn't overflow
8666 # when running test_compile.py.
8667 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008668 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8671$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008672
Michael W. Hudson54241132001-12-07 15:38:26 +00008673
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008674
Matthias Kloseb9621712010-04-24 17:59:49 +00008675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8676$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008677if test ! "$LIBRARY" = "$LDLIBRARY"
8678then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008679 case $ac_sys_system in
8680 CYGWIN*)
8681 # Cygwin needs CCSHARED when building extension DLLs
8682 # but not when building the interpreter DLL.
8683 CFLAGSFORSHARED='';;
8684 *)
8685 CFLAGSFORSHARED='$(CCSHARED)'
8686 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8689$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008690
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008691# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8692# library (with --enable-shared).
8693# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008694# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8695# if it is not required, since it creates a dependency of the shared library
8696# to LIBS. This, in turn, means that applications linking the shared libpython
8697# don't need to link LIBS explicitly. The default should be only changed
8698# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008699
Matthias Kloseb9621712010-04-24 17:59:49 +00008700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8701$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008702case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008703 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008704 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008705esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8707$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008708
8709
Guido van Rossum627b2d71993-12-24 10:39:16 +00008710# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8712$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008713if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008714 $as_echo_n "(cached) " >&6
8715else
8716 ac_check_lib_save_LIBS=$LIBS
8717LIBS="-lsendfile $LIBS"
8718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8719/* end confdefs.h. */
8720
8721/* Override any GCC internal prototype to avoid an error.
8722 Use char because int might match the return type of a GCC
8723 builtin and then its argument prototype would still apply. */
8724#ifdef __cplusplus
8725extern "C"
8726#endif
8727char sendfile ();
8728int
8729main ()
8730{
8731return sendfile ();
8732 ;
8733 return 0;
8734}
8735_ACEOF
8736if ac_fn_c_try_link "$LINENO"; then :
8737 ac_cv_lib_sendfile_sendfile=yes
8738else
8739 ac_cv_lib_sendfile_sendfile=no
8740fi
8741rm -f core conftest.err conftest.$ac_objext \
8742 conftest$ac_exeext conftest.$ac_ext
8743LIBS=$ac_check_lib_save_LIBS
8744fi
8745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8746$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008747if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008748 cat >>confdefs.h <<_ACEOF
8749#define HAVE_LIBSENDFILE 1
8750_ACEOF
8751
8752 LIBS="-lsendfile $LIBS"
8753
8754fi
8755
Matthias Kloseb9621712010-04-24 17:59:49 +00008756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8757$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008758if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008760else
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008762LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766/* Override any GCC internal prototype to avoid an error.
8767 Use char because int might match the return type of a GCC
8768 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008769#ifdef __cplusplus
8770extern "C"
8771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008772char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008773int
8774main ()
8775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008776return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 ;
8778 return 0;
8779}
8780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008781if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008783else
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786rm -f core conftest.err conftest.$ac_objext \
8787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008788LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8791$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008792if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 cat >>confdefs.h <<_ACEOF
8794#define HAVE_LIBDL 1
8795_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008796
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008797 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008798
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008799fi
8800 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8802$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008803if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008805else
Martin v. Löwis11437992002-04-12 09:54:03 +00008806 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008807LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008811/* Override any GCC internal prototype to avoid an error.
8812 Use char because int might match the return type of a GCC
8813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008814#ifdef __cplusplus
8815extern "C"
8816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008817char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008818int
8819main ()
8820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008822 ;
8823 return 0;
8824}
8825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008826if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008827 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008828else
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008831rm -f core conftest.err conftest.$ac_objext \
8832 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008833LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8836$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008837if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 cat >>confdefs.h <<_ACEOF
8839#define HAVE_LIBDLD 1
8840_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008841
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008842 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008843
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008844fi
8845 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008846
Georg Brandlb1441c72009-01-03 22:33:39 +00008847# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008848if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8850$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008851if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008852 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008853else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008854 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008858/* Override any GCC internal prototype to avoid an error.
8859 Use char because int might match the return type of a GCC
8860 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008861#ifdef __cplusplus
8862extern "C"
8863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008864char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008865int
8866main ()
8867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008869 ;
8870 return 0;
8871}
8872_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008873for ac_lib in '' pthread rt posix4; do
8874 if test -z "$ac_lib"; then
8875 ac_res="none required"
8876 else
8877 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008878 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008883rm -f core conftest.err conftest.$ac_objext \
8884 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008885 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008888done
Victor Stinnere0be4232011-10-25 13:06:09 +02008889if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891else
8892 ac_cv_search_sem_init=no
8893fi
8894rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008895LIBS=$ac_func_search_save_LIBS
8896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8898$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008900if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008902
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008903fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008904 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008905 # posix4 on Solaris 2.6
8906 # pthread (first!) on Linux
8907fi
8908
Martin v. Löwis19d17342003-06-14 21:03:05 +00008909# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8911$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008912if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008913 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008914else
8915 ac_check_lib_save_LIBS=$LIBS
8916LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008918/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008920/* Override any GCC internal prototype to avoid an error.
8921 Use char because int might match the return type of a GCC
8922 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008923#ifdef __cplusplus
8924extern "C"
8925#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008926char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008927int
8928main ()
8929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008930return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008931 ;
8932 return 0;
8933}
8934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008935if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008936 ac_cv_lib_intl_textdomain=yes
8937else
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008940rm -f core conftest.err conftest.$ac_objext \
8941 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008942LIBS=$ac_check_lib_save_LIBS
8943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8945$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008946if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008947
Matthias Kloseb9621712010-04-24 17:59:49 +00008948$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008949
Brett Cannonc6d936e2009-06-07 20:09:53 +00008950 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008951fi
8952
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008953
8954# checks for system dependent C++ extensions support
8955case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8957$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008959/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008960
Georg Brandl59e87bd2011-02-15 19:48:59 +00008961 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008962int
8963main ()
8964{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008965loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008966 ;
8967 return 0;
8968}
Matthias Kloseb159a552010-04-25 21:00:44 +00008969
Martin v. Löwis11437992002-04-12 09:54:03 +00008970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008971if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008972
Matthias Kloseb159a552010-04-25 21:00:44 +00008973
Matthias Kloseb9621712010-04-24 17:59:49 +00008974$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008975
Matthias Kloseb159a552010-04-25 21:00:44 +00008976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008977$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008978
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008979else
Matthias Kloseb159a552010-04-25 21:00:44 +00008980
8981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008982$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008983
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008985rm -f core conftest.err conftest.$ac_objext \
8986 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008987 *) ;;
8988esac
8989
Guido van Rossum70c7f481998-03-26 18:44:10 +00008990# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8992$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008993if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008995else
Martin v. Löwis11437992002-04-12 09:54:03 +00008996 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008997LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009001/* Override any GCC internal prototype to avoid an error.
9002 Use char because int might match the return type of a GCC
9003 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009004#ifdef __cplusplus
9005extern "C"
9006#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009007char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009008int
9009main ()
9010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 ;
9013 return 0;
9014}
9015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009016if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009017 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009018else
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009021rm -f core conftest.err conftest.$ac_objext \
9022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009023LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9026$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009027if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009028 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009029fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009030 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9032$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009033if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009035else
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009037LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009041/* Override any GCC internal prototype to avoid an error.
9042 Use char because int might match the return type of a GCC
9043 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009044#ifdef __cplusplus
9045extern "C"
9046#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009047char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009048int
9049main ()
9050{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009051return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 ;
9053 return 0;
9054}
9055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009056if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009058else
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009061rm -f core conftest.err conftest.$ac_objext \
9062 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009063LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9066$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009067if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009068 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009069fi
9070 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009071
Matthias Kloseb9621712010-04-24 17:59:49 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9073$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009075# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009076if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009077 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9079$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009080LIBS="$withval $LIBS"
9081
9082else
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9084$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009085fi
9086
Guido van Rossum7f43da71994-08-01 12:15:30 +00009087
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009088if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009089 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9090set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9092$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009093if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009094 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009095else
9096 case $PKG_CONFIG in
9097 [\\/]* | ?:[\\/]*)
9098 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9099 ;;
9100 *)
9101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9102for as_dir in $PATH
9103do
9104 IFS=$as_save_IFS
9105 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009108 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009110 break 2
9111 fi
9112done
Matthias Kloseb9621712010-04-24 17:59:49 +00009113 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009114IFS=$as_save_IFS
9115
9116 ;;
9117esac
9118fi
9119PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9120if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9122$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009123else
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9125$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009126fi
9127
9128
9129fi
9130if test -z "$ac_cv_path_PKG_CONFIG"; then
9131 ac_pt_PKG_CONFIG=$PKG_CONFIG
9132 # Extract the first word of "pkg-config", so it can be a program name with args.
9133set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9135$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009136if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009137 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009138else
9139 case $ac_pt_PKG_CONFIG in
9140 [\\/]* | ?:[\\/]*)
9141 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9142 ;;
9143 *)
9144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9145for as_dir in $PATH
9146do
9147 IFS=$as_save_IFS
9148 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009149 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009151 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009153 break 2
9154 fi
9155done
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009157IFS=$as_save_IFS
9158
9159 ;;
9160esac
9161fi
9162ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9163if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9165$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009166else
Matthias Kloseb9621712010-04-24 17:59:49 +00009167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9168$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009169fi
9170
9171 if test "x$ac_pt_PKG_CONFIG" = x; then
9172 PKG_CONFIG=""
9173 else
9174 case $cross_compiling:$ac_tool_warned in
9175yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9177$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009178ac_tool_warned=yes ;;
9179esac
9180 PKG_CONFIG=$ac_pt_PKG_CONFIG
9181 fi
9182else
9183 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9184fi
9185
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009186
9187# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9189$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009190
9191# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009192if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009193 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009194else
9195 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009196fi
9197
9198
Matthias Kloseb9621712010-04-24 17:59:49 +00009199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9200$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009201
9202# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9204$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009205
9206# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009207if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009208 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009209else
9210 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009211fi
9212
9213
9214if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009215 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9216else
9217 LIBFFI_INCLUDEDIR=""
9218fi
9219
9220
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9222$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009223
Stefan Krah60187b52012-03-23 19:06:27 +01009224# Check for use of the system libmpdec library
9225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9226$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9227
9228# Check whether --with-system_libmpdec was given.
9229if test "${with_system_libmpdec+set}" = set; then :
9230 withval=$with_system_libmpdec;
9231else
9232 with_system_libmpdec="no"
9233fi
9234
9235
9236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9237$as_echo "$with_system_libmpdec" >&6; }
9238
Benjamin Peterson076ed002010-10-31 17:11:02 +00009239# Check for support for loadable sqlite extensions
9240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9241$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9242# Check whether --enable-loadable-sqlite-extensions was given.
9243if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9244 enableval=$enable_loadable_sqlite_extensions;
9245else
9246 enable_loadable_sqlite_extensions="no"
9247fi
9248
9249
9250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9251$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9252
Ned Deilyd819b932013-09-06 01:07:05 -07009253# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9254
9255
9256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9257$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9258
9259# Check whether --with-tcltk-includes was given.
9260if test "${with_tcltk_includes+set}" = set; then :
9261 withval=$with_tcltk_includes;
9262else
9263 with_tcltk_includes="default"
9264fi
9265
9266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9267$as_echo "$with_tcltk_includes" >&6; }
9268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9269$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9270
9271# Check whether --with-tcltk-libs was given.
9272if test "${with_tcltk_libs+set}" = set; then :
9273 withval=$with_tcltk_libs;
9274else
9275 with_tcltk_libs="default"
9276fi
9277
9278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9279$as_echo "$with_tcltk_libs" >&6; }
9280if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9281then
9282 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9283 then
9284 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9285 fi
9286 TCLTK_INCLUDES=""
9287 TCLTK_LIBS=""
9288else
9289 TCLTK_INCLUDES="$with_tcltk_includes"
9290 TCLTK_LIBS="$with_tcltk_libs"
9291fi
9292
Matthias Klose55708cc2009-04-30 08:06:49 +00009293# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9295$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009296
9297# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009298if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009299 withval=$with_dbmliborder;
9300if test x$with_dbmliborder = xyes
9301then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009302as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009303else
9304 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9305 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9306 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009307 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009308 fi
9309 done
9310fi
9311fi
9312
Matthias Kloseb9621712010-04-24 17:59:49 +00009313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9314$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009315
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009316# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009317
9318
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9320$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009322# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009323if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009324 withval=$with_signal_module;
9325fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009326
9327
9328if test -z "$with_signal_module"
9329then with_signal_module="yes"
9330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9332$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009333
9334if test "${with_signal_module}" = "yes"; then
9335 USE_SIGNAL_MODULE=""
9336 SIGNAL_OBJS=""
9337else
9338 USE_SIGNAL_MODULE="#"
9339 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9340fi
9341
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009342# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009343
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009344USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009346
Martin v. Löwis11437992002-04-12 09:54:03 +00009347
9348# Templates for things AC_DEFINEd more than once.
9349# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009350
9351
Martin v. Löwis11437992002-04-12 09:54:03 +00009352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9354$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009357if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009358 withval=$with_threads;
9359fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009360
9361
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009362# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009365if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009366 withval=$with_thread; with_threads=$with_thread
9367fi
9368
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009369
9370if test -z "$with_threads"
9371then with_threads="yes"
9372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9374$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009375
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009376
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009377if test "$with_threads" = "no"
9378then
9379 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009380elif test "$ac_cv_pthread_is_default" = yes
9381then
Matthias Kloseb9621712010-04-24 17:59:49 +00009382 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009383
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009384 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009385 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009386
9387 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009389elif test "$ac_cv_kpthread" = "yes"
9390then
9391 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009392 if test "$ac_cv_cxx_thread" = "yes"; then
9393 CXX="$CXX -Kpthread"
9394 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009396
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009397 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009398 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009399elif test "$ac_cv_kthread" = "yes"
9400then
9401 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009402 if test "$ac_cv_cxx_thread" = "yes"; then
9403 CXX="$CXX -Kthread"
9404 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009405 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009406
9407 posix_threads=yes
9408 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009409elif test "$ac_cv_pthread" = "yes"
9410then
9411 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009412 if test "$ac_cv_cxx_thread" = "yes"; then
9413 CXX="$CXX -pthread"
9414 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009415 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009416
9417 posix_threads=yes
9418 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009419else
9420 if test ! -z "$with_threads" -a -d "$with_threads"
9421 then LDFLAGS="$LDFLAGS -L$with_threads"
9422 fi
9423 if test ! -z "$withval" -a -d "$withval"
9424 then LDFLAGS="$LDFLAGS -L$withval"
9425 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009426
9427 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009428 # define _POSIX_THREADS in unistd.h. Some apparently don't
9429 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9431$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009433/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009434
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009435#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009436#ifdef _POSIX_THREADS
9437yes
9438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009439
9440_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009443 unistd_defines_pthreads=yes
9444else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009445 unistd_defines_pthreads=no
9446fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009447rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009448
Matthias Kloseb9621712010-04-24 17:59:49 +00009449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9450$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009451
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009453
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009454 # Just looking for pthread_create in libpthread is not enough:
9455 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9456 # So we really have to include pthread.h, and then link.
9457 _libs=$LIBS
9458 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9460$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009462/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009463
9464#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009465#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009466
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009467void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009468int
9469main ()
9470{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009471
9472pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 ;
9474 return 0;
9475}
9476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009477if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009478
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9480$as_echo "yes" >&6; }
9481 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009482
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009483 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009484 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009485else
Martin v. Löwis11437992002-04-12 09:54:03 +00009486
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009487 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009488 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009489if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009490 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009491
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009492 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009493 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009494else
Guido van Rossumad678af1998-10-02 14:42:15 +00009495
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9497$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009498if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009499 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009500else
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009502LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506/* Override any GCC internal prototype to avoid an error.
9507 Use char because int might match the return type of a GCC
9508 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009509#ifdef __cplusplus
9510extern "C"
9511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009512char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009513int
9514main ()
9515{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009516return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 ;
9518 return 0;
9519}
9520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009521if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009523else
Matthias Kloseb9621712010-04-24 17:59:49 +00009524 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009526rm -f core conftest.err conftest.$ac_objext \
9527 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009528LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9531$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009532if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009533 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009534
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009535 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009536 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009537 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009538else
Greg Steinadf63d62000-07-05 10:38:09 +00009539
Matthias Kloseb9621712010-04-24 17:59:49 +00009540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9541$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009542if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009544else
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009546LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550/* Override any GCC internal prototype to avoid an error.
9551 Use char because int might match the return type of a GCC
9552 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009553#ifdef __cplusplus
9554extern "C"
9555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009556char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009557int
9558main ()
9559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 ;
9562 return 0;
9563}
9564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009565if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009567else
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570rm -f core conftest.err conftest.$ac_objext \
9571 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009572LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9575$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009576if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009577 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009578
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009579 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009580 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009581 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009582else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009583
Matthias Kloseb9621712010-04-24 17:59:49 +00009584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9585$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009586if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009587 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009588else
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009590LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009594/* Override any GCC internal prototype to avoid an error.
9595 Use char because int might match the return type of a GCC
9596 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009597#ifdef __cplusplus
9598extern "C"
9599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009600char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009601int
9602main ()
9603{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009604return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 ;
9606 return 0;
9607}
9608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009609if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009611else
Matthias Kloseb9621712010-04-24 17:59:49 +00009612 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009614rm -f core conftest.err conftest.$ac_objext \
9615 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009616LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9619$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009620if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009621 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009622
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009623 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009624 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009625 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009626else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009627
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9629$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009630if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009631 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009632else
Martin v. Löwis11437992002-04-12 09:54:03 +00009633 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009634LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009638/* Override any GCC internal prototype to avoid an error.
9639 Use char because int might match the return type of a GCC
9640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009641#ifdef __cplusplus
9642extern "C"
9643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009644char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009645int
9646main ()
9647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 ;
9650 return 0;
9651}
9652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009653if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009655else
Matthias Kloseb9621712010-04-24 17:59:49 +00009656 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009658rm -f core conftest.err conftest.$ac_objext \
9659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009660LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9663$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009664if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009665 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009666
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009667 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009668 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009669 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009670else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009671
Martin v. Löwis130fb172001-07-19 11:00:41 +00009672 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009673fi
9674
Guido van Rossum627b2d71993-12-24 10:39:16 +00009675
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009676fi
9677
Guido van Rossum0be3e491997-05-22 20:33:33 +00009678fi
9679
Guido van Rossum49545951997-12-02 19:28:29 +00009680fi
9681
Guido van Rossumb93a8621998-05-07 13:27:32 +00009682fi
9683
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009685rm -f core conftest.err conftest.$ac_objext \
9686 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009687
Matthias Kloseb9621712010-04-24 17:59:49 +00009688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9689$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009690if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009691 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009692else
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009694LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698/* Override any GCC internal prototype to avoid an error.
9699 Use char because int might match the return type of a GCC
9700 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009701#ifdef __cplusplus
9702extern "C"
9703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009704char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009705int
9706main ()
9707{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ;
9710 return 0;
9711}
9712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009713if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009714 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009715else
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009718rm -f core conftest.err conftest.$ac_objext \
9719 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009720LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9723$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009724if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009725 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009726
Martin v. Löwis130fb172001-07-19 11:00:41 +00009727 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009728 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009729 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009730fi
9731
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009732
Neal Norwitza978ab02002-11-02 16:58:05 +00009733 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9735$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009736if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009737 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009738else
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009740LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009744/* Override any GCC internal prototype to avoid an error.
9745 Use char because int might match the return type of a GCC
9746 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009747#ifdef __cplusplus
9748extern "C"
9749#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009750char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009751int
9752main ()
9753{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009754return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 ;
9756 return 0;
9757}
9758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009759if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009761else
Matthias Kloseb9621712010-04-24 17:59:49 +00009762 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009764rm -f core conftest.err conftest.$ac_objext \
9765 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009766LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9769$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009770if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009772
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009773 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009774 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009775 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009776fi
9777
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009778 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009779fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009780
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009781if test "$posix_threads" = "yes"; then
9782 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009783
Matthias Kloseb9621712010-04-24 17:59:49 +00009784$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009785
9786 fi
9787
9788 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9789 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009790 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009791$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009792
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009793 ;;
9794 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009795$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009796
9797 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009798 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009799$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009800
9801 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009802 esac
9803
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9805$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009806 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009808else
Matthias Kloseb9621712010-04-24 17:59:49 +00009809 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009810 ac_cv_pthread_system_supported=no
9811else
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009813/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009814
9815 #include <stdio.h>
9816 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009817 void *foo(void *parm) {
9818 return NULL;
9819 }
9820 main() {
9821 pthread_attr_t attr;
9822 pthread_t id;
9823 if (pthread_attr_init(&attr)) exit(-1);
9824 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9825 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9826 exit(0);
9827 }
9828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009829if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009830 ac_cv_pthread_system_supported=yes
9831else
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009836fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838
Guido van Rossum627b2d71993-12-24 10:39:16 +00009839fi
9840
Matthias Kloseb9621712010-04-24 17:59:49 +00009841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9842$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009843 if test "$ac_cv_pthread_system_supported" = "yes"; then
9844
Matthias Kloseb9621712010-04-24 17:59:49 +00009845$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009846
9847 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 for ac_func in pthread_sigmask
9849do :
9850 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009851if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009852 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009854_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009855 case $ac_sys_system in
9856 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009857
Matthias Kloseb9621712010-04-24 17:59:49 +00009858$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009859
9860 ;;
9861 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009862fi
9863done
9864
Christian Heimesf77b4b22013-08-21 13:26:05 +02009865 for ac_func in pthread_atfork
9866do :
9867 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9868if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9869 cat >>confdefs.h <<_ACEOF
9870#define HAVE_PTHREAD_ATFORK 1
9871_ACEOF
9872
9873fi
9874done
9875
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009876fi
9877
9878
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009879# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009880
Matthias Kloseb9621712010-04-24 17:59:49 +00009881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9882$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009884if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009886 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009889 ipv6=no
9890 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009891 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9892$as_echo "yes" >&6; }
9893 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009894
9895 ipv6=yes
9896 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009897 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009898else
Martin v. Löwis11437992002-04-12 09:54:03 +00009899
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öwisa2ac6022001-08-09 11:40:14 +00009902 /* AF_INET6 available check */
9903#include <sys/types.h>
9904#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009905int
9906main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009907{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009908int domain = AF_INET6;
9909 ;
9910 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009911}
Martin v. Löwis11437992002-04-12 09:54:03 +00009912_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009913if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009914
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9916$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009917 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009919else
Matthias Kloseb159a552010-04-25 21:00:44 +00009920
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009923 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009924
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009925fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009928if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9930$as_echo_n "checking if RFC2553 API is available... " >&6; }
9931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009932/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009933
9934 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009935#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009936int
9937main ()
9938{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009939struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009940 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009941 ;
9942 return 0;
9943}
Matthias Kloseb159a552010-04-25 21:00:44 +00009944
Martin v. Löwis11437992002-04-12 09:54:03 +00009945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009946if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009947
9948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009949$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009950 ipv6=yes
9951
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009952else
Matthias Kloseb159a552010-04-25 21:00:44 +00009953
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009955$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009956 ipv6=no
9957
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009960fi
9961
9962if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009963 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009964
9965fi
9966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967fi
9968
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009969
9970ipv6type=unknown
9971ipv6lib=none
9972ipv6trylibc=no
9973
9974if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9976$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009977 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9978 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009979 case $i in
9980 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009982/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009983
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009984#include <netinet/in.h>
9985#ifdef IPV6_INRIA_VERSION
9986yes
9987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009988_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009991 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009992fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009993rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009994
9995 ;;
9996 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009998/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009999
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010000#include <netinet/in.h>
10001#ifdef __KAME__
10002yes
10003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010004_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010006 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010007 ipv6type=$i;
10008 ipv6lib=inet6
10009 ipv6libdir=/usr/local/v6/lib
10010 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010011fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010012rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010013
10014 ;;
10015 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010017/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010018
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010019#include <features.h>
10020#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10021yes
10022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010023_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010025 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010026 ipv6type=$i;
10027 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010028fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010029rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010030
10031 ;;
10032 linux-inet6)
10033 if test -d /usr/inet6; then
10034 ipv6type=$i
10035 ipv6lib=inet6
10036 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010037 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010038 fi
10039 ;;
10040 solaris)
10041 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010042 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010043 ipv6type=$i
10044 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010045 fi
10046 fi
10047 ;;
10048 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010050/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010051
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010052#include <sys/param.h>
10053#ifdef _TOSHIBA_INET6
10054yes
10055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010056_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010059 ipv6type=$i;
10060 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010061 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010062fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010063rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010064
10065 ;;
10066 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010068/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010069
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010070#include </usr/local/v6/include/sys/v6config.h>
10071#ifdef __V6D__
10072yes
10073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010074_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010076 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010077 ipv6type=$i;
10078 ipv6lib=v6;
10079 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010080 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010081fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010082rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010083
10084 ;;
10085 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010087/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010088
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010089#include <sys/param.h>
10090#ifdef _ZETA_MINAMI_INET6
10091yes
10092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010093_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010096 ipv6type=$i;
10097 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010098 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010099fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010100rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010101
10102 ;;
10103 esac
10104 if test "$ipv6type" != "unknown"; then
10105 break
10106 fi
10107 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10109$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010110fi
10111
10112if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10113 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10114 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10115 echo "using lib$ipv6lib"
10116 else
10117 if test $ipv6trylibc = "yes"; then
10118 echo "using libc"
10119 else
10120 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10121 echo "You need to fetch lib$ipv6lib.a from appropriate"
10122 echo 'ipv6 kit and compile beforehand.'
10123 exit 1
10124 fi
10125 fi
10126fi
10127
Matthias Kloseb9621712010-04-24 17:59:49 +000010128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10129$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010131/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010132
10133 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010134int
10135main ()
10136{
10137FSIORefNum fRef = 0
10138 ;
10139 return 0;
10140}
Matthias Kloseb159a552010-04-25 21:00:44 +000010141
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010143if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010144
Matthias Kloseb159a552010-04-25 21:00:44 +000010145
Matthias Kloseb9621712010-04-24 17:59:49 +000010146$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010147
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10149$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010150
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010151else
Matthias Kloseb159a552010-04-25 21:00:44 +000010152
Matthias Kloseb9621712010-04-24 17:59:49 +000010153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010155
10156fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10158
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010159# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10161$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010163# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010164if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165 withval=$with_doc_strings;
10166fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010167
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010168
10169if test -z "$with_doc_strings"
10170then with_doc_strings="yes"
10171fi
10172if test "$with_doc_strings" != "no"
10173then
10174
Matthias Kloseb9621712010-04-24 17:59:49 +000010175$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010176
10177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10179$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010180
Antoine Pitrou042b1282010-08-13 21:15:58 +000010181# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10183$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010186if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010188if test "$withval" != no
10189then
10190
Matthias Kloseb9621712010-04-24 17:59:49 +000010191$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010192
Matthias Kloseb9621712010-04-24 17:59:49 +000010193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10194$as_echo "yes" >&6; }
10195else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10196$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010197fi
10198else
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10200$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201fi
10202
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010203
10204# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10206$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010209if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010210 withval=$with_pymalloc;
10211fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010212
Neil Schemenauera35c6882001-02-27 04:45:05 +000010213
Neil Schemenauer16c22972002-03-22 15:34:49 +000010214if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010215then
10216 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010217fi
10218if test "$with_pymalloc" != "no"
10219then
Martin v. Löwis11437992002-04-12 09:54:03 +000010220
Matthias Kloseb9621712010-04-24 17:59:49 +000010221$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010222
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010223 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10226$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010227
Benjamin Peterson05159c42009-12-03 03:01:27 +000010228# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10230$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010231
10232# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010233if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010234 withval=$with_valgrind;
10235else
10236 with_valgrind=no
10237fi
10238
Matthias Kloseb9621712010-04-24 17:59:49 +000010239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10240$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010241if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 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 +020010243if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010244
Matthias Kloseb9621712010-04-24 17:59:49 +000010245$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010246
10247else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010248 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010249
10250fi
10251
10252
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010253 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010254fi
10255
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010256# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010257
Guido van Rossum98935bf2001-09-05 19:13:16 +000010258DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010259
Guido van Rossume97ee181999-12-20 21:27:22 +000010260# the dlopen() function means we might want to use dynload_shlib.o. some
10261# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010262for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010263do :
10264 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010265if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010267#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010268_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010269
Guido van Rossume97ee181999-12-20 21:27:22 +000010270fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010271done
Guido van Rossume97ee181999-12-20 21:27:22 +000010272
Michael W. Hudson54241132001-12-07 15:38:26 +000010273
Guido van Rossume97ee181999-12-20 21:27:22 +000010274# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10275# loading of modules.
10276
Matthias Kloseb9621712010-04-24 17:59:49 +000010277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10278$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010279if test -z "$DYNLOADFILE"
10280then
10281 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010282 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10283 if test "$ac_cv_func_dlopen" = yes
10284 then DYNLOADFILE="dynload_shlib.o"
10285 else DYNLOADFILE="dynload_aix.o"
10286 fi
10287 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010288 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010289 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10290 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010291 *)
10292 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10293 # out any dynamic loading
10294 if test "$ac_cv_func_dlopen" = yes
10295 then DYNLOADFILE="dynload_shlib.o"
10296 else DYNLOADFILE="dynload_stub.o"
10297 fi
10298 ;;
10299 esac
10300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10302$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010303if test "$DYNLOADFILE" != "dynload_stub.o"
10304then
Martin v. Löwis11437992002-04-12 09:54:03 +000010305
Matthias Kloseb9621712010-04-24 17:59:49 +000010306$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010307
10308fi
10309
Neil Schemenauer4e425612001-06-19 15:44:15 +000010310# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10311
Michael W. Hudson54241132001-12-07 15:38:26 +000010312
Matthias Kloseb9621712010-04-24 17:59:49 +000010313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10314$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010315if test -z "$MACHDEP_OBJS"
10316then
Jack Jansene578a632001-08-15 01:27:14 +000010317 MACHDEP_OBJS=$extra_machdep_objs
10318else
10319 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010320fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010321if test -z "$MACHDEP_OBJS"; then
10322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10323$as_echo "none" >&6; }
10324else
10325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10326$as_echo "$MACHDEP_OBJS" >&6; }
10327fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010328
Guido van Rossum627b2d71993-12-24 10:39:16 +000010329# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010330for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010331 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010332 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010333 futimens futimes gai_strerror \
10334 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010335 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010336 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010337 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10338 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010339 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010340 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010341 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010342 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010343 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010344 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010345 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10346 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010347 sigaction sigaltstack siginterrupt sigpending sigrelse \
10348 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010349 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010350 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010351 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010352do :
10353 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10354ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010355if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010357#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010358_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010359
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010360fi
10361done
10362
Michael W. Hudson54241132001-12-07 15:38:26 +000010363
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010364ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10365 #include <dirent.h>
10366"
10367if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10368
10369$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10370
10371fi
10372
10373
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010374# For some functions, having a definition is not sufficient, since
10375# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10377$as_echo_n "checking for chroot... " >&6; }
10378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010379/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010380#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010381int
10382main ()
10383{
10384void *x=chroot
10385 ;
10386 return 0;
10387}
10388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010390
Matthias Kloseb9621712010-04-24 17:59:49 +000010391$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010392
Matthias Kloseb159a552010-04-25 21:00:44 +000010393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010394$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010395else
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010398
10399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10402$as_echo_n "checking for link... " >&6; }
10403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010405#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010406int
10407main ()
10408{
10409void *x=link
10410 ;
10411 return 0;
10412}
10413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010415
Matthias Kloseb9621712010-04-24 17:59:49 +000010416$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010417
Matthias Kloseb159a552010-04-25 21:00:44 +000010418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010419$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010420else
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10422$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010423
10424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10427$as_echo_n "checking for symlink... " >&6; }
10428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010429/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010430#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010431int
10432main ()
10433{
10434void *x=symlink
10435 ;
10436 return 0;
10437}
10438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010440
Matthias Kloseb9621712010-04-24 17:59:49 +000010441$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010442
Matthias Kloseb159a552010-04-25 21:00:44 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010444$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010445else
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010448
10449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10452$as_echo_n "checking for fchdir... " >&6; }
10453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010454/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010455#include <unistd.h>
10456int
10457main ()
10458{
10459void *x=fchdir
10460 ;
10461 return 0;
10462}
10463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010465
Matthias Kloseb9621712010-04-24 17:59:49 +000010466$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010467
Matthias Kloseb159a552010-04-25 21:00:44 +000010468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010469$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010470else
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010473
10474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10477$as_echo_n "checking for fsync... " >&6; }
10478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010479/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010480#include <unistd.h>
10481int
10482main ()
10483{
10484void *x=fsync
10485 ;
10486 return 0;
10487}
10488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010490
Matthias Kloseb9621712010-04-24 17:59:49 +000010491$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010492
Matthias Kloseb159a552010-04-25 21:00:44 +000010493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010494$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010495else
Matthias Kloseb9621712010-04-24 17:59:49 +000010496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10497$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010498
10499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10502$as_echo_n "checking for fdatasync... " >&6; }
10503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010504/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010505#include <unistd.h>
10506int
10507main ()
10508{
10509void *x=fdatasync
10510 ;
10511 return 0;
10512}
10513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010515
Matthias Kloseb9621712010-04-24 17:59:49 +000010516$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010517
Matthias Kloseb159a552010-04-25 21:00:44 +000010518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010519$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010520else
Matthias Kloseb9621712010-04-24 17:59:49 +000010521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10522$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010523
10524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10527$as_echo_n "checking for epoll... " >&6; }
10528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010529/* end confdefs.h. */
10530#include <sys/epoll.h>
10531int
10532main ()
10533{
10534void *x=epoll_create
10535 ;
10536 return 0;
10537}
10538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010540
Matthias Kloseb9621712010-04-24 17:59:49 +000010541$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010542
Matthias Kloseb159a552010-04-25 21:00:44 +000010543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010544$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010545else
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10547$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010548
10549fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10552$as_echo_n "checking for epoll_create1... " >&6; }
10553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10554/* end confdefs.h. */
10555#include <sys/epoll.h>
10556int
10557main ()
10558{
10559void *x=epoll_create1
10560 ;
10561 return 0;
10562}
10563_ACEOF
10564if ac_fn_c_try_compile "$LINENO"; then :
10565
10566$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10567
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10569$as_echo "yes" >&6; }
10570else
10571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10572$as_echo "no" >&6; }
10573
10574fi
10575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10577$as_echo_n "checking for kqueue... " >&6; }
10578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010579/* end confdefs.h. */
10580
10581#include <sys/types.h>
10582#include <sys/event.h>
10583
10584int
10585main ()
10586{
10587int x=kqueue()
10588 ;
10589 return 0;
10590}
10591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010592if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010593
Matthias Kloseb9621712010-04-24 17:59:49 +000010594$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010595
Matthias Kloseb159a552010-04-25 21:00:44 +000010596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010597$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010598else
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10600$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010601
10602fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10605$as_echo_n "checking for prlimit... " >&6; }
10606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10607/* end confdefs.h. */
10608
10609#include <sys/time.h>
10610#include <sys/resource.h>
10611
10612int
10613main ()
10614{
10615void *x=prlimit
10616 ;
10617 return 0;
10618}
10619_ACEOF
10620if ac_fn_c_try_compile "$LINENO"; then :
10621
10622$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10623
10624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10625$as_echo "yes" >&6; }
10626else
10627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10628$as_echo "no" >&6; }
10629
10630fi
10631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10632
Martin v. Löwisd5843682002-11-21 20:41:28 +000010633# On some systems (eg. FreeBSD 5), we would find a definition of the
10634# functions ctermid_r, setgroups in the library, but no prototype
10635# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10636# address to avoid compiler warnings and potential miscompilations
10637# because of the missing prototypes.
10638
Matthias Kloseb9621712010-04-24 17:59:49 +000010639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10640$as_echo_n "checking for ctermid_r... " >&6; }
10641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010642/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010643
Martin v. Löwisd5843682002-11-21 20:41:28 +000010644#include <stdio.h>
10645
Martin v. Löwisd5843682002-11-21 20:41:28 +000010646int
10647main ()
10648{
10649void* p = ctermid_r
10650 ;
10651 return 0;
10652}
10653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010654if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010655
Matthias Kloseb9621712010-04-24 17:59:49 +000010656$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010657
Matthias Kloseb159a552010-04-25 21:00:44 +000010658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010659$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010660else
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10662$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010663
10664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10666
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10668$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010669if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010670 $as_echo_n "(cached) " >&6
10671else
10672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010673/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010674#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010675int
10676main ()
10677{
10678void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010679
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010680 ;
10681 return 0;
10682}
10683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010684if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010685 ac_cv_flock_decl=yes
10686else
10687 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010688
10689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010691
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010692fi
10693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10694$as_echo "$ac_cv_flock_decl" >&6; }
10695if test "x${ac_cv_flock_decl}" = xyes; then
10696 for ac_func in flock
10697do :
10698 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010699if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010700 cat >>confdefs.h <<_ACEOF
10701#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010702_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010703
Antoine Pitroua3000072010-09-07 14:52:42 +000010704else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010706$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010707if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010708 $as_echo_n "(cached) " >&6
10709else
10710 ac_check_lib_save_LIBS=$LIBS
10711LIBS="-lbsd $LIBS"
10712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10713/* end confdefs.h. */
10714
10715/* Override any GCC internal prototype to avoid an error.
10716 Use char because int might match the return type of a GCC
10717 builtin and then its argument prototype would still apply. */
10718#ifdef __cplusplus
10719extern "C"
10720#endif
10721char flock ();
10722int
10723main ()
10724{
10725return flock ();
10726 ;
10727 return 0;
10728}
10729_ACEOF
10730if ac_fn_c_try_link "$LINENO"; then :
10731 ac_cv_lib_bsd_flock=yes
10732else
10733 ac_cv_lib_bsd_flock=no
10734fi
10735rm -f core conftest.err conftest.$ac_objext \
10736 conftest$ac_exeext conftest.$ac_ext
10737LIBS=$ac_check_lib_save_LIBS
10738fi
10739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10740$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010741if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010742 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010743
10744
10745$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10746
10747
10748fi
10749
10750
10751fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010752done
10753
Antoine Pitroua3000072010-09-07 14:52:42 +000010754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010755
Matthias Kloseb9621712010-04-24 17:59:49 +000010756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10757$as_echo_n "checking for getpagesize... " >&6; }
10758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010759/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010760
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010761#include <unistd.h>
10762
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010763int
10764main ()
10765{
10766void* p = getpagesize
10767 ;
10768 return 0;
10769}
10770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010771if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010772
Matthias Kloseb9621712010-04-24 17:59:49 +000010773$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010774
Matthias Kloseb159a552010-04-25 21:00:44 +000010775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010776$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010777else
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10779$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010780
10781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010783
Victor Stinner984890f2011-11-24 13:53:38 +010010784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10785$as_echo_n "checking for broken unsetenv... " >&6; }
10786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10787/* end confdefs.h. */
10788
10789#include <stdlib.h>
10790
10791int
10792main ()
10793{
10794int res = unsetenv("DUMMY")
10795 ;
10796 return 0;
10797}
10798_ACEOF
10799if ac_fn_c_try_compile "$LINENO"; then :
10800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10801$as_echo "no" >&6; }
10802else
10803
10804$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10805
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10807$as_echo "yes" >&6; }
10808
10809fi
10810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10811
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010812for ac_prog in true
10813do
10814 # Extract the first word of "$ac_prog", so it can be a program name with args.
10815set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10817$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010818if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010820else
10821 if test -n "$TRUE"; then
10822 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10823else
10824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10825for as_dir in $PATH
10826do
10827 IFS=$as_save_IFS
10828 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010829 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010831 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010832 $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 +000010833 break 2
10834 fi
10835done
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010837IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010838
10839fi
10840fi
10841TRUE=$ac_cv_prog_TRUE
10842if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10844$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010845else
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10847$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010848fi
10849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010850
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010851 test -n "$TRUE" && break
10852done
10853test -n "$TRUE" || TRUE="/bin/true"
10854
10855
Matthias Kloseb9621712010-04-24 17:59:49 +000010856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10857$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010858if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010859 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010860else
10861 ac_check_lib_save_LIBS=$LIBS
10862LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010864/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866/* Override any GCC internal prototype to avoid an error.
10867 Use char because int might match the return type of a GCC
10868 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010869#ifdef __cplusplus
10870extern "C"
10871#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010872char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010873int
10874main ()
10875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010876return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010877 ;
10878 return 0;
10879}
10880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010881if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010882 ac_cv_lib_c_inet_aton=yes
10883else
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010886rm -f core conftest.err conftest.$ac_objext \
10887 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010888LIBS=$ac_check_lib_save_LIBS
10889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10891$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010892if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010893 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010894else
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10896$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010897if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010899else
10900 ac_check_lib_save_LIBS=$LIBS
10901LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905/* Override any GCC internal prototype to avoid an error.
10906 Use char because int might match the return type of a GCC
10907 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010908#ifdef __cplusplus
10909extern "C"
10910#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010911char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010912int
10913main ()
10914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010915return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010916 ;
10917 return 0;
10918}
10919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010920if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010921 ac_cv_lib_resolv_inet_aton=yes
10922else
Matthias Kloseb9621712010-04-24 17:59:49 +000010923 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010925rm -f core conftest.err conftest.$ac_objext \
10926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010927LIBS=$ac_check_lib_save_LIBS
10928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10930$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010931if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010932 cat >>confdefs.h <<_ACEOF
10933#define HAVE_LIBRESOLV 1
10934_ACEOF
10935
10936 LIBS="-lresolv $LIBS"
10937
10938fi
10939
10940
10941fi
10942
10943
Christian Heimesd0764e22007-12-04 15:00:33 +000010944# On Tru64, chflags seems to be present, but calling it will
10945# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10947$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010948if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010950else
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010952 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010953else
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010955/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010956
Christian Heimesd0764e22007-12-04 15:00:33 +000010957#include <sys/stat.h>
10958#include <unistd.h>
10959int main(int argc, char*argv[])
10960{
10961 if(chflags(argv[0], 0) != 0)
10962 return 1;
10963 return 0;
10964}
Ned Deily3eb67d52011-06-28 00:00:28 -070010965
Christian Heimesd0764e22007-12-04 15:00:33 +000010966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010967if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010968 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10973 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010974fi
10975
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010976
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10979$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010980if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010981 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010982if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010983 ac_cv_have_chflags="yes"
10984else
10985 ac_cv_have_chflags="no"
10986fi
10987
10988fi
10989if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010990
Matthias Kloseb9621712010-04-24 17:59:49 +000010991$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010992
10993fi
10994
Matthias Kloseb9621712010-04-24 17:59:49 +000010995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10996$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010997if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010998 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010999else
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011001 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011002else
Matthias Kloseb9621712010-04-24 17:59:49 +000011003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011004/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011005
Christian Heimesd0764e22007-12-04 15:00:33 +000011006#include <sys/stat.h>
11007#include <unistd.h>
11008int main(int argc, char*argv[])
11009{
11010 if(lchflags(argv[0], 0) != 0)
11011 return 1;
11012 return 0;
11013}
Ned Deily3eb67d52011-06-28 00:00:28 -070011014
Christian Heimesd0764e22007-12-04 15:00:33 +000011015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011016if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011017 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011018else
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11022 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011023fi
11024
11025
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11028$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011029if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011031if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011032 ac_cv_have_lchflags="yes"
11033else
11034 ac_cv_have_lchflags="no"
11035fi
11036
11037fi
11038if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011039
Matthias Kloseb9621712010-04-24 17:59:49 +000011040$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011041
11042fi
11043
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011044case $ac_sys_system/$ac_sys_release in
11045Darwin/*)
11046 _CUR_CFLAGS="${CFLAGS}"
11047 _CUR_LDFLAGS="${LDFLAGS}"
11048 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11049 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11050 ;;
11051esac
11052
Matthias Kloseb9621712010-04-24 17:59:49 +000011053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11054$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011055if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011056 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011057else
11058 ac_check_lib_save_LIBS=$LIBS
11059LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011061/* end confdefs.h. */
11062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011063/* Override any GCC internal prototype to avoid an error.
11064 Use char because int might match the return type of a GCC
11065 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011066#ifdef __cplusplus
11067extern "C"
11068#endif
11069char inflateCopy ();
11070int
11071main ()
11072{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011074 ;
11075 return 0;
11076}
11077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011078if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011079 ac_cv_lib_z_inflateCopy=yes
11080else
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011083rm -f core conftest.err conftest.$ac_objext \
11084 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011085LIBS=$ac_check_lib_save_LIBS
11086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11088$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011089if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011090
Matthias Kloseb9621712010-04-24 17:59:49 +000011091$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011092
11093fi
11094
11095
11096case $ac_sys_system/$ac_sys_release in
11097Darwin/*)
11098 CFLAGS="${_CUR_CFLAGS}"
11099 LDFLAGS="${_CUR_LDFLAGS}"
11100 ;;
11101esac
11102
Matthias Kloseb9621712010-04-24 17:59:49 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11104$as_echo_n "checking for hstrerror... " >&6; }
11105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011106/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011107
Martin v. Löwise9416172003-05-03 10:12:45 +000011108#include <netdb.h>
11109
Martin v. Löwise9416172003-05-03 10:12:45 +000011110int
11111main ()
11112{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011113void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011114 ;
11115 return 0;
11116}
11117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011118if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011119
Matthias Kloseb9621712010-04-24 17:59:49 +000011120$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011121
Matthias Kloseb159a552010-04-25 21:00:44 +000011122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011123$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011124else
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11126$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011127
11128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011129rm -f core conftest.err conftest.$ac_objext \
11130 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011131
Matthias Kloseb9621712010-04-24 17:59:49 +000011132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11133$as_echo_n "checking for inet_aton... " >&6; }
11134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011135/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011136
Martin v. Löwis86d66262006-02-17 08:40:11 +000011137#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011138#include <sys/socket.h>
11139#include <netinet/in.h>
11140#include <arpa/inet.h>
11141
Martin v. Löwise9416172003-05-03 10:12:45 +000011142int
11143main ()
11144{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011145void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011146 ;
11147 return 0;
11148}
11149_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011150if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011151
Matthias Kloseb9621712010-04-24 17:59:49 +000011152$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011153
Matthias Kloseb159a552010-04-25 21:00:44 +000011154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011155$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011156else
Matthias Kloseb9621712010-04-24 17:59:49 +000011157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11158$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011159
11160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011161rm -f core conftest.err conftest.$ac_objext \
11162 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011163
Matthias Kloseb9621712010-04-24 17:59:49 +000011164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11165$as_echo_n "checking for inet_pton... " >&6; }
11166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011167/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011168
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011169#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011170#include <sys/socket.h>
11171#include <netinet/in.h>
11172#include <arpa/inet.h>
11173
Martin v. Löwise9416172003-05-03 10:12:45 +000011174int
11175main ()
11176{
11177void* p = inet_pton
11178 ;
11179 return 0;
11180}
11181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011183
Matthias Kloseb9621712010-04-24 17:59:49 +000011184$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011185
Matthias Kloseb159a552010-04-25 21:00:44 +000011186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011187$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011188else
Matthias Kloseb9621712010-04-24 17:59:49 +000011189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11190$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011191
11192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011194
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011195# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11197$as_echo_n "checking for setgroups... " >&6; }
11198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011199/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011200
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011201#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011202#ifdef HAVE_GRP_H
11203#include <grp.h>
11204#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011205
Martin v. Löwisd5843682002-11-21 20:41:28 +000011206int
11207main ()
11208{
11209void* p = setgroups
11210 ;
11211 return 0;
11212}
11213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011214if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011215
Matthias Kloseb9621712010-04-24 17:59:49 +000011216$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011217
Matthias Kloseb159a552010-04-25 21:00:44 +000011218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011219$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011220else
Matthias Kloseb9621712010-04-24 17:59:49 +000011221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11222$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011223
11224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011226
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011227# check for openpty and forkpty
11228
11229for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011230do :
11231 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011232if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011234#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011235_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011236
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011237else
Matthias Kloseb9621712010-04-24 17:59:49 +000011238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11239$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011240if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011242else
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011244LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011248/* Override any GCC internal prototype to avoid an error.
11249 Use char because int might match the return type of a GCC
11250 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011251#ifdef __cplusplus
11252extern "C"
11253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011254char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011255int
11256main ()
11257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011258return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 ;
11260 return 0;
11261}
11262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011263if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011264 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011265else
Matthias Kloseb9621712010-04-24 17:59:49 +000011266 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011268rm -f core conftest.err conftest.$ac_objext \
11269 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011270LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11273$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011274if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011275 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011276 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011277else
Matthias Kloseb9621712010-04-24 17:59:49 +000011278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11279$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011280if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011282else
11283 ac_check_lib_save_LIBS=$LIBS
11284LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011286/* end confdefs.h. */
11287
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011288/* Override any GCC internal prototype to avoid an error.
11289 Use char because int might match the return type of a GCC
11290 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011291#ifdef __cplusplus
11292extern "C"
11293#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011294char openpty ();
11295int
11296main ()
11297{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011298return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011304 ac_cv_lib_bsd_openpty=yes
11305else
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011308rm -f core conftest.err conftest.$ac_objext \
11309 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011310LIBS=$ac_check_lib_save_LIBS
11311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11313$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011314if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011316 LIBS="$LIBS -lbsd"
11317fi
11318
11319
11320fi
11321
Fred Drake8cef4cf2000-06-28 16:40:38 +000011322
11323fi
11324done
11325
11326for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011327do :
11328 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011329if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011330 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011331#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011332_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011333
Fred Drake8cef4cf2000-06-28 16:40:38 +000011334else
Matthias Kloseb9621712010-04-24 17:59:49 +000011335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11336$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011337if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011338 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011339else
Martin v. Löwis11437992002-04-12 09:54:03 +000011340 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011341LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011345/* Override any GCC internal prototype to avoid an error.
11346 Use char because int might match the return type of a GCC
11347 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011348#ifdef __cplusplus
11349extern "C"
11350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011351char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011352int
11353main ()
11354{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 ;
11357 return 0;
11358}
11359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011360if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011362else
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011365rm -f core conftest.err conftest.$ac_objext \
11366 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011367LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11370$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011371if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011373 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011374else
Matthias Kloseb9621712010-04-24 17:59:49 +000011375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11376$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011377if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011379else
11380 ac_check_lib_save_LIBS=$LIBS
11381LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011383/* end confdefs.h. */
11384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385/* Override any GCC internal prototype to avoid an error.
11386 Use char because int might match the return type of a GCC
11387 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011388#ifdef __cplusplus
11389extern "C"
11390#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011391char forkpty ();
11392int
11393main ()
11394{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011396 ;
11397 return 0;
11398}
11399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011400if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011401 ac_cv_lib_bsd_forkpty=yes
11402else
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011405rm -f core conftest.err conftest.$ac_objext \
11406 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011407LIBS=$ac_check_lib_save_LIBS
11408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11410$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011411if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011412 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011413 LIBS="$LIBS -lbsd"
11414fi
11415
11416
11417fi
11418
Fred Drake8cef4cf2000-06-28 16:40:38 +000011419
11420fi
11421done
11422
Jack Jansendd19cf82001-12-06 22:36:17 +000011423
Christian Heimesb186d002008-03-18 15:15:01 +000011424# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011425for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011426do :
11427 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011428if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011429 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011430#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011431_ACEOF
11432
11433fi
11434done
11435
11436
Michael W. Hudson54241132001-12-07 15:38:26 +000011437# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011438for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011439do :
11440 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11441ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011442if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011444#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011445_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011446
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011447fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011448done
11449
Michael W. Hudson54241132001-12-07 15:38:26 +000011450
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011451ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011452if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011453 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011454
Martin v. Löwis1142de32002-03-29 16:28:31 +000011455else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011457 *" dup2.$ac_objext "* ) ;;
11458 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011459 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011460esac
11461
Martin v. Löwis1142de32002-03-29 16:28:31 +000011462fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011463
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011464ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011465if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011466 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11467
11468else
11469 case " $LIBOBJS " in
11470 *" strdup.$ac_objext "* ) ;;
11471 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11472 ;;
11473esac
11474
11475fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011476
11477
11478for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011479do :
11480 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011481if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011482 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011483#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011486/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011487#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011488int
11489main ()
11490{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011491getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011492 ;
11493 return 0;
11494}
11495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011496if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011497
Matthias Kloseb9621712010-04-24 17:59:49 +000011498$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011499
Guido van Rossum627b2d71993-12-24 10:39:16 +000011500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011502
Guido van Rossum627b2d71993-12-24 10:39:16 +000011503fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011504done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011505
Jack Jansen150753c2003-03-29 22:07:47 +000011506for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011507do :
11508 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011509if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011510 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011511#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011514/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011515#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011516int
11517main ()
11518{
11519setpgrp(0,0);
11520 ;
11521 return 0;
11522}
11523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011525
Matthias Kloseb9621712010-04-24 17:59:49 +000011526$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011527
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011530
11531fi
11532done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011533
Thomas Wouters3a584202000-08-05 23:28:51 +000011534for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011535do :
11536 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011537if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011538 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011539#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011542/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011543#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011544int
11545main ()
11546{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011547gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 ;
11549 return 0;
11550}
11551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011552if ac_fn_c_try_compile "$LINENO"; then :
11553
Guido van Rossum627b2d71993-12-24 10:39:16 +000011554else
Skip Montanaro6dead952003-09-25 14:50:04 +000011555
Matthias Kloseb9621712010-04-24 17:59:49 +000011556$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011557
Martin v. Löwis11437992002-04-12 09:54:03 +000011558
Guido van Rossum627b2d71993-12-24 10:39:16 +000011559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011561
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011562fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011563done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011564
Michael W. Hudson54241132001-12-07 15:38:26 +000011565
Victor Stinnere0be4232011-10-25 13:06:09 +020011566for ac_func in clock_gettime
11567do :
11568 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11569if test "x$ac_cv_func_clock_gettime" = xyes; then :
11570 cat >>confdefs.h <<_ACEOF
11571#define HAVE_CLOCK_GETTIME 1
11572_ACEOF
11573
11574else
11575
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11577$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11578if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11579 $as_echo_n "(cached) " >&6
11580else
11581 ac_check_lib_save_LIBS=$LIBS
11582LIBS="-lrt $LIBS"
11583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11584/* end confdefs.h. */
11585
11586/* Override any GCC internal prototype to avoid an error.
11587 Use char because int might match the return type of a GCC
11588 builtin and then its argument prototype would still apply. */
11589#ifdef __cplusplus
11590extern "C"
11591#endif
11592char clock_gettime ();
11593int
11594main ()
11595{
11596return clock_gettime ();
11597 ;
11598 return 0;
11599}
11600_ACEOF
11601if ac_fn_c_try_link "$LINENO"; then :
11602 ac_cv_lib_rt_clock_gettime=yes
11603else
11604 ac_cv_lib_rt_clock_gettime=no
11605fi
11606rm -f core conftest.err conftest.$ac_objext \
11607 conftest$ac_exeext conftest.$ac_ext
11608LIBS=$ac_check_lib_save_LIBS
11609fi
11610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11611$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11612if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11613
11614 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11615
11616
11617$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11618
11619
11620fi
11621
11622
11623fi
11624done
11625
11626
11627for ac_func in clock_getres
11628do :
11629 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11630if test "x$ac_cv_func_clock_getres" = xyes; then :
11631 cat >>confdefs.h <<_ACEOF
11632#define HAVE_CLOCK_GETRES 1
11633_ACEOF
11634
11635else
11636
11637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11638$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11639if ${ac_cv_lib_rt_clock_getres+:} false; then :
11640 $as_echo_n "(cached) " >&6
11641else
11642 ac_check_lib_save_LIBS=$LIBS
11643LIBS="-lrt $LIBS"
11644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11645/* end confdefs.h. */
11646
11647/* Override any GCC internal prototype to avoid an error.
11648 Use char because int might match the return type of a GCC
11649 builtin and then its argument prototype would still apply. */
11650#ifdef __cplusplus
11651extern "C"
11652#endif
11653char clock_getres ();
11654int
11655main ()
11656{
11657return clock_getres ();
11658 ;
11659 return 0;
11660}
11661_ACEOF
11662if ac_fn_c_try_link "$LINENO"; then :
11663 ac_cv_lib_rt_clock_getres=yes
11664else
11665 ac_cv_lib_rt_clock_getres=no
11666fi
11667rm -f core conftest.err conftest.$ac_objext \
11668 conftest$ac_exeext conftest.$ac_ext
11669LIBS=$ac_check_lib_save_LIBS
11670fi
11671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11672$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11673if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11674
11675 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11676
11677
11678fi
11679
11680
11681fi
11682done
11683
11684
Matthias Kloseb9621712010-04-24 17:59:49 +000011685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11686$as_echo_n "checking for major... " >&6; }
11687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011688/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011689
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011690#if defined(MAJOR_IN_MKDEV)
11691#include <sys/mkdev.h>
11692#elif defined(MAJOR_IN_SYSMACROS)
11693#include <sys/sysmacros.h>
11694#else
11695#include <sys/types.h>
11696#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011697
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011698int
11699main ()
11700{
11701
11702 makedev(major(0),minor(0));
11703
11704 ;
11705 return 0;
11706}
11707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011708if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011709
11710
Matthias Kloseb9621712010-04-24 17:59:49 +000011711$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011712
Matthias Kloseb9621712010-04-24 17:59:49 +000011713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11714$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011715
11716else
Skip Montanaro6dead952003-09-25 14:50:04 +000011717
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11719$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011720
11721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011722rm -f core conftest.err conftest.$ac_objext \
11723 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011724
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011725# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011726# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11728$as_echo_n "checking for getaddrinfo... " >&6; }
11729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011730/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011731
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011732#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011733#include <sys/socket.h>
11734#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011735#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011736
Martin v. Löwis11437992002-04-12 09:54:03 +000011737int
11738main ()
11739{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011740getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011741 ;
11742 return 0;
11743}
11744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011745if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011746 have_getaddrinfo=yes
11747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011750rm -f core conftest.err conftest.$ac_objext \
11751 conftest$ac_exeext conftest.$ac_ext
11752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11753$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011754if test $have_getaddrinfo = yes
11755then
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11757$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011758 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011760else
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011762
11763if test "${enable_ipv6+set}" = set; then
11764 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11765else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011766 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011767fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011768else
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011770/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011771
Stefan Krah19c21392012-11-22 23:47:32 +010011772#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011773#include <sys/types.h>
11774#include <netdb.h>
11775#include <string.h>
11776#include <sys/socket.h>
11777#include <netinet/in.h>
11778
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011779int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011780{
11781 int passive, gaierr, inet4 = 0, inet6 = 0;
11782 struct addrinfo hints, *ai, *aitop;
11783 char straddr[INET6_ADDRSTRLEN], strport[16];
11784
11785 for (passive = 0; passive <= 1; passive++) {
11786 memset(&hints, 0, sizeof(hints));
11787 hints.ai_family = AF_UNSPEC;
11788 hints.ai_flags = passive ? AI_PASSIVE : 0;
11789 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011790 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011791 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11792 (void)gai_strerror(gaierr);
11793 goto bad;
11794 }
11795 for (ai = aitop; ai; ai = ai->ai_next) {
11796 if (ai->ai_addr == NULL ||
11797 ai->ai_addrlen == 0 ||
11798 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11799 straddr, sizeof(straddr), strport, sizeof(strport),
11800 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11801 goto bad;
11802 }
11803 switch (ai->ai_family) {
11804 case AF_INET:
11805 if (strcmp(strport, "54321") != 0) {
11806 goto bad;
11807 }
11808 if (passive) {
11809 if (strcmp(straddr, "0.0.0.0") != 0) {
11810 goto bad;
11811 }
11812 } else {
11813 if (strcmp(straddr, "127.0.0.1") != 0) {
11814 goto bad;
11815 }
11816 }
11817 inet4++;
11818 break;
11819 case AF_INET6:
11820 if (strcmp(strport, "54321") != 0) {
11821 goto bad;
11822 }
11823 if (passive) {
11824 if (strcmp(straddr, "::") != 0) {
11825 goto bad;
11826 }
11827 } else {
11828 if (strcmp(straddr, "::1") != 0) {
11829 goto bad;
11830 }
11831 }
11832 inet6++;
11833 break;
11834 case AF_UNSPEC:
11835 goto bad;
11836 break;
11837 default:
11838 /* another family support? */
11839 break;
11840 }
11841 }
11842 }
11843
11844 if (!(inet4 == 0 || inet4 == 2))
11845 goto bad;
11846 if (!(inet6 == 0 || inet6 == 2))
11847 goto bad;
11848
11849 if (aitop)
11850 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011851 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011852
11853 bad:
11854 if (aitop)
11855 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011856 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011857}
11858
Martin v. Löwis11437992002-04-12 09:54:03 +000011859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011860if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011861 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011862else
Matthias Kloseb9621712010-04-24 17:59:49 +000011863 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11866 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011868
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011869fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011870
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011871fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011872
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11874$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11875
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011876if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011877then
11878 if test $ipv6 = yes
11879 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011880 echo 'Fatal: You must get working getaddrinfo() function.'
11881 echo ' or you can specify "--disable-ipv6"'.
11882 exit 1
11883 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011884else
Martin v. Löwis11437992002-04-12 09:54:03 +000011885
Matthias Kloseb9621712010-04-24 17:59:49 +000011886$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011887
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011888fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011889
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011890for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011891do :
11892 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011893if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011894 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011895#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011896_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011897
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011898fi
11899done
11900
Michael W. Hudson54241132001-12-07 15:38:26 +000011901
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011902# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11904$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011905if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011906 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011907else
Matthias Kloseb9621712010-04-24 17:59:49 +000011908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011909/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011910#include <sys/types.h>
11911#include <sys/time.h>
11912#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011913
Martin v. Löwis11437992002-04-12 09:54:03 +000011914int
11915main ()
11916{
11917if ((struct tm *) 0)
11918return 0;
11919 ;
11920 return 0;
11921}
11922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011923if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011924 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011925else
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11931$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011932if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011933
Matthias Kloseb9621712010-04-24 17:59:49 +000011934$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011935
11936fi
11937
Matthias Kloseb9621712010-04-24 17:59:49 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11939$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011940if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011942else
Matthias Kloseb9621712010-04-24 17:59:49 +000011943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011944/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011945#include <sys/types.h>
11946#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011947
Martin v. Löwis11437992002-04-12 09:54:03 +000011948int
11949main ()
11950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011951struct tm tm;
11952 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011953 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011954 ;
11955 return 0;
11956}
11957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011958if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011959 ac_cv_struct_tm=time.h
11960else
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11966$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011967if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011970
11971fi
11972
Matthias Kloseb9621712010-04-24 17:59:49 +000011973ac_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 +000011974#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011975
Matthias Kloseb9621712010-04-24 17:59:49 +000011976"
Victor Stinnere0be4232011-10-25 13:06:09 +020011977if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011978
11979cat >>confdefs.h <<_ACEOF
11980#define HAVE_STRUCT_TM_TM_ZONE 1
11981_ACEOF
11982
11983
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011984fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011985
Martin v. Löwis11437992002-04-12 09:54:03 +000011986if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11987
Matthias Kloseb9621712010-04-24 17:59:49 +000011988$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011989
11990else
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11992"
Victor Stinnere0be4232011-10-25 13:06:09 +020011993if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011994 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011995else
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011997fi
11998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011999cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012000#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012001_ACEOF
12002
Matthias Kloseb9621712010-04-24 17:59:49 +000012003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12004$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012005if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012007else
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012009/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012010#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012011#if !HAVE_DECL_TZNAME
12012extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012014
Martin v. Löwis11437992002-04-12 09:54:03 +000012015int
12016main ()
12017{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012018return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012019 ;
12020 return 0;
12021}
12022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012023if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012024 ac_cv_var_tzname=yes
12025else
Matthias Kloseb9621712010-04-24 17:59:49 +000012026 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012028rm -f core conftest.err conftest.$ac_objext \
12029 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12032$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012033 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012034
Matthias Kloseb9621712010-04-24 17:59:49 +000012035$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012036
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012037 fi
12038fi
12039
Matthias Kloseb9621712010-04-24 17:59:49 +000012040ac_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 +020012041if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012042
12043cat >>confdefs.h <<_ACEOF
12044#define HAVE_STRUCT_STAT_ST_RDEV 1
12045_ACEOF
12046
12047
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012048fi
12049
Matthias Kloseb9621712010-04-24 17:59:49 +000012050ac_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 +020012051if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012052
Martin v. Löwis11437992002-04-12 09:54:03 +000012053cat >>confdefs.h <<_ACEOF
12054#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12055_ACEOF
12056
12057
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012058fi
12059
Matthias Kloseb9621712010-04-24 17:59:49 +000012060ac_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 +020012061if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012062
12063cat >>confdefs.h <<_ACEOF
12064#define HAVE_STRUCT_STAT_ST_FLAGS 1
12065_ACEOF
12066
12067
12068fi
12069
Matthias Kloseb9621712010-04-24 17:59:49 +000012070ac_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 +020012071if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012072
12073cat >>confdefs.h <<_ACEOF
12074#define HAVE_STRUCT_STAT_ST_GEN 1
12075_ACEOF
12076
12077
12078fi
12079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080ac_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 +020012081if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012082
12083cat >>confdefs.h <<_ACEOF
12084#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12085_ACEOF
12086
12087
12088fi
12089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090ac_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 +020012091if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012092
Martin v. Löwis11437992002-04-12 09:54:03 +000012093cat >>confdefs.h <<_ACEOF
12094#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12095_ACEOF
12096
12097
Matthias Kloseb9621712010-04-24 17:59:49 +000012098$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012099
12100else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012101 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012102 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012103 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12104 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012105esac
12106
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012107fi
12108
Michael W. Hudson54241132001-12-07 15:38:26 +000012109
Martin v. Löwis11437992002-04-12 09:54:03 +000012110
Matthias Kloseb9621712010-04-24 17:59:49 +000012111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12112$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012113if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012114 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012115else
Matthias Kloseb159a552010-04-25 21:00:44 +000012116
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012118/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012119#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012120int
12121main ()
12122{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012123return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012124 ;
12125 return 0;
12126}
12127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012128if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012129 ac_cv_header_time_altzone=yes
12130else
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135fi
12136
Matthias Kloseb9621712010-04-24 17:59:49 +000012137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12138$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012139if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012140
Matthias Kloseb9621712010-04-24 17:59:49 +000012141$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012142
12143fi
12144
Guido van Rossumda88dad1995-01-26 00:46:29 +000012145was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12147$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012149/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012150
12151#include <sys/types.h>
12152#include <sys/select.h>
12153#include <sys/time.h>
12154
Martin v. Löwis11437992002-04-12 09:54:03 +000012155int
12156main ()
12157{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012158;
Martin v. Löwis11437992002-04-12 09:54:03 +000012159 ;
12160 return 0;
12161}
12162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012163if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012164
12165
Matthias Kloseb9621712010-04-24 17:59:49 +000012166$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012167
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012168 was_it_defined=yes
12169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012170fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12173$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012174
Matthias Kloseb9621712010-04-24 17:59:49 +000012175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12176$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012177if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012179else
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012181/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012182#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012183int
12184main ()
12185{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012186struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 ;
12188 return 0;
12189}
12190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012191if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012192 ac_cv_struct_addrinfo=yes
12193else
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12197fi
12198
Matthias Kloseb9621712010-04-24 17:59:49 +000012199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12200$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012201if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012202
Matthias Kloseb9621712010-04-24 17:59:49 +000012203$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012204
12205fi
12206
Matthias Kloseb9621712010-04-24 17:59:49 +000012207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12208$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012209if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012211else
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012213/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012214
12215# include <sys/types.h>
12216# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012217int
12218main ()
12219{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012220struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012221 ;
12222 return 0;
12223}
12224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012225if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012226 ac_cv_struct_sockaddr_storage=yes
12227else
Matthias Kloseb9621712010-04-24 17:59:49 +000012228 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12231fi
12232
Matthias Kloseb9621712010-04-24 17:59:49 +000012233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12234$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012235if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012236
Matthias Kloseb9621712010-04-24 17:59:49 +000012237$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012238
12239fi
12240
Guido van Rossum627b2d71993-12-24 10:39:16 +000012241# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012242
Matthias Kloseb9621712010-04-24 17:59:49 +000012243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12244$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012245if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012246 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012247else
Matthias Kloseb9621712010-04-24 17:59:49 +000012248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012250$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012251int
12252main ()
12253{
12254static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012255test_array [0] = 0;
12256return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
12258 ;
12259 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012260}
Martin v. Löwis11437992002-04-12 09:54:03 +000012261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012262if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012263 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012264else
Matthias Kloseb9621712010-04-24 17:59:49 +000012265 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12270$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012271if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012272 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012273
12274fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012275
Matthias Kloseb9621712010-04-24 17:59:49 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12277$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012280else
Matthias Kloseb9621712010-04-24 17:59:49 +000012281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012282/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012283
Martin v. Löwis11437992002-04-12 09:54:03 +000012284int
12285main ()
12286{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012287
Martin v. Löwis11437992002-04-12 09:54:03 +000012288#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012289 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012290 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012291 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012292 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012293 char const *const *pcpcc;
12294 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012295 /* NEC SVR4.0.2 mips cc rejects this. */
12296 struct point {int x, y;};
12297 static struct point const zero = {0,0};
12298 /* AIX XL C 1.02.0.0 rejects this.
12299 It does not let you subtract one const X* pointer from another in
12300 an arm of an if-expression whose if-part is not a constant
12301 expression */
12302 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012304 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305 ++pcpcc;
12306 ppc = (char**) pcpcc;
12307 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012308 { /* SCO 3.2v4 cc rejects this sort of thing. */
12309 char tx;
12310 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012311 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012312
Martin v. Löwis11437992002-04-12 09:54:03 +000012313 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012314 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012315 }
12316 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12317 int x[] = {25, 17};
12318 const int *foo = &x[0];
12319 ++foo;
12320 }
12321 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12322 typedef const int *iptr;
12323 iptr p = 0;
12324 ++p;
12325 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012326 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012327 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012328 struct s { int j; const int *ap[3]; } bx;
12329 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012330 }
12331 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12332 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012334 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012336#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012337
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 ;
12339 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012340}
Martin v. Löwis11437992002-04-12 09:54:03 +000012341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012342if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012343 ac_cv_c_const=yes
12344else
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012348fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12350$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012351if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012352
Matthias Kloseb9621712010-04-24 17:59:49 +000012353$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012354
12355fi
12356
Michael W. Hudson54241132001-12-07 15:38:26 +000012357
Guido van Rossumda88dad1995-01-26 00:46:29 +000012358works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12360$as_echo_n "checking for working volatile... " >&6; }
12361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012362/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012363
Martin v. Löwis11437992002-04-12 09:54:03 +000012364int
12365main ()
12366{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012367volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012368 ;
12369 return 0;
12370}
12371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012372if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012373 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012374else
Skip Montanaro6dead952003-09-25 14:50:04 +000012375
Matthias Kloseb9621712010-04-24 17:59:49 +000012376$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012377
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012378
Guido van Rossum627b2d71993-12-24 10:39:16 +000012379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12382$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012383
Guido van Rossumda88dad1995-01-26 00:46:29 +000012384works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12386$as_echo_n "checking for working signed char... " >&6; }
12387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012388/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012389
Martin v. Löwis11437992002-04-12 09:54:03 +000012390int
12391main ()
12392{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012393signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012394 ;
12395 return 0;
12396}
12397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012398if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012399 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012400else
Skip Montanaro6dead952003-09-25 14:50:04 +000012401
Matthias Kloseb9621712010-04-24 17:59:49 +000012402$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012403
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012404
Guido van Rossum7f43da71994-08-01 12:15:30 +000012405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12408$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012409
Guido van Rossumda88dad1995-01-26 00:46:29 +000012410have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12412$as_echo_n "checking for prototypes... " >&6; }
12413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012414/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012415int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012416int
12417main ()
12418{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012419return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012420 ;
12421 return 0;
12422}
12423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Matthias Kloseb9621712010-04-24 17:59:49 +000012426$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012427
Matthias Kloseb159a552010-04-25 21:00:44 +000012428 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12432$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012433
Guido van Rossumda88dad1995-01-26 00:46:29 +000012434works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12436$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012438/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012439
12440#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012441int foo(int x, ...) {
12442 va_list va;
12443 va_start(va, x);
12444 va_arg(va, int);
12445 va_arg(va, char *);
12446 va_arg(va, double);
12447 return 0;
12448}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012449
Martin v. Löwis11437992002-04-12 09:54:03 +000012450int
12451main ()
12452{
Guido van Rossum90eea071996-08-30 20:58:57 +000012453return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012454 ;
12455 return 0;
12456}
12457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012458if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012459
12460
Matthias Kloseb9621712010-04-24 17:59:49 +000012461$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012462
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012463 works=yes
12464
Guido van Rossum627b2d71993-12-24 10:39:16 +000012465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12468$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012469
Martin v. Löwisd6320502004-08-12 13:45:08 +000012470# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12472$as_echo_n "checking for socketpair... " >&6; }
12473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012474/* end confdefs.h. */
12475
12476#include <sys/types.h>
12477#include <sys/socket.h>
12478
12479int
12480main ()
12481{
12482void *x=socketpair
12483 ;
12484 return 0;
12485}
12486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012488
Matthias Kloseb9621712010-04-24 17:59:49 +000012489$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012490
Matthias Kloseb159a552010-04-25 21:00:44 +000012491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012492$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012493else
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12495$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012496
12497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012499
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012500# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12502$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012504/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012505#include <sys/types.h>
12506#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012507int
12508main ()
12509{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012510struct sockaddr x;
12511x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012512 ;
12513 return 0;
12514}
12515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012516if ac_fn_c_try_compile "$LINENO"; then :
12517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12518$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
Matthias Kloseb9621712010-04-24 17:59:49 +000012520$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012521
12522else
Matthias Kloseb9621712010-04-24 17:59:49 +000012523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12524$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012525
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012528
Guido van Rossumda88dad1995-01-26 00:46:29 +000012529va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12531$as_echo_n "checking whether va_list is an array... " >&6; }
12532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012533/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012534
12535#ifdef HAVE_STDARG_PROTOTYPES
12536#include <stdarg.h>
12537#else
12538#include <varargs.h>
12539#endif
12540
Martin v. Löwis11437992002-04-12 09:54:03 +000012541int
12542main ()
12543{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012544va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 ;
12546 return 0;
12547}
12548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012549if ac_fn_c_try_compile "$LINENO"; then :
12550
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012551else
Skip Montanaro6dead952003-09-25 14:50:04 +000012552
Martin v. Löwis11437992002-04-12 09:54:03 +000012553
Matthias Kloseb9621712010-04-24 17:59:49 +000012554$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
Guido van Rossumda88dad1995-01-26 00:46:29 +000012556 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012557
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12561$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012562
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012563# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012564
12565
Matthias Kloseb9621712010-04-24 17:59:49 +000012566ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012567if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012568
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012570
Matthias Kloseb9621712010-04-24 17:59:49 +000012571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12572$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012573 OLD_CFLAGS=$CFLAGS
12574 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012576/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012577
12578# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012579
Martin v. Löwis11437992002-04-12 09:54:03 +000012580int
12581main ()
12582{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012583
12584 char *name;
12585 struct hostent *he, *res;
12586 char buffer[2048];
12587 int buflen = 2048;
12588 int h_errnop;
12589
12590 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012591
12592 ;
12593 return 0;
12594}
12595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012597
Matthias Kloseb9621712010-04-24 17:59:49 +000012598 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012599
Martin v. Löwis11437992002-04-12 09:54:03 +000012600
Matthias Kloseb9621712010-04-24 17:59:49 +000012601$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012602
Matthias Kloseb9621712010-04-24 17:59:49 +000012603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12604$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012605
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012606else
Skip Montanaro6dead952003-09-25 14:50:04 +000012607
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12609$as_echo "no" >&6; }
12610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12611$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012613/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012614
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012615# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012616
Martin v. Löwis11437992002-04-12 09:54:03 +000012617int
12618main ()
12619{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012620
12621 char *name;
12622 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012623 char buffer[2048];
12624 int buflen = 2048;
12625 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012626
Matthias Kloseb159a552010-04-25 21:00:44 +000012627 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012628
12629 ;
12630 return 0;
12631}
12632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012633if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012634
Matthias Kloseb9621712010-04-24 17:59:49 +000012635 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012636
Martin v. Löwis11437992002-04-12 09:54:03 +000012637
Matthias Kloseb159a552010-04-25 21:00:44 +000012638$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012639
Matthias Kloseb9621712010-04-24 17:59:49 +000012640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12641$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012642
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012643else
Skip Montanaro6dead952003-09-25 14:50:04 +000012644
Matthias Kloseb9621712010-04-24 17:59:49 +000012645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12646$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12648$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12650/* end confdefs.h. */
12651
12652# include <netdb.h>
12653
12654int
12655main ()
12656{
12657
12658 char *name;
12659 struct hostent *he;
12660 struct hostent_data data;
12661
12662 (void) gethostbyname_r(name, he, &data);
12663
12664 ;
12665 return 0;
12666}
12667_ACEOF
12668if ac_fn_c_try_compile "$LINENO"; then :
12669
12670 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12671
12672
12673$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12674
12675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12676$as_echo "yes" >&6; }
12677
12678else
12679
12680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12681$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012682
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012685
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012688
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012691 CFLAGS=$OLD_CFLAGS
12692
12693else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012694
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 for ac_func in gethostbyname
12696do :
12697 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012698if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012701_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012702
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012703fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012704done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012705
Michael W. Hudson54241132001-12-07 15:38:26 +000012706
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012707fi
12708
Michael W. Hudson54241132001-12-07 15:38:26 +000012709
12710
12711
12712
12713
12714
Guido van Rossum627b2d71993-12-24 10:39:16 +000012715# checks for system services
12716# (none yet)
12717
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012719ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012720if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012721
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012722else
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12724$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012725if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012727else
Martin v. Löwis11437992002-04-12 09:54:03 +000012728 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012729LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012731/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733/* Override any GCC internal prototype to avoid an error.
12734 Use char because int might match the return type of a GCC
12735 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012736#ifdef __cplusplus
12737extern "C"
12738#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012739char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012740int
12741main ()
12742{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012744 ;
12745 return 0;
12746}
12747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012748if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012749 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012750else
Matthias Kloseb9621712010-04-24 17:59:49 +000012751 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012753rm -f core conftest.err conftest.$ac_objext \
12754 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012755LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12758$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012759if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012760 cat >>confdefs.h <<_ACEOF
12761#define HAVE_LIBIEEE 1
12762_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012763
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012764 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012765
Guido van Rossum627b2d71993-12-24 10:39:16 +000012766fi
12767
Michael W. Hudson54241132001-12-07 15:38:26 +000012768
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012769fi
12770
Michael W. Hudson54241132001-12-07 15:38:26 +000012771
Guido van Rossum7f253911997-05-09 02:42:48 +000012772# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12774$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012777if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012779if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012780then
12781
Matthias Kloseb9621712010-04-24 17:59:49 +000012782$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012783
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12785$as_echo "yes" >&6; }
12786else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12787$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012788fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012789else
Matthias Kloseb9621712010-04-24 17:59:49 +000012790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12791$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792fi
12793
Guido van Rossum7f253911997-05-09 02:42:48 +000012794
Guido van Rossum7f43da71994-08-01 12:15:30 +000012795# check for --with-libm=...
12796
Guido van Rossum563e7081996-09-10 18:20:48 +000012797case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012798Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012799*) LIBM=-lm
12800esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12802$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012804# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012805if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012807if test "$withval" = no
12808then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12810$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012811elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012812then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12814$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012815else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012816fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012817else
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12819$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820fi
12821
Guido van Rossum7f43da71994-08-01 12:15:30 +000012822
12823# check for --with-libc=...
12824
Matthias Kloseb9621712010-04-24 17:59:49 +000012825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12826$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012828# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012829if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012830 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012831if test "$withval" = no
12832then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12834$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012835elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012836then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12838$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012839else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012840fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012841else
Matthias Kloseb9621712010-04-24 17:59:49 +000012842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12843$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012844fi
12845
Guido van Rossum7f43da71994-08-01 12:15:30 +000012846
Stefan Krah1919b7e2012-03-21 18:25:23 +010012847# **************************************
12848# * Check for gcc x64 inline assembler *
12849# **************************************
12850
12851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12852$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12854/* end confdefs.h. */
12855
12856int
12857main ()
12858{
12859
12860 __asm__ __volatile__ ("movq %rcx, %rax");
12861
12862 ;
12863 return 0;
12864}
12865_ACEOF
12866if ac_fn_c_try_compile "$LINENO"; then :
12867 have_gcc_asm_for_x64=yes
12868else
12869 have_gcc_asm_for_x64=no
12870fi
12871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12873$as_echo "$have_gcc_asm_for_x64" >&6; }
12874if test "$have_gcc_asm_for_x64" = yes
12875then
12876
12877$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12878
12879fi
12880
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012881# **************************************************
12882# * Check for various properties of floating point *
12883# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012884
Matthias Kloseb9621712010-04-24 17:59:49 +000012885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12886$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012887if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012888 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012889else
12890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012892 ac_cv_little_endian_double=no
12893else
Matthias Kloseb9621712010-04-24 17:59:49 +000012894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012895/* end confdefs.h. */
12896
12897#include <string.h>
12898int main() {
12899 double x = 9006104071832581.0;
12900 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12901 return 0;
12902 else
12903 return 1;
12904}
12905
12906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012907if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012908 ac_cv_little_endian_double=yes
12909else
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12913 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012914fi
12915
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012916fi
12917
Matthias Kloseb9621712010-04-24 17:59:49 +000012918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12919$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012920if test "$ac_cv_little_endian_double" = yes
12921then
12922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012924
12925fi
12926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12928$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012929if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012930 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012931else
12932
Matthias Kloseb9621712010-04-24 17:59:49 +000012933if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012934 ac_cv_big_endian_double=no
12935else
Matthias Kloseb9621712010-04-24 17:59:49 +000012936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012937/* end confdefs.h. */
12938
12939#include <string.h>
12940int main() {
12941 double x = 9006104071832581.0;
12942 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12943 return 0;
12944 else
12945 return 1;
12946}
12947
12948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012949if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012950 ac_cv_big_endian_double=yes
12951else
Matthias Kloseb9621712010-04-24 17:59:49 +000012952 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12955 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012956fi
12957
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012958fi
12959
Matthias Kloseb9621712010-04-24 17:59:49 +000012960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12961$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012962if test "$ac_cv_big_endian_double" = yes
12963then
12964
Matthias Kloseb9621712010-04-24 17:59:49 +000012965$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012966
12967fi
12968
12969# Some ARM platforms use a mixed-endian representation for doubles.
12970# While Python doesn't currently have full support for these platforms
12971# (see e.g., issue 1762561), we can at least make sure that float <-> string
12972# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12974$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012975if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012977else
12978
Matthias Kloseb9621712010-04-24 17:59:49 +000012979if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012980 ac_cv_mixed_endian_double=no
12981else
Matthias Kloseb9621712010-04-24 17:59:49 +000012982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012983/* end confdefs.h. */
12984
12985#include <string.h>
12986int main() {
12987 double x = 9006104071832581.0;
12988 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12989 return 0;
12990 else
12991 return 1;
12992}
12993
12994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012995if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012996 ac_cv_mixed_endian_double=yes
12997else
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012999fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013000rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13001 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013002fi
13003
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013004fi
13005
Matthias Kloseb9621712010-04-24 17:59:49 +000013006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13007$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013008if test "$ac_cv_mixed_endian_double" = yes
13009then
13010
Matthias Kloseb9621712010-04-24 17:59:49 +000013011$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013012
13013fi
13014
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013015# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013016# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013017# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013018# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013019# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013020# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013021
13022# This inline assembler syntax may also work for suncc and icc,
13023# so we try it on all platforms.
13024
Matthias Kloseb9621712010-04-24 17:59:49 +000013025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13026$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013028/* end confdefs.h. */
13029
13030int
13031main ()
13032{
13033
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013034 unsigned short cw;
13035 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13036 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013037
13038 ;
13039 return 0;
13040}
13041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013042if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013043 have_gcc_asm_for_x87=yes
13044else
Matthias Kloseb9621712010-04-24 17:59:49 +000013045 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013046fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13049$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013050if test "$have_gcc_asm_for_x87" = yes
13051then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013052
Matthias Kloseb9621712010-04-24 17:59:49 +000013053$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013054
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013056
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013057# Detect whether system arithmetic is subject to x87-style double
13058# rounding issues. The result of this test has little meaning on non
13059# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13060# mode is round-to-nearest and double rounding issues are present, and
13061# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13063$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013064# $BASECFLAGS may affect the result
13065ac_save_cc="$CC"
13066CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013067if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013068 ac_cv_x87_double_rounding=no
13069else
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013071/* end confdefs.h. */
13072
13073#include <stdlib.h>
13074#include <math.h>
13075int main() {
13076 volatile double x, y, z;
13077 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13078 x = 0.99999999999999989; /* 1-2**-53 */
13079 y = 1./x;
13080 if (y != 1.)
13081 exit(0);
13082 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13083 x = 1e16;
13084 y = 2.99999;
13085 z = x + y;
13086 if (z != 1e16+4.)
13087 exit(0);
13088 /* both tests show evidence of double rounding */
13089 exit(1);
13090}
13091
13092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013093if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013094 ac_cv_x87_double_rounding=no
13095else
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13099 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013100fi
13101
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013102CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13104$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013105if test "$ac_cv_x87_double_rounding" = yes
13106then
13107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013109
13110fi
13111
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013112# ************************************
13113# * Check for mathematical functions *
13114# ************************************
13115
13116LIBS_SAVE=$LIBS
13117LIBS="$LIBS $LIBM"
13118
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013119for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13120do :
13121 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13122ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013123if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013124 cat >>confdefs.h <<_ACEOF
13125#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13126_ACEOF
13127
13128fi
13129done
13130
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013131for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013132do :
13133 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13134ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013135if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013136 cat >>confdefs.h <<_ACEOF
13137#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13138_ACEOF
13139
13140fi
13141done
13142
13143ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13144"
Victor Stinnere0be4232011-10-25 13:06:09 +020013145if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013146 ac_have_decl=1
13147else
13148 ac_have_decl=0
13149fi
13150
13151cat >>confdefs.h <<_ACEOF
13152#define HAVE_DECL_ISINF $ac_have_decl
13153_ACEOF
13154ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13155"
Victor Stinnere0be4232011-10-25 13:06:09 +020013156if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013157 ac_have_decl=1
13158else
13159 ac_have_decl=0
13160fi
13161
13162cat >>confdefs.h <<_ACEOF
13163#define HAVE_DECL_ISNAN $ac_have_decl
13164_ACEOF
13165ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13166"
Victor Stinnere0be4232011-10-25 13:06:09 +020013167if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013168 ac_have_decl=1
13169else
13170 ac_have_decl=0
13171fi
13172
13173cat >>confdefs.h <<_ACEOF
13174#define HAVE_DECL_ISFINITE $ac_have_decl
13175_ACEOF
13176
13177
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013178# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13179# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13181$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013182if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013183 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013184else
13185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013187 ac_cv_tanh_preserves_zero_sign=no
13188else
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013190/* end confdefs.h. */
13191
13192#include <math.h>
13193#include <stdlib.h>
13194int main() {
13195 /* return 0 if either negative zeros don't exist
13196 on this platform or if negative zeros exist
13197 and tanh(-0.) == -0. */
13198 if (atan2(0., -1.) == atan2(-0., -1.) ||
13199 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13200 else exit(1);
13201}
13202
13203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013204if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013205 ac_cv_tanh_preserves_zero_sign=yes
13206else
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13210 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013211fi
13212
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013213fi
13214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13216$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013217if test "$ac_cv_tanh_preserves_zero_sign" = yes
13218then
13219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013221
13222fi
13223
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013224if test "$ac_cv_func_log1p" = yes
13225then
13226 # On some versions of AIX, log1p(-0.) returns 0. instead of
13227 # -0. See issue #9920.
13228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13229$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013230 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013231 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013232else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013233
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013234 if test "$cross_compiling" = yes; then :
13235 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013236else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13238/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013239
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013240 #include <math.h>
13241 #include <stdlib.h>
13242 int main() {
13243 /* Fail if the signs of log1p(-0.) and -0. can be
13244 distinguished. */
13245 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13246 return 0;
13247 else
13248 return 1;
13249 }
13250
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013251_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013252if ac_fn_c_try_run "$LINENO"; then :
13253 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013254else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013255 ac_cv_log1p_drops_zero_sign=yes
13256fi
13257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13258 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013259fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013260
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013261fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013262
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13264$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13265fi
13266if test "$ac_cv_log1p_drops_zero_sign" = yes
13267then
13268
13269$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13270
13271fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013272
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013273LIBS=$LIBS_SAVE
13274
Mark Dickinsona614f042009-11-28 12:48:43 +000013275# For multiprocessing module, check that sem_open
13276# actually works. For FreeBSD versions <= 7.2,
13277# the kernel module that provides POSIX semaphores
13278# isn't loaded by default, so an attempt to call
13279# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13281$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013282if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013284else
Matthias Kloseb9621712010-04-24 17:59:49 +000013285 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013286 ac_cv_posix_semaphores_enabled=yes
13287else
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013289/* end confdefs.h. */
13290
13291#include <unistd.h>
13292#include <fcntl.h>
13293#include <stdio.h>
13294#include <semaphore.h>
13295#include <sys/stat.h>
13296
13297int main(void) {
13298 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13299 if (a == SEM_FAILED) {
13300 perror("sem_open");
13301 return 1;
13302 }
13303 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013304 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013305 return 0;
13306}
13307
13308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013309if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013310 ac_cv_posix_semaphores_enabled=yes
13311else
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13315 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013316fi
13317
13318
Mark Dickinsona614f042009-11-28 12:48:43 +000013319fi
13320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13322$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013323if test $ac_cv_posix_semaphores_enabled = no
13324then
13325
Matthias Kloseb9621712010-04-24 17:59:49 +000013326$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013327
13328fi
13329
Mark Dickinson10683072009-04-18 21:18:19 +000013330# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13332$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013333if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013334 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013335else
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013337 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013338else
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013340/* end confdefs.h. */
13341
13342#include <unistd.h>
13343#include <fcntl.h>
13344#include <stdio.h>
13345#include <semaphore.h>
13346#include <sys/stat.h>
13347
13348int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013349 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013350 int count;
13351 int res;
13352 if(a==SEM_FAILED){
13353 perror("sem_open");
13354 return 1;
13355
13356 }
13357 res = sem_getvalue(a, &count);
13358 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013359 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013360 return res==-1 ? 1 : 0;
13361}
13362
Mark Dickinson10683072009-04-18 21:18:19 +000013363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013364if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013365 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013366else
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13370 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013371fi
13372
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013373
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013374fi
13375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13377$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013378if test $ac_cv_broken_sem_getvalue = yes
13379then
13380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013382
13383fi
13384
Mark Dickinsonbd792642009-03-18 20:06:12 +000013385# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13387$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013388# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013389if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013390 enableval=$enable_big_digits; case $enable_big_digits in
13391yes)
13392 enable_big_digits=30 ;;
13393no)
13394 enable_big_digits=15 ;;
1339515|30)
13396 ;;
13397*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013398 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 +000013399esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13401$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013402
13403cat >>confdefs.h <<_ACEOF
13404#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13405_ACEOF
13406
13407
13408else
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13410$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013411fi
13412
13413
Guido van Rossumef2255b2000-03-10 22:30:29 +000013414# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013415ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013416if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
13418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013420
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013421 wchar_h="yes"
13422
Guido van Rossumef2255b2000-03-10 22:30:29 +000013423else
Martin v. Löwis11437992002-04-12 09:54:03 +000013424 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013425
13426fi
13427
Michael W. Hudson54241132001-12-07 15:38:26 +000013428
Martin v. Löwis11437992002-04-12 09:54:03 +000013429
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013430# determine wchar_t size
13431if test "$wchar_h" = yes
13432then
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013434# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13435# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13436# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13438$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013439if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013441else
Matthias Kloseb9621712010-04-24 17:59:49 +000013442 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13443"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013444
Martin v. Löwis11437992002-04-12 09:54:03 +000013445else
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 if test "$ac_cv_type_wchar_t" = yes; then
13447 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13448$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013449as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013450See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451 else
13452 ac_cv_sizeof_wchar_t=0
13453 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013455
Martin v. Löwis11437992002-04-12 09:54:03 +000013456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13458$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013459
13460
13461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013463#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013464_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013465
Michael W. Hudson54241132001-12-07 15:38:26 +000013466
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013467fi
13468
Matthias Kloseb9621712010-04-24 17:59:49 +000013469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13470$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013471have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013473/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013474
13475#include <tcl.h>
13476#if TCL_UTF_MAX != 6
13477# error "NOT UCS4_TCL"
13478#endif
13479int
13480main ()
13481{
13482
13483 ;
13484 return 0;
13485}
13486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013487if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013488
13489
Matthias Kloseb9621712010-04-24 17:59:49 +000013490$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013491
13492 have_ucs4_tcl=yes
13493
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13497$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013498
Skip Montanaro6dead952003-09-25 14:50:04 +000013499# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013500if test "$wchar_h" = yes
13501then
13502 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13504$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013505 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013506 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013507else
13508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013510 ac_cv_wchar_t_signed=yes
13511else
Matthias Kloseb9621712010-04-24 17:59:49 +000013512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013513/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013514
13515 #include <wchar.h>
13516 int main()
13517 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013518 /* Success: exit code 0 */
13519 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013520 }
13521
13522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013523if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013524 ac_cv_wchar_t_signed=yes
13525else
Matthias Kloseb9621712010-04-24 17:59:49 +000013526 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013527fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013528rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13529 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013530fi
13531
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013532fi
13533
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13535$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013536fi
13537
Georg Brandl52d168a2008-01-07 18:10:24 +000013538# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013539if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013540 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013541then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013542 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013543
Matthias Kloseb9621712010-04-24 17:59:49 +000013544$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
Georg Brandl52d168a2008-01-07 18:10:24 +000013546else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013547 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013548fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13550$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013551
13552# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13554$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013555if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013556 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013557else
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 ac_cv_c_bigendian=unknown
13559 # See if we're dealing with a universal compiler.
13560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13561/* end confdefs.h. */
13562#ifndef __APPLE_CC__
13563 not a universal capable compiler
13564 #endif
13565 typedef int dummy;
13566
Skip Montanaro6dead952003-09-25 14:50:04 +000013567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013568if ac_fn_c_try_compile "$LINENO"; then :
13569
13570 # Check for potential -arch flags. It is not universal unless
13571 # there are at least two -arch flags with different values.
13572 ac_arch=
13573 ac_prev=
13574 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13575 if test -n "$ac_prev"; then
13576 case $ac_word in
13577 i?86 | x86_64 | ppc | ppc64)
13578 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13579 ac_arch=$ac_word
13580 else
13581 ac_cv_c_bigendian=universal
13582 break
13583 fi
13584 ;;
13585 esac
13586 ac_prev=
13587 elif test "x$ac_word" = "x-arch"; then
13588 ac_prev=arch
13589 fi
13590 done
13591fi
13592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13593 if test $ac_cv_c_bigendian = unknown; then
13594 # See if sys/param.h defines the BYTE_ORDER macro.
13595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013596/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013597#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013599
Martin v. Löwis11437992002-04-12 09:54:03 +000013600int
13601main ()
13602{
Matthias Kloseb9621712010-04-24 17:59:49 +000013603#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13604 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13605 && LITTLE_ENDIAN)
13606 bogus endian macros
13607 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013608
13609 ;
13610 return 0;
13611}
13612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013613if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013614 # It does; now see whether it defined to BIG_ENDIAN or not.
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. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013617#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013619
Martin v. Löwis11437992002-04-12 09:54:03 +000013620int
13621main ()
13622{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013623#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 not big endian
13625 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013626
13627 ;
13628 return 0;
13629}
13630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013631if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013632 ac_cv_c_bigendian=yes
13633else
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013637fi
13638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13639 fi
13640 if test $ac_cv_c_bigendian = unknown; then
13641 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013643/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013644#include <limits.h>
13645
Martin v. Löwis11437992002-04-12 09:54:03 +000013646int
13647main ()
13648{
Matthias Kloseb9621712010-04-24 17:59:49 +000013649#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13650 bogus endian macros
13651 #endif
13652
Martin v. Löwis11437992002-04-12 09:54:03 +000013653 ;
13654 return 0;
13655}
13656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013657if ac_fn_c_try_compile "$LINENO"; then :
13658 # It does; now see whether it defined to _BIG_ENDIAN or not.
13659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13660/* end confdefs.h. */
13661#include <limits.h>
13662
13663int
13664main ()
13665{
13666#ifndef _BIG_ENDIAN
13667 not big endian
13668 #endif
13669
13670 ;
13671 return 0;
13672}
13673_ACEOF
13674if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013675 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013676else
Matthias Kloseb9621712010-04-24 17:59:49 +000013677 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13680fi
13681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13682 fi
13683 if test $ac_cv_c_bigendian = unknown; then
13684 # Compile a test program.
13685 if test "$cross_compiling" = yes; then :
13686 # Try to guess by grepping values from an object file.
13687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13688/* end confdefs.h. */
13689short int ascii_mm[] =
13690 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13691 short int ascii_ii[] =
13692 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13693 int use_ascii (int i) {
13694 return ascii_mm[i] + ascii_ii[i];
13695 }
13696 short int ebcdic_ii[] =
13697 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13698 short int ebcdic_mm[] =
13699 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13700 int use_ebcdic (int i) {
13701 return ebcdic_mm[i] + ebcdic_ii[i];
13702 }
13703 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013704
Matthias Kloseb9621712010-04-24 17:59:49 +000013705int
13706main ()
13707{
13708return use_ascii (foo) == use_ebcdic (foo);
13709 ;
13710 return 0;
13711}
13712_ACEOF
13713if ac_fn_c_try_compile "$LINENO"; then :
13714 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13715 ac_cv_c_bigendian=yes
13716 fi
13717 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13718 if test "$ac_cv_c_bigendian" = unknown; then
13719 ac_cv_c_bigendian=no
13720 else
13721 # finding both strings is unlikely to happen, but who knows?
13722 ac_cv_c_bigendian=unknown
13723 fi
13724 fi
13725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013727else
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013729/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013730$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013731int
13732main ()
13733{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013734
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 /* Are we little or big endian? From Harbison&Steele. */
13736 union
13737 {
13738 long int l;
13739 char c[sizeof (long int)];
13740 } u;
13741 u.l = 1;
13742 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013743
13744 ;
13745 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013746}
Martin v. Löwis11437992002-04-12 09:54:03 +000013747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013748if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013749 ac_cv_c_bigendian=no
13750else
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13754 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013756
Matthias Kloseb9621712010-04-24 17:59:49 +000013757 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13760$as_echo "$ac_cv_c_bigendian" >&6; }
13761 case $ac_cv_c_bigendian in #(
13762 yes)
13763 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13764;; #(
13765 no)
13766 ;; #(
13767 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771 ;; #(
13772 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013773 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013774 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013776
Michael W. Hudson54241132001-12-07 15:38:26 +000013777
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013778# ABI version string for Python extension modules. This appears between the
13779# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13780# from the following attributes which affect the ABI of this Python build (in
13781# this order):
13782#
13783# * The Python implementation (always 'cpython-' for us)
13784# * The major and minor version numbers
13785# * --with-pydebug (adds a 'd')
13786# * --with-pymalloc (adds a 'm')
13787# * --with-wide-unicode (adds a 'u')
13788#
13789# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013790# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13791# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013792
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13794$as_echo_n "checking ABIFLAGS... " >&6; }
13795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13796$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13798$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013799SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13801$as_echo "$SOABI" >&6; }
13802
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013803
13804case $ac_sys_system in
13805 Linux*|GNU*)
13806 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13807 *)
13808 EXT_SUFFIX=${SHLIB_SUFFIX};;
13809esac
13810
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13812$as_echo_n "checking LDVERSION... " >&6; }
13813LDVERSION='$(VERSION)$(ABIFLAGS)'
13814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13815$as_echo "$LDVERSION" >&6; }
13816
doko@python.org87421192013-01-26 11:39:31 +010013817
13818LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13819
13820
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013821# Check whether right shifting a negative integer extends the sign bit
13822# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13824$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013825if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013827else
Martin v. Löwis11437992002-04-12 09:54:03 +000013828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013830 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013831else
Matthias Kloseb9621712010-04-24 17:59:49 +000013832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013833/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013834
13835int main()
13836{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013837 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013838}
13839
Martin v. Löwis11437992002-04-12 09:54:03 +000013840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013841if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013842 ac_cv_rshift_extends_sign=yes
13843else
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013846rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13847 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013848fi
13849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013850fi
13851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13853$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013854if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013855then
Martin v. Löwis11437992002-04-12 09:54:03 +000013856
Matthias Kloseb9621712010-04-24 17:59:49 +000013857$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013858
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013859fi
13860
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013861# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13863$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013864if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013865 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013866else
Martin v. Löwis11437992002-04-12 09:54:03 +000013867
Matthias Kloseb9621712010-04-24 17:59:49 +000013868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013869/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013870#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013871int
13872main ()
13873{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013874
13875 FILE *f = fopen("/dev/null", "r");
13876 flockfile(f);
13877 getc_unlocked(f);
13878 funlockfile(f);
13879
Martin v. Löwis11437992002-04-12 09:54:03 +000013880 ;
13881 return 0;
13882}
13883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013884if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013885 ac_cv_have_getc_unlocked=yes
13886else
Matthias Kloseb9621712010-04-24 17:59:49 +000013887 ac_cv_have_getc_unlocked=no
13888fi
13889rm -f core conftest.err conftest.$ac_objext \
13890 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892
Matthias Kloseb9621712010-04-24 17:59:49 +000013893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13894$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013895if test "$ac_cv_have_getc_unlocked" = yes
13896then
Martin v. Löwis11437992002-04-12 09:54:03 +000013897
Matthias Kloseb9621712010-04-24 17:59:49 +000013898$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013899
13900fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013901
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013902# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013903# save the value of LIBS so we don't actually link Python with readline
13904LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013905
Gregory P. Smith18820942008-09-07 06:24:49 +000013906# On some systems we need to link readline to a termcap compatible
13907# library. NOTE: Keep the precedence of listed libraries synchronised
13908# with setup.py.
13909py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13911$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013912for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013913 if test -z "$py_libtermcap"; then
13914 READLINE_LIBS="-lreadline"
13915 else
13916 READLINE_LIBS="-lreadline -l$py_libtermcap"
13917 fi
13918 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013920/* end confdefs.h. */
13921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013922/* Override any GCC internal prototype to avoid an error.
13923 Use char because int might match the return type of a GCC
13924 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013925#ifdef __cplusplus
13926extern "C"
13927#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013928char readline ();
13929int
13930main ()
13931{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013933 ;
13934 return 0;
13935}
13936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013937if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013938 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013940rm -f core conftest.err conftest.$ac_objext \
13941 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013942 if test $py_cv_lib_readline = yes; then
13943 break
13944 fi
13945done
13946# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13947#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013948if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13950$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013951else
Matthias Kloseb9621712010-04-24 17:59:49 +000013952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13953$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013954
Matthias Kloseb9621712010-04-24 17:59:49 +000013955$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013956
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013957fi
13958
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013959# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13961$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013962if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013964else
13965 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013966LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013968/* end confdefs.h. */
13969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013970/* Override any GCC internal prototype to avoid an error.
13971 Use char because int might match the return type of a GCC
13972 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013973#ifdef __cplusplus
13974extern "C"
13975#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013976char rl_callback_handler_install ();
13977int
13978main ()
13979{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013981 ;
13982 return 0;
13983}
13984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013985if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013986 ac_cv_lib_readline_rl_callback_handler_install=yes
13987else
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013990rm -f core conftest.err conftest.$ac_objext \
13991 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013992LIBS=$ac_check_lib_save_LIBS
13993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13995$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013996if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013997
Matthias Kloseb9621712010-04-24 17:59:49 +000013998$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013999
14000fi
14001
14002
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014003# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014005/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014006#include <readline/readline.h>
14007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014008if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014009 have_readline=yes
14010else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014011 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014012
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014013fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014014rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014015if test $have_readline = yes
14016then
Matthias Kloseb9621712010-04-24 17:59:49 +000014017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014018/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014019#include <readline/readline.h>
14020
14021_ACEOF
14022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014023 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014024
Matthias Kloseb9621712010-04-24 17:59:49 +000014025$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014026
14027fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014028rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014029
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014031/* end confdefs.h. */
14032#include <readline/readline.h>
14033
14034_ACEOF
14035if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014036 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014037
Matthias Kloseb9621712010-04-24 17:59:49 +000014038$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014039
14040fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014041rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014042
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014043fi
14044
Martin v. Löwis0daad592001-09-30 21:09:59 +000014045# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14047$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014048if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014050else
Martin v. Löwis11437992002-04-12 09:54:03 +000014051 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014052LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014056/* Override any GCC internal prototype to avoid an error.
14057 Use char because int might match the return type of a GCC
14058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014059#ifdef __cplusplus
14060extern "C"
14061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014062char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014063int
14064main ()
14065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014066return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 ;
14068 return 0;
14069}
14070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014071if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014073else
Matthias Kloseb9621712010-04-24 17:59:49 +000014074 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014076rm -f core conftest.err conftest.$ac_objext \
14077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014078LIBS=$ac_check_lib_save_LIBS
14079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14081$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014082if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014083
Matthias Kloseb9621712010-04-24 17:59:49 +000014084$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014085
Martin v. Löwis0daad592001-09-30 21:09:59 +000014086fi
14087
Michael W. Hudson54241132001-12-07 15:38:26 +000014088
Thomas Wouters89d996e2007-09-08 17:39:28 +000014089# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14091$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014092if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014093 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014094else
14095 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014096LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014098/* end confdefs.h. */
14099
14100/* Override any GCC internal prototype to avoid an error.
14101 Use char because int might match the return type of a GCC
14102 builtin and then its argument prototype would still apply. */
14103#ifdef __cplusplus
14104extern "C"
14105#endif
14106char rl_completion_display_matches_hook ();
14107int
14108main ()
14109{
14110return rl_completion_display_matches_hook ();
14111 ;
14112 return 0;
14113}
14114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014115if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014116 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14117else
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014120rm -f core conftest.err conftest.$ac_objext \
14121 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014122LIBS=$ac_check_lib_save_LIBS
14123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14125$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014126if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014127
Matthias Kloseb9621712010-04-24 17:59:49 +000014128$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014129
14130fi
14131
14132
Martin v. Löwis0daad592001-09-30 21:09:59 +000014133# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14135$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014136if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014138else
Martin v. Löwis11437992002-04-12 09:54:03 +000014139 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014140LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014144/* Override any GCC internal prototype to avoid an error.
14145 Use char because int might match the return type of a GCC
14146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014147#ifdef __cplusplus
14148extern "C"
14149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014150char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014151int
14152main ()
14153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014154return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014155 ;
14156 return 0;
14157}
14158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014161else
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014164rm -f core conftest.err conftest.$ac_objext \
14165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014166LIBS=$ac_check_lib_save_LIBS
14167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14169$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014170if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014171
Matthias Kloseb9621712010-04-24 17:59:49 +000014172$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014173
Guido van Rossum353ae582001-07-10 16:45:32 +000014174fi
14175
Jack Jansendd19cf82001-12-06 22:36:17 +000014176
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014177# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014179/* end confdefs.h. */
14180#include <readline/readline.h>
14181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014182if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014183 have_readline=yes
14184else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014185 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014186
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014187fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014188rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014189if test $have_readline = yes
14190then
Matthias Kloseb9621712010-04-24 17:59:49 +000014191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014192/* end confdefs.h. */
14193#include <readline/readline.h>
14194
14195_ACEOF
14196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014200
14201fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014202rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014203
14204fi
14205
Martin v. Löwis82bca632006-02-10 20:49:30 +000014206# End of readline checks: restore LIBS
14207LIBS=$LIBS_no_readline
14208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14210$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014211if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014213else
Martin v. Löwis11437992002-04-12 09:54:03 +000014214
Matthias Kloseb9621712010-04-24 17:59:49 +000014215if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014216 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014217else
Matthias Kloseb9621712010-04-24 17:59:49 +000014218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014219/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014220
14221int main()
14222{
14223 int val1 = nice(1);
14224 if (val1 != -1 && val1 == nice(2))
14225 exit(0);
14226 exit(1);
14227}
14228
Martin v. Löwis11437992002-04-12 09:54:03 +000014229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014230if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014231 ac_cv_broken_nice=yes
14232else
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14236 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014237fi
14238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239fi
14240
Matthias Kloseb9621712010-04-24 17:59:49 +000014241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14242$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014243if test "$ac_cv_broken_nice" = yes
14244then
Martin v. Löwis11437992002-04-12 09:54:03 +000014245
Matthias Kloseb9621712010-04-24 17:59:49 +000014246$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014247
14248fi
14249
Matthias Kloseb9621712010-04-24 17:59:49 +000014250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14251$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014252if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014253 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014254else
Matthias Kloseb9621712010-04-24 17:59:49 +000014255 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014256 ac_cv_broken_poll=no
14257else
Matthias Kloseb9621712010-04-24 17:59:49 +000014258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014259/* end confdefs.h. */
14260
14261#include <poll.h>
14262
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014263int main()
14264{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014265 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014266 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014267
14268 close (42);
14269
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014270 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014271 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014272 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014273 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014274 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014275 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014276 return 1;
14277}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014278
14279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014280if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014281 ac_cv_broken_poll=yes
14282else
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14286 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014289fi
14290
Matthias Kloseb9621712010-04-24 17:59:49 +000014291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14292$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014293if test "$ac_cv_broken_poll" = yes
14294then
14295
Matthias Kloseb9621712010-04-24 17:59:49 +000014296$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014297
14298fi
14299
Brett Cannon43802422005-02-10 20:48:03 +000014300# 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 +000014301# (which is not required by ISO C or UNIX spec) and/or if we support
14302# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014303ac_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 +000014304#include <$ac_cv_struct_tm>
14305
Matthias Kloseb9621712010-04-24 17:59:49 +000014306"
Victor Stinnere0be4232011-10-25 13:06:09 +020014307if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014308
14309cat >>confdefs.h <<_ACEOF
14310#define HAVE_STRUCT_TM_TM_ZONE 1
14311_ACEOF
14312
14313
14314fi
14315
14316if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14317
Matthias Kloseb9621712010-04-24 17:59:49 +000014318$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014319
14320else
Matthias Kloseb9621712010-04-24 17:59:49 +000014321 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14322"
Victor Stinnere0be4232011-10-25 13:06:09 +020014323if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014324 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325else
Matthias Kloseb9621712010-04-24 17:59:49 +000014326 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014327fi
14328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014329cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014330#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014331_ACEOF
14332
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14334$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014335if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014336 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014337else
Matthias Kloseb9621712010-04-24 17:59:49 +000014338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014339/* end confdefs.h. */
14340#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014341#if !HAVE_DECL_TZNAME
14342extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014343#endif
14344
14345int
14346main ()
14347{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014348return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014349 ;
14350 return 0;
14351}
14352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014353if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014354 ac_cv_var_tzname=yes
14355else
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014358rm -f core conftest.err conftest.$ac_objext \
14359 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14362$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014363 if test $ac_cv_var_tzname = yes; then
14364
Matthias Kloseb9621712010-04-24 17:59:49 +000014365$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014366
14367 fi
14368fi
14369
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014370
Martin v. Löwis1d459062005-03-14 21:23:33 +000014371# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14373$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014374if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014376else
14377
Matthias Kloseb9621712010-04-24 17:59:49 +000014378if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014379 ac_cv_working_tzset=no
14380else
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014382/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014383
14384#include <stdlib.h>
14385#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014386#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014387
14388#if HAVE_TZNAME
14389extern char *tzname[];
14390#endif
14391
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014392int main()
14393{
Brett Cannon18367812003-09-19 00:59:16 +000014394 /* Note that we need to ensure that not only does tzset(3)
14395 do 'something' with localtime, but it works as documented
14396 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014397 This includes making sure that tzname is set properly if
14398 tm->tm_zone does not exist since it is the alternative way
14399 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014400
14401 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014402 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014403 */
14404
Martin v. Löwis1d459062005-03-14 21:23:33 +000014405 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014406 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14407
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014408 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014409 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014410 if (localtime(&groundhogday)->tm_hour != 0)
14411 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014412#if HAVE_TZNAME
14413 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14414 if (strcmp(tzname[0], "UTC") ||
14415 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14416 exit(1);
14417#endif
Brett Cannon18367812003-09-19 00:59:16 +000014418
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014419 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014420 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014421 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014422 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014423#if HAVE_TZNAME
14424 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14425 exit(1);
14426#endif
Brett Cannon18367812003-09-19 00:59:16 +000014427
14428 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14429 tzset();
14430 if (localtime(&groundhogday)->tm_hour != 11)
14431 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014432#if HAVE_TZNAME
14433 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14434 exit(1);
14435#endif
14436
14437#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014438 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14439 exit(1);
14440 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14441 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014442#endif
Brett Cannon18367812003-09-19 00:59:16 +000014443
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014444 exit(0);
14445}
14446
14447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014448if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014449 ac_cv_working_tzset=yes
14450else
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14454 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014455fi
14456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457fi
14458
Matthias Kloseb9621712010-04-24 17:59:49 +000014459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14460$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014461if test "$ac_cv_working_tzset" = yes
14462then
14463
Matthias Kloseb9621712010-04-24 17:59:49 +000014464$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014465
14466fi
14467
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014468# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14470$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014471if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014472 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014473else
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014475/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014476#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014477int
14478main ()
14479{
14480
14481struct stat st;
14482st.st_mtim.tv_nsec = 1;
14483
14484 ;
14485 return 0;
14486}
14487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014489 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014490else
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14494fi
14495
Matthias Kloseb9621712010-04-24 17:59:49 +000014496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14497$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014498if test "$ac_cv_stat_tv_nsec" = yes
14499then
14500
Matthias Kloseb9621712010-04-24 17:59:49 +000014501$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014502
14503fi
14504
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014505# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14507$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014508if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014510else
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014512/* end confdefs.h. */
14513#include <sys/stat.h>
14514int
14515main ()
14516{
14517
14518struct stat st;
14519st.st_mtimespec.tv_nsec = 1;
14520
14521 ;
14522 return 0;
14523}
14524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014525if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014526 ac_cv_stat_tv_nsec2=yes
14527else
Matthias Kloseb9621712010-04-24 17:59:49 +000014528 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14531fi
14532
Matthias Kloseb9621712010-04-24 17:59:49 +000014533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14534$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014535if test "$ac_cv_stat_tv_nsec2" = yes
14536then
14537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014539
14540fi
14541
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014542ac_save_cppflags="$CPPFLAGS"
14543CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014544# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14546$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014547if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014549else
Matthias Kloseb9621712010-04-24 17:59:49 +000014550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014551/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014552#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014553int
14554main ()
14555{
Jack Jansen666b1e72001-10-31 12:11:48 +000014556
14557 int rtn;
14558 rtn = mvwdelch(0,0,0);
14559
Martin v. Löwis11437992002-04-12 09:54:03 +000014560 ;
14561 return 0;
14562}
14563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014564if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014565 ac_cv_mvwdelch_is_expression=yes
14566else
Matthias Kloseb9621712010-04-24 17:59:49 +000014567 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14570fi
14571
Matthias Kloseb9621712010-04-24 17:59:49 +000014572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14573$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014574
14575if test "$ac_cv_mvwdelch_is_expression" = yes
14576then
Martin v. Löwis11437992002-04-12 09:54:03 +000014577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014579
14580fi
14581
Matthias Kloseb9621712010-04-24 17:59:49 +000014582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14583$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014584if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014585 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014586else
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014588/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014589#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014590int
14591main ()
14592{
Jack Jansen666b1e72001-10-31 12:11:48 +000014593
14594 WINDOW *w;
14595 w->_flags = 0;
14596
Martin v. Löwis11437992002-04-12 09:54:03 +000014597 ;
14598 return 0;
14599}
14600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014601if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014602 ac_cv_window_has_flags=yes
14603else
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14607fi
14608
Matthias Kloseb9621712010-04-24 17:59:49 +000014609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14610$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014611
Jack Jansen666b1e72001-10-31 12:11:48 +000014612
14613if test "$ac_cv_window_has_flags" = yes
14614then
Martin v. Löwis11437992002-04-12 09:54:03 +000014615
Matthias Kloseb9621712010-04-24 17:59:49 +000014616$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014617
14618fi
14619
Matthias Kloseb9621712010-04-24 17:59:49 +000014620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14621$as_echo_n "checking for is_term_resized... " >&6; }
14622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014623/* end confdefs.h. */
14624#include <curses.h>
14625int
14626main ()
14627{
14628void *x=is_term_resized
14629 ;
14630 return 0;
14631}
14632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014633if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014634
Matthias Kloseb9621712010-04-24 17:59:49 +000014635$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014636
Matthias Kloseb159a552010-04-25 21:00:44 +000014637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014638$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014639else
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14641$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014642
14643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14645
Matthias Kloseb9621712010-04-24 17:59:49 +000014646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14647$as_echo_n "checking for resize_term... " >&6; }
14648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014649/* end confdefs.h. */
14650#include <curses.h>
14651int
14652main ()
14653{
14654void *x=resize_term
14655 ;
14656 return 0;
14657}
14658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014659if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014660
Matthias Kloseb9621712010-04-24 17:59:49 +000014661$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014662
Matthias Kloseb159a552010-04-25 21:00:44 +000014663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014664$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014665else
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14667$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014668
14669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14671
Matthias Kloseb9621712010-04-24 17:59:49 +000014672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14673$as_echo_n "checking for resizeterm... " >&6; }
14674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014675/* end confdefs.h. */
14676#include <curses.h>
14677int
14678main ()
14679{
14680void *x=resizeterm
14681 ;
14682 return 0;
14683}
14684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014685if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014686
Matthias Kloseb9621712010-04-24 17:59:49 +000014687$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014688
Matthias Kloseb159a552010-04-25 21:00:44 +000014689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014690$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014691else
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14693$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014694
14695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014697# last curses configure check
14698CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014699
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14701$as_echo "$as_me: checking for device files" >&6;}
14702
14703if test "x$cross_compiling" = xyes; then
14704 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14706$as_echo_n "checking for /dev/ptmx... " >&6; }
14707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14708$as_echo "not set" >&6; }
14709 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14710 fi
14711 if test "${ac_cv_file__dev_ptc+set}" != set; then
14712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14713$as_echo_n "checking for /dev/ptc... " >&6; }
14714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14715$as_echo "not set" >&6; }
14716 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14717 fi
14718fi
14719
Matthias Kloseb9621712010-04-24 17:59:49 +000014720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14721$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014722if ${ac_cv_file__dev_ptmx+:} false; then :
14723 $as_echo_n "(cached) " >&6
14724else
14725 test "$cross_compiling" = yes &&
14726 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14727if test -r "/dev/ptmx"; then
14728 ac_cv_file__dev_ptmx=yes
14729else
14730 ac_cv_file__dev_ptmx=no
14731fi
14732fi
14733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14734$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14735if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014736
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014737fi
14738
14739if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014740
Matthias Kloseb9621712010-04-24 17:59:49 +000014741$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014742
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14745$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014746if ${ac_cv_file__dev_ptc+:} false; then :
14747 $as_echo_n "(cached) " >&6
14748else
14749 test "$cross_compiling" = yes &&
14750 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14751if test -r "/dev/ptc"; then
14752 ac_cv_file__dev_ptc=yes
14753else
14754 ac_cv_file__dev_ptc=no
14755fi
14756fi
14757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14758$as_echo "$ac_cv_file__dev_ptc" >&6; }
14759if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014760
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014761fi
14762
14763if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014764
Matthias Kloseb9621712010-04-24 17:59:49 +000014765$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014766
Neal Norwitz865400f2003-03-21 01:42:58 +000014767fi
14768
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014769if test "$have_long_long" = yes
14770then
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14772$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014773 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014774 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014775else
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014777 ac_cv_have_long_long_format="cross -- assuming no"
14778 if test x$GCC = xyes; then
14779 save_CFLAGS=$CFLAGS
14780 CFLAGS="$CFLAGS -Werror -Wformat"
14781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14782/* end confdefs.h. */
14783
14784 #include <stdio.h>
14785 #include <stddef.h>
14786
14787int
14788main ()
14789{
14790
14791 char *buffer;
14792 sprintf(buffer, "%lld", (long long)123);
14793 sprintf(buffer, "%lld", (long long)-123);
14794 sprintf(buffer, "%llu", (unsigned long long)123);
14795
14796 ;
14797 return 0;
14798}
14799_ACEOF
14800if ac_fn_c_try_compile "$LINENO"; then :
14801 ac_cv_have_long_long_format=yes
14802
14803fi
14804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14805 CFLAGS=$save_CFLAGS
14806 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014807else
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014809/* end confdefs.h. */
14810
14811 #include <stdio.h>
14812 #include <stddef.h>
14813 #include <string.h>
14814
14815 #ifdef HAVE_SYS_TYPES_H
14816 #include <sys/types.h>
14817 #endif
14818
14819 int main()
14820 {
14821 char buffer[256];
14822
14823 if (sprintf(buffer, "%lld", (long long)123) < 0)
14824 return 1;
14825 if (strcmp(buffer, "123"))
14826 return 1;
14827
14828 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14829 return 1;
14830 if (strcmp(buffer, "-123"))
14831 return 1;
14832
14833 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14834 return 1;
14835 if (strcmp(buffer, "123"))
14836 return 1;
14837
14838 return 0;
14839 }
14840
14841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014842if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014843 ac_cv_have_long_long_format=yes
14844else
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14848 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014849fi
14850
14851
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014852fi
14853
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14855$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014856fi
14857
Mark Dickinson89d7d412009-12-31 20:50:59 +000014858if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014859then
14860
Matthias Kloseb9621712010-04-24 17:59:49 +000014861$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014862
14863fi
14864
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014865if test $ac_sys_system = Darwin
14866then
14867 LIBS="$LIBS -framework CoreFoundation"
14868fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014869
Matthias Kloseb9621712010-04-24 17:59:49 +000014870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14871$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014872if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014873 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014874else
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014876 ac_cv_have_size_t_format="cross -- assuming yes"
14877
Thomas Wouters477c8d52006-05-27 19:21:47 +000014878else
Matthias Kloseb9621712010-04-24 17:59:49 +000014879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014880/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014881
Thomas Wouters477c8d52006-05-27 19:21:47 +000014882#include <stdio.h>
14883#include <stddef.h>
14884#include <string.h>
14885
Christian Heimes2c181612007-12-17 20:04:13 +000014886#ifdef HAVE_SYS_TYPES_H
14887#include <sys/types.h>
14888#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014889
14890#ifdef HAVE_SSIZE_T
14891typedef ssize_t Py_ssize_t;
14892#elif SIZEOF_VOID_P == SIZEOF_LONG
14893typedef long Py_ssize_t;
14894#else
14895typedef int Py_ssize_t;
14896#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014897
Christian Heimes2c181612007-12-17 20:04:13 +000014898int main()
14899{
14900 char buffer[256];
14901
Thomas Wouters477c8d52006-05-27 19:21:47 +000014902 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14903 return 1;
14904
Thomas Wouters89f507f2006-12-13 04:49:30 +000014905 if (strcmp(buffer, "123"))
14906 return 1;
14907
14908 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14909 return 1;
14910
14911 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014912 return 1;
14913
14914 return 0;
14915}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014916
Thomas Wouters477c8d52006-05-27 19:21:47 +000014917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014918if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014919 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014920else
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14924 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014925fi
14926
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14929$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014930if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014931
Matthias Kloseb9621712010-04-24 17:59:49 +000014932$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014933
14934fi
14935
Matthias Kloseb9621712010-04-24 17:59:49 +000014936ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014937#ifdef HAVE_SYS_TYPES_H
14938#include <sys/types.h>
14939#endif
14940#ifdef HAVE_SYS_SOCKET_H
14941#include <sys/socket.h>
14942#endif
14943
Matthias Kloseb9621712010-04-24 17:59:49 +000014944"
Victor Stinnere0be4232011-10-25 13:06:09 +020014945if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014946
Martin v. Löwis11437992002-04-12 09:54:03 +000014947else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014948
Matthias Kloseb9621712010-04-24 17:59:49 +000014949$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014950
14951fi
14952
Michael W. Hudson54241132001-12-07 15:38:26 +000014953
Matthias Kloseb9621712010-04-24 17:59:49 +000014954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14955$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014956if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014958else
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014960 ac_cv_broken_mbstowcs=no
14961else
Matthias Kloseb9621712010-04-24 17:59:49 +000014962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014963/* end confdefs.h. */
14964
Stefan Krah19c21392012-11-22 23:47:32 +010014965#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014966#include<stdlib.h>
14967int main() {
14968 size_t len = -1;
14969 const char *str = "text";
14970 len = mbstowcs(NULL, str, 0);
14971 return (len != 4);
14972}
14973
14974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014975if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014976 ac_cv_broken_mbstowcs=no
14977else
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14981 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014982fi
14983
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014984fi
14985
Matthias Kloseb9621712010-04-24 17:59:49 +000014986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14987$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014988if test "$ac_cv_broken_mbstowcs" = yes
14989then
14990
Matthias Kloseb9621712010-04-24 17:59:49 +000014991$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014992
14993fi
14994
Antoine Pitroub52ec782009-01-25 16:34:23 +000014995# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14997$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014998
14999# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015000if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015001 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015002if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015003then
15004
Matthias Kloseb9621712010-04-24 17:59:49 +000015005$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015006
Matthias Kloseb9621712010-04-24 17:59:49 +000015007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15008$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015009fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015010if test "$withval" = no
15011then
15012
15013$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15014
Matthias Kloseb9621712010-04-24 17:59:49 +000015015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15016$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015017fi
15018
Antoine Pitrou042b1282010-08-13 21:15:58 +000015019else
15020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15021$as_echo "no value specified" >&6; }
15022fi
15023
Antoine Pitroub52ec782009-01-25 16:34:23 +000015024
Matthias Kloseb17289e2012-03-15 19:51:34 +010015025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15026$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15027if ${ac_cv_computed_gotos+:} false; then :
15028 $as_echo_n "(cached) " >&6
15029else
15030 if test "$cross_compiling" = yes; then :
15031 if test "${with_computed_gotos+set}" = set; then
15032 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15033 else
15034 ac_cv_computed_gotos=no
15035 fi
15036else
15037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15038/* end confdefs.h. */
15039
15040int main(int argc, char **argv)
15041{
15042 static void *targets[1] = { &&LABEL1 };
15043 goto LABEL2;
15044LABEL1:
15045 return 0;
15046LABEL2:
15047 goto *targets[0];
15048 return 1;
15049}
15050
15051_ACEOF
15052if ac_fn_c_try_run "$LINENO"; then :
15053 ac_cv_computed_gotos=yes
15054else
15055 ac_cv_computed_gotos=no
15056fi
15057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15058 conftest.$ac_objext conftest.beam conftest.$ac_ext
15059fi
15060
15061fi
15062
15063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15064$as_echo "$ac_cv_computed_gotos" >&6; }
15065case "$ac_cv_computed_gotos" in yes*)
15066
15067$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15068
15069esac
15070
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015071case $ac_sys_system in
15072AIX*)
15073
15074$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15075 ;;
15076esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015077
Michael W. Hudson54241132001-12-07 15:38:26 +000015078
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015079
15080
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015081for h in `(cd $srcdir;echo Python/thread_*.h)`
15082do
15083 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15084done
15085
Michael W. Hudson54241132001-12-07 15:38:26 +000015086
Neal Norwitzd24499d2005-12-18 21:36:39 +000015087SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15089$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015090for dir in $SRCDIRS; do
15091 if test ! -d $dir; then
15092 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015093 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015094done
Matthias Kloseb9621712010-04-24 17:59:49 +000015095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15096$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015097
Stefan Krah1919b7e2012-03-21 18:25:23 +010015098# Availability of -O2:
15099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15100$as_echo_n "checking for -O2... " >&6; }
15101saved_cflags="$CFLAGS"
15102CFLAGS="-O2"
15103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15104/* end confdefs.h. */
15105
15106int
15107main ()
15108{
15109
15110
15111 ;
15112 return 0;
15113}
15114_ACEOF
15115if ac_fn_c_try_compile "$LINENO"; then :
15116 have_O2=yes
15117else
15118 have_O2=no
15119fi
15120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15122$as_echo "$have_O2" >&6; }
15123CFLAGS="$saved_cflags"
15124
15125# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15126# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15128$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15129saved_cflags="$CFLAGS"
15130CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15131if test "$have_O2" = no; then
15132 CFLAGS=""
15133fi
15134if test "$cross_compiling" = yes; then :
15135 have_glibc_memmove_bug=undefined
15136else
15137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15138/* end confdefs.h. */
15139
15140#include <stdio.h>
15141#include <stdlib.h>
15142#include <string.h>
15143void foo(void *p, void *q) { memmove(p, q, 19); }
15144int main() {
15145 char a[32] = "123456789000000000";
15146 foo(&a[9], a);
15147 if (strcmp(a, "123456789123456789000000000") != 0)
15148 return 1;
15149 foo(a, &a[9]);
15150 if (strcmp(a, "123456789000000000") != 0)
15151 return 1;
15152 return 0;
15153}
15154
15155_ACEOF
15156if ac_fn_c_try_run "$LINENO"; then :
15157 have_glibc_memmove_bug=no
15158else
15159 have_glibc_memmove_bug=yes
15160fi
15161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15162 conftest.$ac_objext conftest.beam conftest.$ac_ext
15163fi
15164
15165CFLAGS="$saved_cflags"
15166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15167$as_echo "$have_glibc_memmove_bug" >&6; }
15168if test "$have_glibc_memmove_bug" = yes; then
15169
15170$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15171
15172fi
15173
15174if test "$have_gcc_asm_for_x87" = yes; then
15175 # Some versions of gcc miscompile inline asm:
15176 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15177 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15178 case $CC in
15179 *gcc*)
15180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15181$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15182 saved_cflags="$CFLAGS"
15183 CFLAGS="-O2"
15184 if test "$cross_compiling" = yes; then :
15185 have_ipa_pure_const_bug=undefined
15186else
15187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15188/* end confdefs.h. */
15189
15190 __attribute__((noinline)) int
15191 foo(int *p) {
15192 int r;
15193 asm ( "movl \$6, (%1)\n\t"
15194 "xorl %0, %0\n\t"
15195 : "=r" (r) : "r" (p) : "memory"
15196 );
15197 return r;
15198 }
15199 int main() {
15200 int p = 8;
15201 if ((foo(&p) ? : p) != 6)
15202 return 1;
15203 return 0;
15204 }
15205
15206_ACEOF
15207if ac_fn_c_try_run "$LINENO"; then :
15208 have_ipa_pure_const_bug=no
15209else
15210 have_ipa_pure_const_bug=yes
15211fi
15212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15213 conftest.$ac_objext conftest.beam conftest.$ac_ext
15214fi
15215
15216 CFLAGS="$saved_cflags"
15217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15218$as_echo "$have_ipa_pure_const_bug" >&6; }
15219 if test "$have_ipa_pure_const_bug" = yes; then
15220
15221$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15222
15223 fi
15224 ;;
15225 esac
15226fi
15227
Guido van Rossum627b2d71993-12-24 10:39:16 +000015228# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015229ac_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 +000015230
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015231ac_config_files="$ac_config_files Modules/ld_so_aix"
15232
Martin v. Löwis11437992002-04-12 09:54:03 +000015233cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015234# This file is a shell script that caches the results of configure
15235# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015236# scripts and configure runs, see configure's option --config-cache.
15237# It is not useful on other systems. If it contains results you don't
15238# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015239#
Martin v. Löwis11437992002-04-12 09:54:03 +000015240# config.status only pays attention to the cache file if you give it
15241# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015242#
Skip Montanaro6dead952003-09-25 14:50:04 +000015243# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015244# loading this file, other *unset* `ac_cv_foo' will be assigned the
15245# following values.
15246
15247_ACEOF
15248
Guido van Rossumf78abae1997-01-21 22:02:36 +000015249# The following way of writing the cache mishandles newlines in values,
15250# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015251# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015252# Ultrix sh set writes to stderr and can't be redirected directly,
15253# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254(
15255 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15256 eval ac_val=\$$ac_var
15257 case $ac_val in #(
15258 *${as_nl}*)
15259 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15261$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015262 esac
15263 case $ac_var in #(
15264 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15266 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015267 esac ;;
15268 esac
15269 done
15270
Martin v. Löwis11437992002-04-12 09:54:03 +000015271 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015272 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15273 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015274 # `set' does not quote correctly, so add quotes: double-quote
15275 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015276 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015277 "s/'/'\\\\''/g;
15278 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015279 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015280 *)
15281 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015283 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015284 esac |
15285 sort
15286) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015288 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15292 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15294 :end' >>confcache
15295if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15296 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015297 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015298 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15299$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015300 if test ! -f "$cache_file" || test -h "$cache_file"; then
15301 cat confcache >"$cache_file"
15302 else
15303 case $cache_file in #(
15304 */* | ?:*)
15305 mv -f confcache "$cache_file"$$ &&
15306 mv -f "$cache_file"$$ "$cache_file" ;; #(
15307 *)
15308 mv -f confcache "$cache_file" ;;
15309 esac
15310 fi
15311 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015312 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15314$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015315 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015316fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015317rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015318
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015319test "x$prefix" = xNONE && prefix=$ac_default_prefix
15320# Let make expand exec_prefix.
15321test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015322
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015323DEFS=-DHAVE_CONFIG_H
15324
Skip Montanaro6dead952003-09-25 14:50:04 +000015325ac_libobjs=
15326ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015327U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015328for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15329 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015330 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015331 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15333 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015334 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15335 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015336done
15337LIBOBJS=$ac_libobjs
15338
15339LTLIBOBJS=$ac_ltlibobjs
15340
15341
Martin v. Löwis11437992002-04-12 09:54:03 +000015342
Matthias Kloseb9621712010-04-24 17:59:49 +000015343
Victor Stinnere0be4232011-10-25 13:06:09 +020015344: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015345ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015346ac_clean_files_save=$ac_clean_files
15347ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015348{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15349$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15350as_write_fail=0
15351cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015352#! $SHELL
15353# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015354# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015355# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015356# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015357
Martin v. Löwis11437992002-04-12 09:54:03 +000015358debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015359ac_cs_recheck=false
15360ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015361
Matthias Kloseb9621712010-04-24 17:59:49 +000015362SHELL=\${CONFIG_SHELL-$SHELL}
15363export SHELL
15364_ASEOF
15365cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15366## -------------------- ##
15367## M4sh Initialization. ##
15368## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015370# Be more Bourne compatible
15371DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015372if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015373 emulate sh
15374 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015375 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015376 # is contrary to our usage. Disable this feature.
15377 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015378 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015379else
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 case `(set -o) 2>/dev/null` in #(
15381 *posix*) :
15382 set -o posix ;; #(
15383 *) :
15384 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015385esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015386fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015387
15388
Matthias Kloseb9621712010-04-24 17:59:49 +000015389as_nl='
15390'
15391export as_nl
15392# Printing a long string crashes Solaris 7 /usr/bin/printf.
15393as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15394as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15395as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15396# Prefer a ksh shell builtin over an external printf program on Solaris,
15397# but without wasting forks for bash or zsh.
15398if test -z "$BASH_VERSION$ZSH_VERSION" \
15399 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15400 as_echo='print -r --'
15401 as_echo_n='print -rn --'
15402elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15403 as_echo='printf %s\n'
15404 as_echo_n='printf %s'
15405else
15406 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15407 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15408 as_echo_n='/usr/ucb/echo -n'
15409 else
15410 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15411 as_echo_n_body='eval
15412 arg=$1;
15413 case $arg in #(
15414 *"$as_nl"*)
15415 expr "X$arg" : "X\\(.*\\)$as_nl";
15416 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15417 esac;
15418 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15419 '
15420 export as_echo_n_body
15421 as_echo_n='sh -c $as_echo_n_body as_echo'
15422 fi
15423 export as_echo_body
15424 as_echo='sh -c $as_echo_body as_echo'
15425fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015426
15427# The user is always right.
15428if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015429 PATH_SEPARATOR=:
15430 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15431 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15432 PATH_SEPARATOR=';'
15433 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015434fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015436
15437# IFS
15438# We need space, tab and new line, in precisely that order. Quoting is
15439# there to prevent editors from complaining about space-tab.
15440# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15441# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015442IFS=" "" $as_nl"
15443
15444# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015445as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015446case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447 *[\\/]* ) as_myself=$0 ;;
15448 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015449for as_dir in $PATH
15450do
15451 IFS=$as_save_IFS
15452 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15454 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015457 ;;
15458esac
15459# We did not find ourselves, most probably we were run as `sh COMMAND'
15460# in which case we are not to be found in the path.
15461if test "x$as_myself" = x; then
15462 as_myself=$0
15463fi
15464if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015465 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15466 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015467fi
15468
Matthias Kloseb9621712010-04-24 17:59:49 +000015469# Unset variables that we do not need and which cause bugs (e.g. in
15470# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15471# suppresses any "Segmentation fault" message there. '((' could
15472# trigger a bug in pdksh 5.2.14.
15473for as_var in BASH_ENV ENV MAIL MAILPATH
15474do eval test x\${$as_var+set} = xset \
15475 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476done
15477PS1='$ '
15478PS2='> '
15479PS4='+ '
15480
15481# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015482LC_ALL=C
15483export LC_ALL
15484LANGUAGE=C
15485export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015486
Matthias Kloseb9621712010-04-24 17:59:49 +000015487# CDPATH.
15488(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15489
15490
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015491# as_fn_error STATUS ERROR [LINENO LOG_FD]
15492# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015493# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15494# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015495# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015496as_fn_error ()
15497{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015498 as_status=$1; test $as_status -eq 0 && as_status=1
15499 if test "$4"; then
15500 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15501 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015502 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015503 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015504 as_fn_exit $as_status
15505} # as_fn_error
15506
15507
15508# as_fn_set_status STATUS
15509# -----------------------
15510# Set $? to STATUS, without forking.
15511as_fn_set_status ()
15512{
15513 return $1
15514} # as_fn_set_status
15515
15516# as_fn_exit STATUS
15517# -----------------
15518# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15519as_fn_exit ()
15520{
15521 set +e
15522 as_fn_set_status $1
15523 exit $1
15524} # as_fn_exit
15525
15526# as_fn_unset VAR
15527# ---------------
15528# Portably unset VAR.
15529as_fn_unset ()
15530{
15531 { eval $1=; unset $1;}
15532}
15533as_unset=as_fn_unset
15534# as_fn_append VAR VALUE
15535# ----------------------
15536# Append the text in VALUE to the end of the definition contained in VAR. Take
15537# advantage of any shell optimizations that allow amortized linear growth over
15538# repeated appends, instead of the typical quadratic growth present in naive
15539# implementations.
15540if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15541 eval 'as_fn_append ()
15542 {
15543 eval $1+=\$2
15544 }'
15545else
15546 as_fn_append ()
15547 {
15548 eval $1=\$$1\$2
15549 }
15550fi # as_fn_append
15551
15552# as_fn_arith ARG...
15553# ------------------
15554# Perform arithmetic evaluation on the ARGs, and store the result in the
15555# global $as_val. Take advantage of shells that can avoid forks. The arguments
15556# must be portable across $(()) and expr.
15557if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15558 eval 'as_fn_arith ()
15559 {
15560 as_val=$(( $* ))
15561 }'
15562else
15563 as_fn_arith ()
15564 {
15565 as_val=`expr "$@" || test $? -eq 1`
15566 }
15567fi # as_fn_arith
15568
15569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015570if expr a : '\(a\)' >/dev/null 2>&1 &&
15571 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15572 as_expr=expr
15573else
15574 as_expr=false
15575fi
15576
15577if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15578 as_basename=basename
15579else
15580 as_basename=false
15581fi
15582
Matthias Kloseb9621712010-04-24 17:59:49 +000015583if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15584 as_dirname=dirname
15585else
15586 as_dirname=false
15587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015588
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015589as_me=`$as_basename -- "$0" ||
15590$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15591 X"$0" : 'X\(//\)$' \| \
15592 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015593$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015594 sed '/^.*\/\([^/][^/]*\)\/*$/{
15595 s//\1/
15596 q
15597 }
15598 /^X\/\(\/\/\)$/{
15599 s//\1/
15600 q
15601 }
15602 /^X\/\(\/\).*/{
15603 s//\1/
15604 q
15605 }
15606 s/.*/./; q'`
15607
Matthias Kloseb9621712010-04-24 17:59:49 +000015608# Avoid depending upon Character Ranges.
15609as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15610as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15611as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15612as_cr_digits='0123456789'
15613as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614
15615ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015616case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015617-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015618 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015619 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015620 xy) ECHO_C='\c';;
15621 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15622 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623 esac;;
15624*)
15625 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015626esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015627
Martin v. Löwis11437992002-04-12 09:54:03 +000015628rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015629if test -d conf$$.dir; then
15630 rm -f conf$$.dir/conf$$.file
15631else
15632 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015633 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015635if (echo >conf$$.file) 2>/dev/null; then
15636 if ln -s conf$$.file conf$$ 2>/dev/null; then
15637 as_ln_s='ln -s'
15638 # ... but there are two gotchas:
15639 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15640 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015641 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015642 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015643 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 elif ln conf$$.file conf$$ 2>/dev/null; then
15645 as_ln_s=ln
15646 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015647 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015649else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015650 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15653rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015654
Matthias Kloseb9621712010-04-24 17:59:49 +000015655
15656# as_fn_mkdir_p
15657# -------------
15658# Create "$as_dir" as a directory, including parents if necessary.
15659as_fn_mkdir_p ()
15660{
15661
15662 case $as_dir in #(
15663 -*) as_dir=./$as_dir;;
15664 esac
15665 test -d "$as_dir" || eval $as_mkdir_p || {
15666 as_dirs=
15667 while :; do
15668 case $as_dir in #(
15669 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15670 *) as_qdir=$as_dir;;
15671 esac
15672 as_dirs="'$as_qdir' $as_dirs"
15673 as_dir=`$as_dirname -- "$as_dir" ||
15674$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15675 X"$as_dir" : 'X\(//\)[^/]' \| \
15676 X"$as_dir" : 'X\(//\)$' \| \
15677 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15678$as_echo X"$as_dir" |
15679 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15680 s//\1/
15681 q
15682 }
15683 /^X\(\/\/\)[^/].*/{
15684 s//\1/
15685 q
15686 }
15687 /^X\(\/\/\)$/{
15688 s//\1/
15689 q
15690 }
15691 /^X\(\/\).*/{
15692 s//\1/
15693 q
15694 }
15695 s/.*/./; q'`
15696 test -d "$as_dir" && break
15697 done
15698 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015699 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015700
15701
15702} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015703if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015704 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015705else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015706 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015707 as_mkdir_p=false
15708fi
15709
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015710
15711# as_fn_executable_p FILE
15712# -----------------------
15713# Test if FILE is an executable regular file.
15714as_fn_executable_p ()
15715{
15716 test -f "$1" && test -x "$1"
15717} # as_fn_executable_p
15718as_test_x='test -x'
15719as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015720
15721# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015722as_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 +000015723
15724# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015725as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015726
15727
Martin v. Löwis11437992002-04-12 09:54:03 +000015728exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015729## ----------------------------------- ##
15730## Main body of $CONFIG_STATUS script. ##
15731## ----------------------------------- ##
15732_ASEOF
15733test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015734
Matthias Kloseb9621712010-04-24 17:59:49 +000015735cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15736# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015737# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015738# values after options handling.
15739ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015740This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015741generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015742
15743 CONFIG_FILES = $CONFIG_FILES
15744 CONFIG_HEADERS = $CONFIG_HEADERS
15745 CONFIG_LINKS = $CONFIG_LINKS
15746 CONFIG_COMMANDS = $CONFIG_COMMANDS
15747 $ $0 $@
15748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015749on `(hostname || uname -n) 2>/dev/null | sed 1q`
15750"
15751
Martin v. Löwis11437992002-04-12 09:54:03 +000015752_ACEOF
15753
Matthias Kloseb9621712010-04-24 17:59:49 +000015754case $ac_config_files in *"
15755"*) set x $ac_config_files; shift; ac_config_files=$*;;
15756esac
15757
15758case $ac_config_headers in *"
15759"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15760esac
15761
15762
15763cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015764# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015765config_files="$ac_config_files"
15766config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015768_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015769
Matthias Kloseb9621712010-04-24 17:59:49 +000015770cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015771ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015772\`$as_me' instantiates files and other configuration actions
15773from templates according to the current configuration. Unless the files
15774and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015775
Matthias Kloseb9621712010-04-24 17:59:49 +000015776Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015777
15778 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015779 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015780 --config print configuration, then exit
15781 -q, --quiet, --silent
15782 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015783 -d, --debug don't remove temporary files
15784 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015785 --file=FILE[:TEMPLATE]
15786 instantiate the configuration file FILE
15787 --header=FILE[:TEMPLATE]
15788 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015789
15790Configuration files:
15791$config_files
15792
15793Configuration headers:
15794$config_headers
15795
Matthias Kloseb9621712010-04-24 17:59:49 +000015796Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015799cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15800ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015801ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015802python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015803configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015804 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015805
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015806Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015807This config.status script is free software; the Free Software Foundation
15808gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809
15810ac_pwd='$ac_pwd'
15811srcdir='$srcdir'
15812INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015813MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015814test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015815_ACEOF
15816
Matthias Kloseb9621712010-04-24 17:59:49 +000015817cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15818# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015819ac_need_defaults=:
15820while test $# != 0
15821do
15822 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015823 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15825 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015826 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015827 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015828 --*=)
15829 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15830 ac_optarg=
15831 ac_shift=:
15832 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015834 ac_option=$1
15835 ac_optarg=$2
15836 ac_shift=shift
15837 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015838 esac
15839
Skip Montanaro6dead952003-09-25 14:50:04 +000015840 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015841 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015842 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15843 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015845 $as_echo "$ac_cs_version"; exit ;;
15846 --config | --confi | --conf | --con | --co | --c )
15847 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015848 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015849 debug=: ;;
15850 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015851 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015852 case $ac_optarg in
15853 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015854 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015855 esac
15856 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015857 ac_need_defaults=false;;
15858 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015859 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015860 case $ac_optarg in
15861 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15862 esac
15863 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015864 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015865 --he | --h)
15866 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015867 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015868Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015869 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015870 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015871 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15872 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15873 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
15875 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015876 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015877Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015880 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015881
15882 esac
15883 shift
15884done
15885
Skip Montanaro6dead952003-09-25 14:50:04 +000015886ac_configure_extra_args=
15887
15888if $ac_cs_silent; then
15889 exec 6>/dev/null
15890 ac_configure_extra_args="$ac_configure_extra_args --silent"
15891fi
15892
15893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015894cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015895if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015896 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015897 shift
15898 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15899 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015900 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015901 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015902fi
15903
Martin v. Löwis11437992002-04-12 09:54:03 +000015904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015905cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015906exec 5>>config.log
15907{
15908 echo
15909 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15910## Running $as_me. ##
15911_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015912 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015913} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015916cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015917_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015918
Matthias Kloseb9621712010-04-24 17:59:49 +000015919cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015920
15921# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015922for ac_config_target in $ac_config_targets
15923do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015924 case $ac_config_target in
15925 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15926 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15927 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015928 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15929 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015930 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15931 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015932 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010015933 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015934 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015935
Victor Stinnere0be4232011-10-25 13:06:09 +020015936 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015937 esac
15938done
15939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015940
Martin v. Löwis11437992002-04-12 09:54:03 +000015941# If the user did not use the arguments to specify the items to instantiate,
15942# then the envvar interface is used. Set only those that are not.
15943# We use the long form for the default assignment because of an extremely
15944# bizarre bug on SunOS 4.1.3.
15945if $ac_need_defaults; then
15946 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15947 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15948fi
15949
Skip Montanaro6dead952003-09-25 14:50:04 +000015950# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015951# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015952# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015953# Hook for its removal unless debugging.
15954# Note that there is a small window in which the directory will not be cleaned:
15955# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015956$debug ||
15957{
Victor Stinnere0be4232011-10-25 13:06:09 +020015958 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015959 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015960 : "${ac_tmp:=$tmp}"
15961 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015962' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015963 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015964}
Martin v. Löwis11437992002-04-12 09:54:03 +000015965# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015966
Martin v. Löwis11437992002-04-12 09:54:03 +000015967{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015968 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015969 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015970} ||
15971{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015972 tmp=./conf$$-$RANDOM
15973 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015974} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015975ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015976
Matthias Kloseb9621712010-04-24 17:59:49 +000015977# Set up the scripts for CONFIG_FILES section.
15978# No need to generate them if there are no CONFIG_FILES.
15979# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015980if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015981
Matthias Kloseb9621712010-04-24 17:59:49 +000015982
15983ac_cr=`echo X | tr X '\015'`
15984# On cygwin, bash can eat \r inside `` if the user requested igncr.
15985# But we know of no other shell where ac_cr would be empty at this
15986# point, so we can use a bashism as a fallback.
15987if test "x$ac_cr" = x; then
15988 eval ac_cr=\$\'\\r\'
15989fi
15990ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15991if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015992 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015993else
15994 ac_cs_awk_cr=$ac_cr
15995fi
15996
Victor Stinnere0be4232011-10-25 13:06:09 +020015997echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015998_ACEOF
15999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016000
Matthias Kloseb9621712010-04-24 17:59:49 +000016001{
16002 echo "cat >conf$$subs.awk <<_ACEOF" &&
16003 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16004 echo "_ACEOF"
16005} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016006 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16007ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008ac_delim='%!_!# '
16009for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016010 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016011 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016012
Matthias Kloseb9621712010-04-24 17:59:49 +000016013 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16014 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016015 break
16016 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016017 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016018 else
16019 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016020 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016021done
Matthias Kloseb9621712010-04-24 17:59:49 +000016022rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023
Matthias Kloseb9621712010-04-24 17:59:49 +000016024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016025cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016027sed -n '
16028h
16029s/^/S["/; s/!.*/"]=/
16030p
16031g
16032s/^[^!]*!//
16033:repl
16034t repl
16035s/'"$ac_delim"'$//
16036t delim
16037:nl
16038h
16039s/\(.\{148\}\)..*/\1/
16040t more1
16041s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16042p
16043n
16044b repl
16045:more1
16046s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16047p
16048g
16049s/.\{148\}//
16050t nl
16051:delim
16052h
16053s/\(.\{148\}\)..*/\1/
16054t more2
16055s/["\\]/\\&/g; s/^/"/; s/$/"/
16056p
16057b
16058:more2
16059s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16060p
16061g
16062s/.\{148\}//
16063t delim
16064' <conf$$subs.awk | sed '
16065/^[^""]/{
16066 N
16067 s/\n//
16068}
16069' >>$CONFIG_STATUS || ac_write_fail=1
16070rm -f conf$$subs.awk
16071cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16072_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016073cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016074 for (key in S) S_is_set[key] = 1
16075 FS = ""
16076
16077}
16078{
16079 line = $ 0
16080 nfields = split(line, field, "@")
16081 substed = 0
16082 len = length(field[1])
16083 for (i = 2; i < nfields; i++) {
16084 key = field[i]
16085 keylen = length(key)
16086 if (S_is_set[key]) {
16087 value = S[key]
16088 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16089 len += length(value) + length(field[++i])
16090 substed = 1
16091 } else
16092 len += 1 + keylen
16093 }
16094
16095 print line
16096}
16097
16098_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016100cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16101if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16102 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16103else
16104 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016105fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016106 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016107_ACEOF
16108
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016109# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16110# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016111# trailing colons and then remove the whole line if VPATH becomes empty
16112# (actually we leave an empty line to preserve line numbers).
16113if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016114 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16115h
16116s///
16117s/^/:/
16118s/[ ]*$/:/
16119s/:\$(srcdir):/:/g
16120s/:\${srcdir}:/:/g
16121s/:@srcdir@:/:/g
16122s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016123s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016124x
16125s/\(=[ ]*\).*/\1/
16126G
16127s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016128s/^[^=]*=[ ]*$//
16129}'
16130fi
16131
Matthias Kloseb9621712010-04-24 17:59:49 +000016132cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016133fi # test -n "$CONFIG_FILES"
16134
Matthias Kloseb9621712010-04-24 17:59:49 +000016135# Set up the scripts for CONFIG_HEADERS section.
16136# No need to generate them if there are no CONFIG_HEADERS.
16137# This happens for instance with `./config.status Makefile'.
16138if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016139cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016140BEGIN {
16141_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016142
Matthias Kloseb9621712010-04-24 17:59:49 +000016143# Transform confdefs.h into an awk script `defines.awk', embedded as
16144# here-document in config.status, that substitutes the proper values into
16145# config.h.in to produce config.h.
16146
16147# Create a delimiter string that does not exist in confdefs.h, to ease
16148# handling of long lines.
16149ac_delim='%!_!# '
16150for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016151 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16152 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016153 break
16154 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016155 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016156 else
16157 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16158 fi
16159done
16160
16161# For the awk script, D is an array of macro values keyed by name,
16162# likewise P contains macro parameters if any. Preserve backslash
16163# newline sequences.
16164
16165ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16166sed -n '
16167s/.\{148\}/&'"$ac_delim"'/g
16168t rset
16169:rset
16170s/^[ ]*#[ ]*define[ ][ ]*/ /
16171t def
16172d
16173:def
16174s/\\$//
16175t bsnl
16176s/["\\]/\\&/g
16177s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16178D["\1"]=" \3"/p
16179s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16180d
16181:bsnl
16182s/["\\]/\\&/g
16183s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16184D["\1"]=" \3\\\\\\n"\\/p
16185t cont
16186s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16187t cont
16188d
16189:cont
16190n
16191s/.\{148\}/&'"$ac_delim"'/g
16192t clear
16193:clear
16194s/\\$//
16195t bsnlc
16196s/["\\]/\\&/g; s/^/"/; s/$/"/p
16197d
16198:bsnlc
16199s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16200b cont
16201' <confdefs.h | sed '
16202s/'"$ac_delim"'/"\\\
16203"/g' >>$CONFIG_STATUS || ac_write_fail=1
16204
16205cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16206 for (key in D) D_is_set[key] = 1
16207 FS = ""
16208}
16209/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16210 line = \$ 0
16211 split(line, arg, " ")
16212 if (arg[1] == "#") {
16213 defundef = arg[2]
16214 mac1 = arg[3]
16215 } else {
16216 defundef = substr(arg[1], 2)
16217 mac1 = arg[2]
16218 }
16219 split(mac1, mac2, "(") #)
16220 macro = mac2[1]
16221 prefix = substr(line, 1, index(line, defundef) - 1)
16222 if (D_is_set[macro]) {
16223 # Preserve the white space surrounding the "#".
16224 print prefix "define", macro P[macro] D[macro]
16225 next
16226 } else {
16227 # Replace #undef with comments. This is necessary, for example,
16228 # in the case of _POSIX_SOURCE, which is predefined and required
16229 # on some systems where configure will not decide to define it.
16230 if (defundef == "undef") {
16231 print "/*", prefix defundef, macro, "*/"
16232 next
16233 }
16234 }
16235}
16236{ print }
16237_ACAWK
16238_ACEOF
16239cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016240 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016241fi # test -n "$CONFIG_HEADERS"
16242
16243
16244eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16245shift
16246for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016247do
16248 case $ac_tag in
16249 :[FHLC]) ac_mode=$ac_tag; continue;;
16250 esac
16251 case $ac_mode$ac_tag in
16252 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016253 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254 :[FH]-) ac_tag=-:-;;
16255 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16256 esac
16257 ac_save_IFS=$IFS
16258 IFS=:
16259 set x $ac_tag
16260 IFS=$ac_save_IFS
16261 shift
16262 ac_file=$1
16263 shift
16264
16265 case $ac_mode in
16266 :L) ac_source=$1;;
16267 :[FH])
16268 ac_file_inputs=
16269 for ac_f
16270 do
16271 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016272 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273 *) # Look for the file first in the build tree, then in the source tree
16274 # (if the path is not absolute). The absolute path cannot be DOS-style,
16275 # because $ac_f cannot contain `:'.
16276 test -f "$ac_f" ||
16277 case $ac_f in
16278 [\\/$]*) false;;
16279 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16280 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016281 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016283 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16284 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285 done
16286
16287 # Let's still pretend it is `configure' which instantiates (i.e., don't
16288 # use $as_me), people would be surprised to read:
16289 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016290 configure_input='Generated from '`
16291 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16292 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293 if test x"$ac_file" != x-; then
16294 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016295 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16296$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016297 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016298 # Neutralize special characters interpreted by sed in replacement strings.
16299 case $configure_input in #(
16300 *\&* | *\|* | *\\* )
16301 ac_sed_conf_input=`$as_echo "$configure_input" |
16302 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16303 *) ac_sed_conf_input=$configure_input;;
16304 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016305
16306 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016307 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16308 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016309 esac
16310 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016311 esac
16312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016314$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016315 X"$ac_file" : 'X\(//\)[^/]' \| \
16316 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016317 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016318$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016319 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16320 s//\1/
16321 q
16322 }
16323 /^X\(\/\/\)[^/].*/{
16324 s//\1/
16325 q
16326 }
16327 /^X\(\/\/\)$/{
16328 s//\1/
16329 q
16330 }
16331 /^X\(\/\).*/{
16332 s//\1/
16333 q
16334 }
16335 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016336 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016337 ac_builddir=.
16338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016339case "$ac_dir" in
16340.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16341*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016342 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016344 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016345 case $ac_top_builddir_sub in
16346 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16347 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16348 esac ;;
16349esac
16350ac_abs_top_builddir=$ac_pwd
16351ac_abs_builddir=$ac_pwd$ac_dir_suffix
16352# for backward compatibility:
16353ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016354
16355case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016356 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016357 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016358 ac_top_srcdir=$ac_top_builddir_sub
16359 ac_abs_top_srcdir=$ac_pwd ;;
16360 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016361 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016362 ac_top_srcdir=$srcdir
16363 ac_abs_top_srcdir=$srcdir ;;
16364 *) # Relative name.
16365 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16366 ac_top_srcdir=$ac_top_build_prefix$srcdir
16367 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016368esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016369ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016370
Martin v. Löwis11437992002-04-12 09:54:03 +000016371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016372 case $ac_mode in
16373 :F)
16374 #
16375 # CONFIG_FILE
16376 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016377
16378 case $INSTALL in
16379 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016380 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016381 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016382 ac_MKDIR_P=$MKDIR_P
16383 case $MKDIR_P in
16384 [\\/$]* | ?:[\\/]* ) ;;
16385 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16386 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016387_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388
Matthias Kloseb9621712010-04-24 17:59:49 +000016389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016390# If the template does not know about datarootdir, expand it.
16391# FIXME: This hack should be removed a few years after 2.60.
16392ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016393ac_sed_dataroot='
16394/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395 p
16396 q
16397}
16398/@datadir@/p
16399/@docdir@/p
16400/@infodir@/p
16401/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016402/@mandir@/p'
16403case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404*datarootdir*) ac_datarootdir_seen=yes;;
16405*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16407$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016409cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016410 ac_datarootdir_hack='
16411 s&@datadir@&$datadir&g
16412 s&@docdir@&$docdir&g
16413 s&@infodir@&$infodir&g
16414 s&@localedir@&$localedir&g
16415 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016416 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016417esac
16418_ACEOF
16419
16420# Neutralize VPATH when `$srcdir' = `.'.
16421# Shell code in configure.ac might set extrasub.
16422# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016423cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16424ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016425$extrasub
16426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016427cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016428:t
16429/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016430s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016431s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016432s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016433s&@srcdir@&$ac_srcdir&;t t
16434s&@abs_srcdir@&$ac_abs_srcdir&;t t
16435s&@top_srcdir@&$ac_top_srcdir&;t t
16436s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16437s&@builddir@&$ac_builddir&;t t
16438s&@abs_builddir@&$ac_abs_builddir&;t t
16439s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16440s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016441s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016442$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016443"
Victor Stinnere0be4232011-10-25 13:06:09 +020016444eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16445 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016447test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016448 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16449 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16450 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016451 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016452which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016453$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016454which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016455
Victor Stinnere0be4232011-10-25 13:06:09 +020016456 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016457 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016458 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16459 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016460 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016461 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016462 ;;
16463 :H)
16464 #
16465 # CONFIG_HEADER
16466 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016467 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016468 {
16469 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016470 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16471 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016472 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016473 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016474 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16475$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016476 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016477 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016478 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016479 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016480 fi
16481 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016482 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016483 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016484 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016485 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016486 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016488
16489 esac
16490
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016491
16492 case $ac_file$ac_mode in
16493 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16494
16495 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016496done # for ac_tag
16497
Guido van Rossum627b2d71993-12-24 10:39:16 +000016498
Matthias Kloseb9621712010-04-24 17:59:49 +000016499as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016500_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016501ac_clean_files=$ac_clean_files_save
16502
Matthias Kloseb9621712010-04-24 17:59:49 +000016503test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016504 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016505
Martin v. Löwis11437992002-04-12 09:54:03 +000016506
16507# configure is writing to config.log, and then calls config.status.
16508# config.status does its own redirection, appending to config.log.
16509# Unfortunately, on DOS this fails, as config.log is still kept open
16510# by configure, so config.status won't be able to write to it; its
16511# output is simply discarded. So we exec the FD to /dev/null,
16512# effectively closing config.log, so it can be properly (re)opened and
16513# appended to by config.status. When coming back to configure, we
16514# need to make the FD available again.
16515if test "$no_create" != yes; then
16516 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016517 ac_config_status_args=
16518 test "$silent" = yes &&
16519 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016520 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016521 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016522 exec 5>>config.log
16523 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16524 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016525 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016526fi
16527if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16528 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16529$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016530fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016531
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016532
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016533echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016534if test ! -f Modules/Setup
16535then
16536 cp $srcdir/Modules/Setup.dist Modules/Setup
16537fi
16538
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016539echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016540if test ! -f Modules/Setup.local
16541then
16542 echo "# Edit this file for local setup changes" >Modules/Setup.local
16543fi
16544
16545echo "creating Makefile"
16546$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16547 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016548 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016549mv config.c Modules